Skip to content

Commit 11ec5e9

Browse files
committed
Only pass buy value to listings with native token address as currency address
1 parent dde48d0 commit 11ec5e9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Assets/Thirdweb/Core/Scripts/Marketplace.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ public async Task<TransactionResult> BuyFromListing(string listingID, string qua
243243
Currency = listing.currencyContractAddress,
244244
ExpectedTotalPrice = BigInteger.Parse(listing.pricePerToken) * BigInteger.Parse(quantity),
245245
},
246-
BigInteger.Parse(listing.pricePerToken) * BigInteger.Parse(quantity)
246+
listing.currencyContractAddress.ToLower() == Utils.NativeTokenAddress.ToLower() ? BigInteger.Parse(listing.pricePerToken) * BigInteger.Parse(quantity) : 0
247247
);
248248
}
249249
}

0 commit comments

Comments
 (0)