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

Commit 4d904d1

Browse files
authored
Merge pull request #2049 from OpenBazaar/brian.fix-eth-test
Fix purchase crypto test
2 parents a43f96a + 2a38ddb commit 4d904d1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

core/order.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -982,7 +982,7 @@ func (n *OpenBazaarNode) CalculateOrderTotal(contract *pb.RicardianContract) (*b
982982
// calculate base amount
983983
if nrl.GetContractType() == pb.Listing_Metadata_CRYPTOCURRENCY.String() &&
984984
nrl.GetFormat() == pb.Listing_Metadata_MARKET_PRICE.String() {
985-
var originDef = repo.NewUnknownCryptoDefinition(nrl.GetCryptoCurrencyCode(), 0)
985+
var originDef = repo.NewUnknownCryptoDefinition(nrl.GetCryptoCurrencyCode(), uint(nrl.GetCryptoDivisibility()))
986986
itemOriginAmt = repo.NewCurrencyValueFromBigInt(GetOrderQuantity(nrl.GetProtobuf(), item), originDef)
987987

988988
if priceModifier := nrl.GetPriceModifier(); priceModifier != 0 {

qa/testdata/v5/order_crypto.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"moderator": "",
33
"items": [{
44
"listingHash": "",
5-
"bigQuantity": "100000000",
5+
"bigQuantity": "1000000000000000",
66
"paymentAddress": "crypto_payment_address",
77
"memo": "thanks!"
88
}]

0 commit comments

Comments
 (0)