File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed
packages/thirdweb/src/extensions/marketplace/offers/write Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " thirdweb " : patch
3+ ---
4+
5+ Add erc20Value for makeOffer extension function
Original file line number Diff line number Diff line change @@ -94,6 +94,7 @@ export function makeOffer(options: BaseTransactionOptions<MakeOfferParams>) {
9494 }
9595 // otherwise determine the wrapped native token address for the chain
9696
97+ // TODO: auto wrap native tokens if the currency is a native token address
9798 // TODO: add known wrapped native token addresses for each chain on the chain config
9899
99100 const { getDeployedInfraContract } = await import (
@@ -128,6 +129,14 @@ export function makeOffer(options: BaseTransactionOptions<MakeOfferParams>) {
128129 tokenId : options . tokenId ,
129130 totalPrice : normalizedPrice ,
130131 } ,
132+ overrides : {
133+ erc20Value : isNativeTokenAddress ( currency )
134+ ? undefined
135+ : {
136+ tokenAddress : currency ,
137+ amountWei : normalizedPrice ,
138+ } ,
139+ } ,
131140 } ;
132141 } ,
133142 } ) ;
You can’t perform that action at this time.
0 commit comments