Skip to content

Commit

Permalink
fix(aeternity): be able to send max amount
Browse files Browse the repository at this point in the history
  • Loading branch information
CedrikNikita committed Apr 16, 2024
1 parent 52943e3 commit 69aeb71
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/composables/maxAmount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ export function useMaxAmount({ formModel }: MaxAmountOptions) {
amount: 0,
callData: calldata,
nonce: nonce.value,
ttl: await aeSdk.getHeight({ cached: true }) + 3,
}),
Tag.ContractCallTx, // https://github.com/aeternity/aepp-sdk-js/issues/1852
).fee).shiftedBy(-AE_COIN_PRECISION);
Expand All @@ -141,6 +142,7 @@ export function useMaxAmount({ formModel }: MaxAmountOptions) {
amount,
payload: encode(new TextEncoder().encode(val.payload), Encoding.Bytearray),
nonce: nonce.value,
ttl: await aeSdk.getHeight({ cached: true }) + 3,
}),
Tag.SpendTx, // https://github.com/aeternity/aepp-sdk-js/issues/1852
).fee).shiftedBy(-AE_COIN_PRECISION);
Expand Down

0 comments on commit 69aeb71

Please sign in to comment.