diff --git a/README.md b/README.md index 21eebbb8..daac36ab 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,10 @@ This update is focused around rekey and changes to accommodate it. Both normal a - Transactions with rekeyed accounts now accepted - Reference accounts can now be imported with public key only +### Patch 1.8.2 + +Fix for Ledger transactions created in the UI with transfer amounts set to 0. + ### Patch 1.8.1 UI Improvements for rekey transactions and reference accounts. diff --git a/package.json b/package.json index 9b85e477..972b9bd8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "algosigner", - "version": "1.8.1", + "version": "1.8.2", "author": "https://developer.purestake.io", "description": "Sign Algorand transactions in your browser with PureStake.", "repository": "https://github.com/PureStake/algosigner", diff --git a/packages/common/package.json b/packages/common/package.json index 92b0066d..0cd6d2af 100644 --- a/packages/common/package.json +++ b/packages/common/package.json @@ -1,6 +1,6 @@ { "name": "@algosigner/common", - "version": "1.8.1", + "version": "1.8.2", "author": "https://developer.purestake.io", "description": "Common library functions for AlgoSigner.", "repository": "https://github.com/PureStake/algosigner", diff --git a/packages/crypto/package.json b/packages/crypto/package.json index c737bd8a..7ca12bb6 100644 --- a/packages/crypto/package.json +++ b/packages/crypto/package.json @@ -1,6 +1,6 @@ { "name": "algosigner-crypto", - "version": "1.8.1", + "version": "1.8.2", "author": "https://developer.purestake.io", "description": "Cryptographic wrapper for saving and retrieving extention information in Algosigner.", "repository": { diff --git a/packages/dapp/package.json b/packages/dapp/package.json index 9c14d74b..cef1cada 100644 --- a/packages/dapp/package.json +++ b/packages/dapp/package.json @@ -1,6 +1,6 @@ { "name": "@algosigner/dapp", - "version": "1.8.1", + "version": "1.8.2", "author": "https://developer.purestake.io", "repository": "https://github.com/PureStake/algosigner", "license": "MIT", diff --git a/packages/extension/manifest.json b/packages/extension/manifest.json index 40660f58..30d0df7a 100644 --- a/packages/extension/manifest.json +++ b/packages/extension/manifest.json @@ -2,7 +2,7 @@ "manifest_version": 2, "name": "AlgoSigner", "author": "https://developer.purestake.io", - "version": "1.8.1", + "version": "1.8.2", "description": "Algorand Wallet Extension | Send & Receive ALGOs | Sign dApp Transactions", "icons": { "48": "icon.png" diff --git a/packages/extension/package.json b/packages/extension/package.json index 2c329795..5939cf72 100644 --- a/packages/extension/package.json +++ b/packages/extension/package.json @@ -1,6 +1,6 @@ { "name": "algosigner-extension", - "version": "1.8.1", + "version": "1.8.2", "author": "https://developer.purestake.io", "repository": "https://github.com/PureStake/algosigner", "license": "MIT", diff --git a/packages/storage/package.json b/packages/storage/package.json index f3ac5482..ef3e8202 100644 --- a/packages/storage/package.json +++ b/packages/storage/package.json @@ -1,6 +1,6 @@ { "name": "algosigner-storage", - "version": "1.8.1", + "version": "1.8.2", "author": "https://developer.purestake.io", "repository": "https://github.com/PureStake/algosigner", "license": "MIT", diff --git a/packages/test-project/package.json b/packages/test-project/package.json index bdf33427..51d1ac06 100644 --- a/packages/test-project/package.json +++ b/packages/test-project/package.json @@ -1,6 +1,6 @@ { "name": "algorand-test-project", - "version": "1.8.1", + "version": "1.8.2", "repository": "https://github.com/PureStake/algosigner", "license": "MIT", "description": "Repository for tests", diff --git a/packages/ui/package.json b/packages/ui/package.json index 2adeffd7..f7d2fbec 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -1,6 +1,6 @@ { "name": "algosigner-ui", - "version": "1.8.1", + "version": "1.8.2", "author": "https://developer.purestake.io", "repository": "https://github.com/PureStake/algosigner", "license": "MIT", diff --git a/packages/ui/src/components/LedgerDevice/structure/ledgerActions.ts b/packages/ui/src/components/LedgerDevice/structure/ledgerActions.ts index b5a880f4..2dcd8c30 100644 --- a/packages/ui/src/components/LedgerDevice/structure/ledgerActions.ts +++ b/packages/ui/src/components/LedgerDevice/structure/ledgerActions.ts @@ -164,7 +164,18 @@ const getAllAddresses = async (): Promise => { function cleanseBuildEncodeUnsignedTransaction(transaction: any): any { // If there's no dApp structure, we're coming from the UI if (!transaction.encodedTxn && !transaction.groupsToSign) { - const builtTx = new Transaction(removeEmptyFields(transaction.transaction)); + const removedFieldsTxn = removeEmptyFields(transaction.transaction); + + // Explicit conversion of amount. Ledger transactions are stringified and retrieved, + // which converts the amount to a string. Moving to int/bigint here. + if ('amount' in removedFieldsTxn) { + removedFieldsTxn['amount'] = BigInt(removedFieldsTxn['amount']) + if (removedFieldsTxn['amount'] <= Number.MAX_SAFE_INTEGER){ + removedFieldsTxn['amount'] = parseInt(removedFieldsTxn['amount']) + } + } + + const builtTx = new Transaction(removedFieldsTxn); const byteTxn = algosdk.encodeUnsignedTransaction(builtTx); return { transaction: byteTxn, error: '' };