Skip to content

Commit

Permalink
Only pass buy value to listings with native token address as currency…
Browse files Browse the repository at this point in the history
… address
  • Loading branch information
0xFirekeeper committed Feb 14, 2024
1 parent dde48d0 commit 11ec5e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Assets/Thirdweb/Core/Scripts/Marketplace.cs
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ public async Task<TransactionResult> BuyFromListing(string listingID, string qua
Currency = listing.currencyContractAddress,
ExpectedTotalPrice = BigInteger.Parse(listing.pricePerToken) * BigInteger.Parse(quantity),
},
BigInteger.Parse(listing.pricePerToken) * BigInteger.Parse(quantity)
listing.currencyContractAddress.ToLower() == Utils.NativeTokenAddress.ToLower() ? BigInteger.Parse(listing.pricePerToken) * BigInteger.Parse(quantity) : 0
);
}
}
Expand Down

0 comments on commit 11ec5e9

Please sign in to comment.