File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
packages/thirdweb/src/wallets/smart/lib Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " thirdweb " : patch
3+ ---
4+
5+ Handle hex value format for smart wallet execution
Original file line number Diff line number Diff line change @@ -184,7 +184,7 @@ export function prepareExecute(args: {
184184 let value = transaction . value || 0n ;
185185 // special handling of hedera chains, decimals for native value is 8 instead of 18 when passed as contract params
186186 if ( transaction . chainId === 295 || transaction . chainId === 296 ) {
187- value = value / BigInt ( 10 ** 10 ) ;
187+ value = BigInt ( value ) / BigInt ( 10 ** 10 ) ;
188188 }
189189 return prepareContractCall ( {
190190 contract : accountContract ,
@@ -220,7 +220,7 @@ export function prepareBatchExecute(args: {
220220 const chainId = transactions [ 0 ] ?. chainId ;
221221 // special handling of hedera chains, decimals for native value is 8 instead of 18 when passed as contract params
222222 if ( chainId === 295 || chainId === 296 ) {
223- values = values . map ( ( value ) => value / BigInt ( 10 ** 10 ) ) ;
223+ values = values . map ( ( value ) => BigInt ( value ) / BigInt ( 10 ** 10 ) ) ;
224224 }
225225 return prepareContractCall ( {
226226 contract : accountContract ,
You can’t perform that action at this time.
0 commit comments