Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

Commit de87f6b

Browse files
committed
Fix bigSurcharge empty string
1 parent be3cd33 commit de87f6b

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

core/listings.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -641,6 +641,13 @@ func (n *OpenBazaarNode) GetListingFromSlug(slug string) (*pb.SignedListing, err
641641
}
642642
}
643643
}
644+
645+
for _, s := range sl.Listing.Item.Skus {
646+
if s.BigSurcharge == "" {
647+
s.BigSurcharge = "0"
648+
}
649+
}
650+
644651
return sl, nil
645652
}
646653

repo/listing.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,13 @@ func GetListingFromSlug(slug, repoPath string, isTestnet bool, dStore *Datastore
271271
}
272272
}
273273
}
274+
275+
for _, s := range sl.Listing.Item.Skus {
276+
if s.BigSurcharge == "" {
277+
s.BigSurcharge = "0"
278+
}
279+
}
280+
274281
return sl, nil
275282
}
276283

0 commit comments

Comments
 (0)