This repository was archived by the owner on Mar 28, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -195,6 +195,12 @@ func (n *OpenBazaarNode) PatchProfile(patch map[string]interface{}) error {
195
195
196
196
repoProfile .NormalizeDataForAllSchemas ()
197
197
198
+ if repoProfile .GetProtobuf ().ModeratorInfo != nil && repoProfile .GetProtobuf ().ModeratorInfo .Fee != nil {
199
+ if repoProfile .GetProtobuf ().ModeratorInfo .Fee .FeeType == pb .Moderator_Fee_PERCENTAGE {
200
+ repoProfile .GetProtobuf ().ModeratorInfo .Fee .FixedFee = nil
201
+ }
202
+ }
203
+
198
204
if err := repoProfile .Valid (); err != nil {
199
205
return fmt .Errorf ("invalid profile: %s" , err .Error ())
200
206
}
Original file line number Diff line number Diff line change @@ -919,8 +919,8 @@ func (cs ListingCoupons) GetProtobuf() []*pb.Listing_Coupon {
919
919
var cspb = make ([]* pb.Listing_Coupon , len (cs ))
920
920
for i , c := range cs {
921
921
cspb [i ] = & pb.Listing_Coupon {
922
- Title : c .GetTitle (),
923
- PercentDiscount : c .GetPercentOff (),
922
+ Title : c .GetTitle (),
923
+ PercentDiscount : c .GetPercentOff (),
924
924
}
925
925
if c .GetAmountOff () != nil {
926
926
cspb [i ].BigPriceDiscount = c .GetAmountOff ().Amount .String ()
You can’t perform that action at this time.
0 commit comments