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

Commit

Permalink
Merge pull request #2092 from OpenBazaar/brian.fixCheckoutBreakdownBug
Browse files Browse the repository at this point in the history
Push fix for shipping price
  • Loading branch information
cpacia authored Jul 6, 2020
2 parents fe13ac0 + 75f5f81 commit b77cd6f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions core/order.go
Original file line number Diff line number Diff line change
Expand Up @@ -973,8 +973,13 @@ func (n *OpenBazaarNode) CheckoutBreakdown(data *repo.PurchaseData) (repo.Checko
}
}
// Convert to final currency
shippingCurrencyValue := repo.NewCurrencyValueFromBigInt(shippingTotal, listingCurDef)
finalShippingTotal, _, err := shippingCurrencyValue.ConvertUsingProtobufDef(v5Order.Payment.AmountCurrency, cc)
originalPrice, err := nrl.GetPrice()
if err != nil {
return emptyCheckoutBreakdown, err
}
originalPrice.Amount = shippingTotal

finalShippingTotal, _, err := originalPrice.ConvertUsingProtobufDef(v5Order.Payment.AmountCurrency, cc)
if err != nil {
return emptyCheckoutBreakdown, err
}
Expand Down

0 comments on commit b77cd6f

Please sign in to comment.