@ledgerhq/coin-evm 0.3.0 → 0.4.0-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +31 -0
- package/jest.config.js +4 -0
- package/lib/__tests__/fixtures/common.fixtures.d.ts +9 -0
- package/lib/__tests__/fixtures/common.fixtures.d.ts.map +1 -0
- package/lib/{testUtils.js → __tests__/fixtures/common.fixtures.js} +40 -9
- package/lib/__tests__/fixtures/common.fixtures.js.map +1 -0
- package/lib/__tests__/fixtures/etherscan.fixtures.d.ts +86 -0
- package/lib/__tests__/fixtures/etherscan.fixtures.d.ts.map +1 -0
- package/lib/__tests__/fixtures/etherscan.fixtures.js +267 -0
- package/lib/__tests__/fixtures/etherscan.fixtures.js.map +1 -0
- package/lib/__tests__/fixtures/prepareTransaction.fixtures.d.ts +10 -0
- package/lib/__tests__/fixtures/prepareTransaction.fixtures.d.ts.map +1 -0
- package/lib/__tests__/fixtures/prepareTransaction.fixtures.js +69 -0
- package/lib/__tests__/fixtures/prepareTransaction.fixtures.js.map +1 -0
- package/lib/__tests__/fixtures/synchronization.fixtures.d.ts +44 -0
- package/lib/__tests__/fixtures/synchronization.fixtures.d.ts.map +1 -0
- package/lib/__tests__/fixtures/synchronization.fixtures.js +219 -0
- package/lib/__tests__/fixtures/synchronization.fixtures.js.map +1 -0
- package/lib/__tests__/fixtures/transaction.fixtures.d.ts +47 -0
- package/lib/__tests__/fixtures/transaction.fixtures.d.ts.map +1 -0
- package/lib/__tests__/fixtures/transaction.fixtures.js +182 -0
- package/lib/__tests__/fixtures/transaction.fixtures.js.map +1 -0
- package/lib/__tests__/integration/bridge.integration.test.d.ts +7 -0
- package/lib/__tests__/integration/bridge.integration.test.d.ts.map +1 -0
- package/lib/__tests__/integration/bridge.integration.test.js +74 -0
- package/lib/__tests__/integration/bridge.integration.test.js.map +1 -0
- package/lib/__tests__/unit/adapters.unit.test.d.ts.map +1 -0
- package/lib/__tests__/unit/adapters.unit.test.js +989 -0
- package/lib/__tests__/unit/adapters.unit.test.js.map +1 -0
- package/lib/__tests__/unit/api/explorer/etherscan.unit.test.d.ts +2 -0
- package/lib/__tests__/unit/api/explorer/etherscan.unit.test.d.ts.map +1 -0
- package/lib/__tests__/unit/api/explorer/etherscan.unit.test.js +430 -0
- package/lib/__tests__/unit/api/explorer/etherscan.unit.test.js.map +1 -0
- package/lib/__tests__/unit/api/explorer/index.unit.test.d.ts +2 -0
- package/lib/__tests__/unit/api/explorer/index.unit.test.d.ts.map +1 -0
- package/lib/__tests__/unit/api/explorer/index.unit.test.js +49 -0
- package/lib/__tests__/unit/api/explorer/index.unit.test.js.map +1 -0
- package/lib/__tests__/unit/api/gasTracker/index.unit.test.d.ts +2 -0
- package/lib/__tests__/unit/api/gasTracker/index.unit.test.d.ts.map +1 -0
- package/lib/__tests__/{gasTracker → unit/api/gasTracker}/index.unit.test.js +3 -3
- package/lib/__tests__/unit/api/gasTracker/index.unit.test.js.map +1 -0
- package/lib/__tests__/unit/api/gasTracker/ledger.unit.test.d.ts.map +1 -0
- package/lib/__tests__/{gasTracker → unit/api/gasTracker}/ledger.unit.test.js +2 -2
- package/lib/__tests__/unit/api/gasTracker/ledger.unit.test.js.map +1 -0
- package/lib/__tests__/unit/api/rpc/rpc.unit.test.d.ts.map +1 -0
- package/lib/__tests__/{rpc.unit.test.js → unit/api/rpc/rpc.unit.test.js} +14 -14
- package/lib/__tests__/unit/api/rpc/rpc.unit.test.js.map +1 -0
- package/lib/__tests__/unit/broadcast.unit.test.d.ts.map +1 -0
- package/lib/__tests__/unit/broadcast.unit.test.js +335 -0
- package/lib/__tests__/unit/broadcast.unit.test.js.map +1 -0
- package/lib/__tests__/unit/buildOptimisticOperation.unit.test.d.ts.map +1 -0
- package/lib/__tests__/{buildOptimisticOperation.unit.test.js → unit/buildOptimisticOperation.unit.test.js} +132 -6
- package/lib/__tests__/unit/buildOptimisticOperation.unit.test.js.map +1 -0
- package/lib/__tests__/unit/createTransaction.unit.test.d.ts.map +1 -0
- package/lib/__tests__/{createTransaction.unit.test.js → unit/createTransaction.unit.test.js} +5 -5
- package/lib/__tests__/unit/createTransaction.unit.test.js.map +1 -0
- package/lib/__tests__/unit/deviceTransactionConfig.unit.test.d.ts.map +1 -0
- package/lib/__tests__/{deviceTransactionConfig.unit.test.js → unit/deviceTransactionConfig.unit.test.js} +123 -6
- package/lib/__tests__/unit/deviceTransactionConfig.unit.test.js.map +1 -0
- package/lib/__tests__/unit/estimateMaxSpendable.unit.test.d.ts.map +1 -0
- package/lib/__tests__/{estimateMaxSpendable.unit.test.js → unit/estimateMaxSpendable.unit.test.js} +6 -6
- package/lib/__tests__/unit/estimateMaxSpendable.unit.test.js.map +1 -0
- package/lib/__tests__/unit/getTransactionStatus.unit.test.d.ts.map +1 -0
- package/lib/__tests__/{getTransactionStatus.unit.test.js → unit/getTransactionStatus.unit.test.js} +76 -6
- package/lib/__tests__/unit/getTransactionStatus.unit.test.js.map +1 -0
- package/lib/__tests__/unit/hw-getAddress.unit.test.d.ts.map +1 -0
- package/lib/__tests__/{hw-getAddress.unit.test.js → unit/hw-getAddress.unit.test.js} +5 -1
- package/lib/__tests__/unit/hw-getAddress.unit.test.js.map +1 -0
- package/lib/__tests__/unit/hw-signMessage.unit.test.d.ts +2 -0
- package/lib/__tests__/unit/hw-signMessage.unit.test.d.ts.map +1 -0
- package/lib/__tests__/unit/hw-signMessage.unit.test.js +188 -0
- package/lib/__tests__/unit/hw-signMessage.unit.test.js.map +1 -0
- package/lib/__tests__/unit/logic.unit.test.d.ts.map +1 -0
- package/lib/__tests__/{logic.unit.test.js → unit/logic.unit.test.js} +111 -20
- package/lib/__tests__/unit/logic.unit.test.js.map +1 -0
- package/lib/__tests__/unit/nftResolvers.unit.test.d.ts +2 -0
- package/lib/__tests__/unit/nftResolvers.unit.test.d.ts.map +1 -0
- package/lib/__tests__/unit/nftResolvers.unit.test.js +163 -0
- package/lib/__tests__/unit/nftResolvers.unit.test.js.map +1 -0
- package/lib/__tests__/unit/preload.unit.test.d.ts.map +1 -0
- package/lib/__tests__/{preload.unit.test.js → unit/preload.unit.test.js} +3 -3
- package/lib/__tests__/unit/preload.unit.test.js.map +1 -0
- package/lib/__tests__/unit/prepareTransaction.unit.test.d.ts.map +1 -0
- package/lib/__tests__/unit/prepareTransaction.unit.test.js +300 -0
- package/lib/__tests__/unit/prepareTransaction.unit.test.js.map +1 -0
- package/lib/__tests__/unit/signOperation.unit.test.d.ts.map +1 -0
- package/lib/__tests__/{signOperation.unit.test.js → unit/signOperation.unit.test.js} +14 -17
- package/lib/__tests__/unit/signOperation.unit.test.js.map +1 -0
- package/lib/__tests__/unit/synchronization.unit.test.d.ts.map +1 -0
- package/lib/__tests__/{synchronization.unit.test.js → unit/synchronization.unit.test.js} +139 -231
- package/lib/__tests__/unit/synchronization.unit.test.js.map +1 -0
- package/lib/__tests__/unit/transaction.unit.test.d.ts.map +1 -0
- package/lib/__tests__/{transaction.unit.test.js → unit/transaction.unit.test.js} +48 -80
- package/lib/__tests__/unit/transaction.unit.test.js.map +1 -0
- package/lib/abis/erc1155.abi.json +314 -0
- package/lib/abis/erc721.abi.json +346 -0
- package/lib/adapters.d.ts +18 -7
- package/lib/adapters.d.ts.map +1 -1
- package/lib/adapters.js +131 -46
- package/lib/adapters.js.map +1 -1
- package/lib/api/explorer/etherscan.d.ts +39 -11
- package/lib/api/explorer/etherscan.d.ts.map +1 -1
- package/lib/api/explorer/etherscan.js +151 -9
- package/lib/api/explorer/etherscan.js.map +1 -1
- package/lib/api/explorer/index.d.ts +7 -16
- package/lib/api/explorer/index.d.ts.map +1 -1
- package/lib/api/explorer/index.js.map +1 -1
- package/lib/api/nft/index.d.ts +24 -0
- package/lib/api/nft/index.d.ts.map +1 -0
- package/lib/api/nft/index.js +54 -0
- package/lib/api/nft/index.js.map +1 -0
- package/lib/api/rpc/index.native.d.ts.map +1 -1
- package/lib/api/rpc/index.native.js +1 -0
- package/lib/api/rpc/index.native.js.map +1 -1
- package/lib/api/rpc/rpc.common.d.ts +2 -2
- package/lib/api/rpc/rpc.common.d.ts.map +1 -1
- package/lib/api/rpc/rpc.common.js +3 -3
- package/lib/api/rpc/rpc.common.js.map +1 -1
- package/lib/bridge/js.d.ts +1 -1
- package/lib/bridge/js.d.ts.map +1 -1
- package/lib/bridge/js.js +10 -10
- package/lib/bridge/js.js.map +1 -1
- package/lib/broadcast.d.ts.map +1 -1
- package/lib/broadcast.js +9 -2
- package/lib/broadcast.js.map +1 -1
- package/lib/buildOptimisticOperation.d.ts +5 -1
- package/lib/buildOptimisticOperation.d.ts.map +1 -1
- package/lib/buildOptimisticOperation.js +46 -4
- package/lib/buildOptimisticOperation.js.map +1 -1
- package/lib/cli-transaction.d.ts.map +1 -1
- package/lib/cli-transaction.js +1 -0
- package/lib/cli-transaction.js.map +1 -1
- package/lib/datasets/ethereum1.d.ts.map +1 -1
- package/lib/datasets/ethereum1.js +3 -2
- package/lib/datasets/ethereum1.js.map +1 -1
- package/lib/deviceTransactionConfig.d.ts.map +1 -1
- package/lib/deviceTransactionConfig.js +50 -0
- package/lib/deviceTransactionConfig.js.map +1 -1
- package/lib/errors.d.ts +9 -0
- package/lib/errors.d.ts.map +1 -1
- package/lib/errors.js +7 -1
- package/lib/errors.js.map +1 -1
- package/lib/getTransactionStatus.d.ts +1 -0
- package/lib/getTransactionStatus.d.ts.map +1 -1
- package/lib/getTransactionStatus.js +25 -3
- package/lib/getTransactionStatus.js.map +1 -1
- package/lib/hw-signMessage.d.ts +15 -0
- package/lib/hw-signMessage.d.ts.map +1 -0
- package/lib/hw-signMessage.js +86 -0
- package/lib/hw-signMessage.js.map +1 -0
- package/lib/logic.d.ts +63 -1
- package/lib/logic.d.ts.map +1 -1
- package/lib/logic.js +98 -2
- package/lib/logic.js.map +1 -1
- package/lib/nftResolvers.d.ts +19 -0
- package/lib/nftResolvers.d.ts.map +1 -0
- package/lib/nftResolvers.js +58 -0
- package/lib/nftResolvers.js.map +1 -0
- package/lib/preload.d.ts.map +1 -1
- package/lib/preload.js +7 -3
- package/lib/preload.js.map +1 -1
- package/lib/prepareTransaction.d.ts +6 -1
- package/lib/prepareTransaction.d.ts.map +1 -1
- package/lib/prepareTransaction.js +69 -18
- package/lib/prepareTransaction.js.map +1 -1
- package/lib/signOperation.d.ts +1 -1
- package/lib/signOperation.d.ts.map +1 -1
- package/lib/signOperation.js +17 -6
- package/lib/signOperation.js.map +1 -1
- package/lib/signer.d.ts +24 -1
- package/lib/signer.d.ts.map +1 -1
- package/lib/specs.d.ts +3 -1
- package/lib/specs.d.ts.map +1 -1
- package/lib/specs.js +3 -3
- package/lib/specs.js.map +1 -1
- package/lib/speculos-deviceActions.d.ts.map +1 -1
- package/lib/speculos-deviceActions.js +2 -1
- package/lib/speculos-deviceActions.js.map +1 -1
- package/lib/synchronization.d.ts +7 -2
- package/lib/synchronization.d.ts.map +1 -1
- package/lib/synchronization.js +45 -45
- package/lib/synchronization.js.map +1 -1
- package/lib/transaction.d.ts +3 -4
- package/lib/transaction.d.ts.map +1 -1
- package/lib/transaction.js +58 -12
- package/lib/transaction.js.map +1 -1
- package/lib/types.d.ts +85 -10
- package/lib/types.d.ts.map +1 -1
- package/lib-es/__tests__/fixtures/common.fixtures.d.ts +9 -0
- package/lib-es/__tests__/fixtures/common.fixtures.d.ts.map +1 -0
- package/lib-es/{testUtils.js → __tests__/fixtures/common.fixtures.js} +36 -8
- package/lib-es/__tests__/fixtures/common.fixtures.js.map +1 -0
- package/lib-es/__tests__/fixtures/etherscan.fixtures.d.ts +86 -0
- package/lib-es/__tests__/fixtures/etherscan.fixtures.d.ts.map +1 -0
- package/lib-es/__tests__/fixtures/etherscan.fixtures.js +264 -0
- package/lib-es/__tests__/fixtures/etherscan.fixtures.js.map +1 -0
- package/lib-es/__tests__/fixtures/prepareTransaction.fixtures.d.ts +10 -0
- package/lib-es/__tests__/fixtures/prepareTransaction.fixtures.d.ts.map +1 -0
- package/lib-es/__tests__/fixtures/prepareTransaction.fixtures.js +62 -0
- package/lib-es/__tests__/fixtures/prepareTransaction.fixtures.js.map +1 -0
- package/lib-es/__tests__/fixtures/synchronization.fixtures.d.ts +44 -0
- package/lib-es/__tests__/fixtures/synchronization.fixtures.d.ts.map +1 -0
- package/lib-es/__tests__/fixtures/synchronization.fixtures.js +190 -0
- package/lib-es/__tests__/fixtures/synchronization.fixtures.js.map +1 -0
- package/lib-es/__tests__/fixtures/transaction.fixtures.d.ts +47 -0
- package/lib-es/__tests__/fixtures/transaction.fixtures.d.ts.map +1 -0
- package/lib-es/__tests__/fixtures/transaction.fixtures.js +176 -0
- package/lib-es/__tests__/fixtures/transaction.fixtures.js.map +1 -0
- package/lib-es/__tests__/integration/bridge.integration.test.d.ts +7 -0
- package/lib-es/__tests__/integration/bridge.integration.test.d.ts.map +1 -0
- package/lib-es/__tests__/integration/bridge.integration.test.js +71 -0
- package/lib-es/__tests__/integration/bridge.integration.test.js.map +1 -0
- package/lib-es/__tests__/unit/adapters.unit.test.d.ts.map +1 -0
- package/lib-es/__tests__/unit/adapters.unit.test.js +984 -0
- package/lib-es/__tests__/unit/adapters.unit.test.js.map +1 -0
- package/lib-es/__tests__/unit/api/explorer/etherscan.unit.test.d.ts +2 -0
- package/lib-es/__tests__/unit/api/explorer/etherscan.unit.test.d.ts.map +1 -0
- package/lib-es/__tests__/unit/api/explorer/etherscan.unit.test.js +402 -0
- package/lib-es/__tests__/unit/api/explorer/etherscan.unit.test.js.map +1 -0
- package/lib-es/__tests__/unit/api/explorer/index.unit.test.d.ts.map +1 -0
- package/lib-es/__tests__/unit/api/explorer/index.unit.test.js +44 -0
- package/lib-es/__tests__/unit/api/explorer/index.unit.test.js.map +1 -0
- package/lib-es/__tests__/unit/api/gasTracker/index.unit.test.d.ts.map +1 -0
- package/lib-es/__tests__/{gasTracker → unit/api/gasTracker}/index.unit.test.js +3 -3
- package/lib-es/__tests__/unit/api/gasTracker/index.unit.test.js.map +1 -0
- package/lib-es/__tests__/unit/api/gasTracker/ledger.unit.test.d.ts.map +1 -0
- package/lib-es/__tests__/{gasTracker → unit/api/gasTracker}/ledger.unit.test.js +2 -2
- package/lib-es/__tests__/unit/api/gasTracker/ledger.unit.test.js.map +1 -0
- package/lib-es/__tests__/unit/api/rpc/rpc.unit.test.d.ts.map +1 -0
- package/lib-es/__tests__/{rpc.unit.test.js → unit/api/rpc/rpc.unit.test.js} +13 -13
- package/lib-es/__tests__/unit/api/rpc/rpc.unit.test.js.map +1 -0
- package/lib-es/__tests__/unit/broadcast.unit.test.d.ts.map +1 -0
- package/lib-es/__tests__/unit/broadcast.unit.test.js +307 -0
- package/lib-es/__tests__/unit/broadcast.unit.test.js.map +1 -0
- package/lib-es/__tests__/unit/buildOptimisticOperation.unit.test.d.ts.map +1 -0
- package/lib-es/__tests__/{buildOptimisticOperation.unit.test.js → unit/buildOptimisticOperation.unit.test.js} +130 -4
- package/lib-es/__tests__/unit/buildOptimisticOperation.unit.test.js.map +1 -0
- package/lib-es/__tests__/unit/createTransaction.unit.test.d.ts.map +1 -0
- package/lib-es/__tests__/{createTransaction.unit.test.js → unit/createTransaction.unit.test.js} +3 -3
- package/lib-es/__tests__/unit/createTransaction.unit.test.js.map +1 -0
- package/lib-es/__tests__/unit/deviceTransactionConfig.unit.test.d.ts.map +1 -0
- package/lib-es/__tests__/{deviceTransactionConfig.unit.test.js → unit/deviceTransactionConfig.unit.test.js} +121 -4
- package/lib-es/__tests__/unit/deviceTransactionConfig.unit.test.js.map +1 -0
- package/lib-es/__tests__/unit/estimateMaxSpendable.unit.test.d.ts.map +1 -0
- package/lib-es/__tests__/{estimateMaxSpendable.unit.test.js → unit/estimateMaxSpendable.unit.test.js} +4 -4
- package/lib-es/__tests__/unit/estimateMaxSpendable.unit.test.js.map +1 -0
- package/lib-es/__tests__/unit/getTransactionStatus.unit.test.d.ts.map +1 -0
- package/lib-es/__tests__/{getTransactionStatus.unit.test.js → unit/getTransactionStatus.unit.test.js} +74 -4
- package/lib-es/__tests__/unit/getTransactionStatus.unit.test.js.map +1 -0
- package/lib-es/__tests__/unit/hw-getAddress.unit.test.d.ts.map +1 -0
- package/lib-es/__tests__/{hw-getAddress.unit.test.js → unit/hw-getAddress.unit.test.js} +5 -1
- package/lib-es/__tests__/unit/hw-getAddress.unit.test.js.map +1 -0
- package/lib-es/__tests__/unit/hw-signMessage.unit.test.d.ts +2 -0
- package/lib-es/__tests__/unit/hw-signMessage.unit.test.d.ts.map +1 -0
- package/lib-es/__tests__/unit/hw-signMessage.unit.test.js +186 -0
- package/lib-es/__tests__/unit/hw-signMessage.unit.test.js.map +1 -0
- package/lib-es/__tests__/unit/logic.unit.test.d.ts.map +1 -0
- package/lib-es/__tests__/{logic.unit.test.js → unit/logic.unit.test.js} +97 -6
- package/lib-es/__tests__/unit/logic.unit.test.js.map +1 -0
- package/lib-es/__tests__/unit/nftResolvers.unit.test.d.ts +2 -0
- package/lib-es/__tests__/unit/nftResolvers.unit.test.d.ts.map +1 -0
- package/lib-es/__tests__/unit/nftResolvers.unit.test.js +158 -0
- package/lib-es/__tests__/unit/nftResolvers.unit.test.js.map +1 -0
- package/lib-es/__tests__/unit/preload.unit.test.d.ts.map +1 -0
- package/lib-es/__tests__/{preload.unit.test.js → unit/preload.unit.test.js} +3 -3
- package/lib-es/__tests__/unit/preload.unit.test.js.map +1 -0
- package/lib-es/__tests__/unit/prepareTransaction.unit.test.d.ts.map +1 -0
- package/lib-es/__tests__/{prepareTransaction.unit.test.js → unit/prepareTransaction.unit.test.js} +134 -82
- package/lib-es/__tests__/unit/prepareTransaction.unit.test.js.map +1 -0
- package/lib-es/__tests__/unit/signOperation.unit.test.d.ts.map +1 -0
- package/lib-es/__tests__/{signOperation.unit.test.js → unit/signOperation.unit.test.js} +13 -16
- package/lib-es/__tests__/unit/signOperation.unit.test.js.map +1 -0
- package/lib-es/__tests__/unit/synchronization.unit.test.d.ts.map +1 -0
- package/lib-es/__tests__/{synchronization.unit.test.js → unit/synchronization.unit.test.js} +115 -207
- package/lib-es/__tests__/unit/synchronization.unit.test.js.map +1 -0
- package/lib-es/__tests__/unit/transaction.unit.test.d.ts.map +1 -0
- package/lib-es/__tests__/{transaction.unit.test.js → unit/transaction.unit.test.js} +40 -72
- package/lib-es/__tests__/unit/transaction.unit.test.js.map +1 -0
- package/lib-es/abis/erc1155.abi.json +314 -0
- package/lib-es/abis/erc721.abi.json +346 -0
- package/lib-es/adapters.d.ts +18 -7
- package/lib-es/adapters.d.ts.map +1 -1
- package/lib-es/adapters.js +127 -44
- package/lib-es/adapters.js.map +1 -1
- package/lib-es/api/explorer/etherscan.d.ts +39 -11
- package/lib-es/api/explorer/etherscan.d.ts.map +1 -1
- package/lib-es/api/explorer/etherscan.js +146 -10
- package/lib-es/api/explorer/etherscan.js.map +1 -1
- package/lib-es/api/explorer/index.d.ts +7 -16
- package/lib-es/api/explorer/index.d.ts.map +1 -1
- package/lib-es/api/explorer/index.js.map +1 -1
- package/lib-es/api/nft/index.d.ts +24 -0
- package/lib-es/api/nft/index.d.ts.map +1 -0
- package/lib-es/api/nft/index.js +46 -0
- package/lib-es/api/nft/index.js.map +1 -0
- package/lib-es/api/rpc/index.native.d.ts.map +1 -1
- package/lib-es/api/rpc/index.native.js +1 -0
- package/lib-es/api/rpc/index.native.js.map +1 -1
- package/lib-es/api/rpc/rpc.common.d.ts +2 -2
- package/lib-es/api/rpc/rpc.common.d.ts.map +1 -1
- package/lib-es/api/rpc/rpc.common.js +3 -3
- package/lib-es/api/rpc/rpc.common.js.map +1 -1
- package/lib-es/bridge/js.d.ts +1 -1
- package/lib-es/bridge/js.d.ts.map +1 -1
- package/lib-es/bridge/js.js +10 -10
- package/lib-es/bridge/js.js.map +1 -1
- package/lib-es/broadcast.d.ts.map +1 -1
- package/lib-es/broadcast.js +9 -2
- package/lib-es/broadcast.js.map +1 -1
- package/lib-es/buildOptimisticOperation.d.ts +5 -1
- package/lib-es/buildOptimisticOperation.d.ts.map +1 -1
- package/lib-es/buildOptimisticOperation.js +45 -4
- package/lib-es/buildOptimisticOperation.js.map +1 -1
- package/lib-es/cli-transaction.d.ts.map +1 -1
- package/lib-es/cli-transaction.js +1 -0
- package/lib-es/cli-transaction.js.map +1 -1
- package/lib-es/datasets/ethereum1.d.ts.map +1 -1
- package/lib-es/datasets/ethereum1.js +3 -2
- package/lib-es/datasets/ethereum1.js.map +1 -1
- package/lib-es/deviceTransactionConfig.d.ts.map +1 -1
- package/lib-es/deviceTransactionConfig.js +50 -0
- package/lib-es/deviceTransactionConfig.js.map +1 -1
- package/lib-es/errors.d.ts +9 -0
- package/lib-es/errors.d.ts.map +1 -1
- package/lib-es/errors.js +6 -0
- package/lib-es/errors.js.map +1 -1
- package/lib-es/getTransactionStatus.d.ts +1 -0
- package/lib-es/getTransactionStatus.d.ts.map +1 -1
- package/lib-es/getTransactionStatus.js +23 -2
- package/lib-es/getTransactionStatus.js.map +1 -1
- package/lib-es/hw-signMessage.d.ts +15 -0
- package/lib-es/hw-signMessage.d.ts.map +1 -0
- package/lib-es/hw-signMessage.js +81 -0
- package/lib-es/hw-signMessage.js.map +1 -0
- package/lib-es/logic.d.ts +63 -1
- package/lib-es/logic.d.ts.map +1 -1
- package/lib-es/logic.js +95 -1
- package/lib-es/logic.js.map +1 -1
- package/lib-es/nftResolvers.d.ts +19 -0
- package/lib-es/nftResolvers.d.ts.map +1 -0
- package/lib-es/nftResolvers.js +50 -0
- package/lib-es/nftResolvers.js.map +1 -0
- package/lib-es/preload.d.ts.map +1 -1
- package/lib-es/preload.js +7 -3
- package/lib-es/preload.js.map +1 -1
- package/lib-es/prepareTransaction.d.ts +6 -1
- package/lib-es/prepareTransaction.d.ts.map +1 -1
- package/lib-es/prepareTransaction.js +68 -18
- package/lib-es/prepareTransaction.js.map +1 -1
- package/lib-es/signOperation.d.ts +1 -1
- package/lib-es/signOperation.d.ts.map +1 -1
- package/lib-es/signOperation.js +17 -6
- package/lib-es/signOperation.js.map +1 -1
- package/lib-es/signer.d.ts +24 -1
- package/lib-es/signer.d.ts.map +1 -1
- package/lib-es/specs.d.ts +3 -1
- package/lib-es/specs.d.ts.map +1 -1
- package/lib-es/specs.js +3 -3
- package/lib-es/specs.js.map +1 -1
- package/lib-es/speculos-deviceActions.d.ts.map +1 -1
- package/lib-es/speculos-deviceActions.js +2 -1
- package/lib-es/speculos-deviceActions.js.map +1 -1
- package/lib-es/synchronization.d.ts +7 -2
- package/lib-es/synchronization.d.ts.map +1 -1
- package/lib-es/synchronization.js +46 -46
- package/lib-es/synchronization.js.map +1 -1
- package/lib-es/transaction.d.ts +3 -4
- package/lib-es/transaction.d.ts.map +1 -1
- package/lib-es/transaction.js +58 -12
- package/lib-es/transaction.js.map +1 -1
- package/lib-es/types.d.ts +85 -10
- package/lib-es/types.d.ts.map +1 -1
- package/package.json +13 -12
- package/src/{testUtils.ts → __tests__/fixtures/common.fixtures.ts} +78 -11
- package/src/__tests__/fixtures/etherscan.fixtures.ts +266 -0
- package/src/__tests__/fixtures/prepareTransaction.fixtures.ts +86 -0
- package/src/__tests__/fixtures/synchronization.fixtures.ts +229 -0
- package/src/__tests__/fixtures/transaction.fixtures.ts +229 -0
- package/src/__tests__/integration/bridge.integration.test.ts +74 -0
- package/src/__tests__/unit/adapters.unit.test.ts +1076 -0
- package/src/__tests__/unit/api/explorer/etherscan.unit.test.ts +563 -0
- package/src/__tests__/unit/api/explorer/index.unit.test.ts +36 -0
- package/src/__tests__/{gasTracker → unit/api/gasTracker}/index.unit.test.ts +3 -3
- package/src/__tests__/{gasTracker → unit/api/gasTracker}/ledger.unit.test.ts +3 -3
- package/src/__tests__/{rpc.unit.test.ts → unit/api/rpc/rpc.unit.test.ts} +17 -14
- package/src/__tests__/unit/broadcast.unit.test.ts +332 -0
- package/src/__tests__/{buildOptimisticOperation.unit.test.ts → unit/buildOptimisticOperation.unit.test.ts} +144 -5
- package/src/__tests__/{createTransaction.unit.test.ts → unit/createTransaction.unit.test.ts} +4 -4
- package/src/__tests__/{deviceTransactionConfig.unit.test.ts → unit/deviceTransactionConfig.unit.test.ts} +130 -5
- package/src/__tests__/{estimateMaxSpendable.unit.test.ts → unit/estimateMaxSpendable.unit.test.ts} +5 -5
- package/src/__tests__/{getTransactionStatus.unit.test.ts → unit/getTransactionStatus.unit.test.ts} +121 -5
- package/src/__tests__/{hw-getAddress.unit.test.ts → unit/hw-getAddress.unit.test.ts} +6 -2
- package/src/__tests__/unit/hw-signMessage.unit.test.ts +192 -0
- package/src/__tests__/{logic.unit.test.ts → unit/logic.unit.test.ts} +143 -8
- package/src/__tests__/unit/nftResolvers.unit.test.ts +179 -0
- package/src/__tests__/{preload.unit.test.ts → unit/preload.unit.test.ts} +4 -4
- package/src/__tests__/{prepareTransaction.unit.test.ts → unit/prepareTransaction.unit.test.ts} +284 -109
- package/src/__tests__/{signOperation.unit.test.ts → unit/signOperation.unit.test.ts} +18 -20
- package/src/__tests__/{synchronization.unit.test.ts → unit/synchronization.unit.test.ts} +202 -280
- package/src/__tests__/unit/transaction.unit.test.ts +198 -0
- package/src/abis/erc1155.abi.json +314 -0
- package/src/abis/erc20.abi.json +4 -12
- package/src/abis/erc721.abi.json +346 -0
- package/src/adapters.ts +177 -64
- package/src/api/explorer/etherscan.ts +265 -49
- package/src/api/explorer/index.ts +24 -10
- package/src/api/nft/index.ts +49 -0
- package/src/api/rpc/index.native.ts +2 -0
- package/src/api/rpc/rpc.common.ts +3 -3
- package/src/bridge/js.ts +13 -16
- package/src/broadcast.ts +29 -2
- package/src/buildOptimisticOperation.ts +71 -6
- package/src/cli-transaction.ts +2 -0
- package/src/datasets/ethereum1.ts +4 -2
- package/src/deviceTransactionConfig.ts +65 -0
- package/src/errors.ts +8 -0
- package/src/getTransactionStatus.ts +26 -0
- package/src/hw-signMessage.ts +92 -0
- package/src/logic.ts +118 -2
- package/src/nftResolvers.ts +71 -0
- package/src/preload.ts +9 -3
- package/src/prepareTransaction.ts +102 -24
- package/src/signOperation.ts +21 -8
- package/src/signer.ts +44 -1
- package/src/specs.ts +11 -6
- package/src/speculos-deviceActions.ts +3 -1
- package/src/synchronization.ts +73 -59
- package/src/transaction.ts +68 -15
- package/src/types.ts +108 -10
- package/.eslintrc.js +0 -22
- package/lib/__tests__/adapters.unit.test.d.ts.map +0 -1
- package/lib/__tests__/adapters.unit.test.js +0 -455
- package/lib/__tests__/adapters.unit.test.js.map +0 -1
- package/lib/__tests__/broadcast.unit.test.d.ts.map +0 -1
- package/lib/__tests__/broadcast.unit.test.js +0 -181
- package/lib/__tests__/broadcast.unit.test.js.map +0 -1
- package/lib/__tests__/buildOptimisticOperation.unit.test.d.ts.map +0 -1
- package/lib/__tests__/buildOptimisticOperation.unit.test.js.map +0 -1
- package/lib/__tests__/createTransaction.unit.test.d.ts.map +0 -1
- package/lib/__tests__/createTransaction.unit.test.js.map +0 -1
- package/lib/__tests__/deviceTransactionConfig.unit.test.d.ts.map +0 -1
- package/lib/__tests__/deviceTransactionConfig.unit.test.js.map +0 -1
- package/lib/__tests__/estimateMaxSpendable.unit.test.d.ts.map +0 -1
- package/lib/__tests__/estimateMaxSpendable.unit.test.js.map +0 -1
- package/lib/__tests__/gasTracker/index.unit.test.d.ts.map +0 -1
- package/lib/__tests__/gasTracker/index.unit.test.js.map +0 -1
- package/lib/__tests__/gasTracker/ledger.unit.test.d.ts.map +0 -1
- package/lib/__tests__/gasTracker/ledger.unit.test.js.map +0 -1
- package/lib/__tests__/getTransactionStatus.unit.test.d.ts.map +0 -1
- package/lib/__tests__/getTransactionStatus.unit.test.js.map +0 -1
- package/lib/__tests__/hw-getAddress.unit.test.d.ts.map +0 -1
- package/lib/__tests__/hw-getAddress.unit.test.js.map +0 -1
- package/lib/__tests__/logic.unit.test.d.ts.map +0 -1
- package/lib/__tests__/logic.unit.test.js.map +0 -1
- package/lib/__tests__/preload.unit.test.d.ts.map +0 -1
- package/lib/__tests__/preload.unit.test.js.map +0 -1
- package/lib/__tests__/prepareTransaction.unit.test.d.ts.map +0 -1
- package/lib/__tests__/prepareTransaction.unit.test.js +0 -248
- package/lib/__tests__/prepareTransaction.unit.test.js.map +0 -1
- package/lib/__tests__/rpc.unit.test.d.ts.map +0 -1
- package/lib/__tests__/rpc.unit.test.js.map +0 -1
- package/lib/__tests__/signOperation.unit.test.d.ts.map +0 -1
- package/lib/__tests__/signOperation.unit.test.js.map +0 -1
- package/lib/__tests__/synchronization.unit.test.d.ts.map +0 -1
- package/lib/__tests__/synchronization.unit.test.js.map +0 -1
- package/lib/__tests__/transaction.unit.test.d.ts.map +0 -1
- package/lib/__tests__/transaction.unit.test.js.map +0 -1
- package/lib/bridge.integration.test.d.ts +0 -14
- package/lib/bridge.integration.test.d.ts.map +0 -1
- package/lib/bridge.integration.test.js +0 -85
- package/lib/bridge.integration.test.js.map +0 -1
- package/lib/datasets/ethereum.scanAccounts.1.d.ts +0 -7
- package/lib/datasets/ethereum.scanAccounts.1.d.ts.map +0 -1
- package/lib/datasets/ethereum.scanAccounts.1.js +0 -51
- package/lib/datasets/ethereum.scanAccounts.1.js.map +0 -1
- package/lib/datasets/ethereum2.d.ts +0 -3
- package/lib/datasets/ethereum2.d.ts.map +0 -1
- package/lib/datasets/ethereum2.js +0 -22
- package/lib/datasets/ethereum2.js.map +0 -1
- package/lib/datasets/ethereum_classic.d.ts +0 -5
- package/lib/datasets/ethereum_classic.d.ts.map +0 -1
- package/lib/datasets/ethereum_classic.js +0 -69
- package/lib/datasets/ethereum_classic.js.map +0 -1
- package/lib/testUtils.d.ts +0 -6
- package/lib/testUtils.d.ts.map +0 -1
- package/lib/testUtils.js.map +0 -1
- package/lib-es/__tests__/adapters.unit.test.d.ts.map +0 -1
- package/lib-es/__tests__/adapters.unit.test.js +0 -450
- package/lib-es/__tests__/adapters.unit.test.js.map +0 -1
- package/lib-es/__tests__/broadcast.unit.test.d.ts.map +0 -1
- package/lib-es/__tests__/broadcast.unit.test.js +0 -153
- package/lib-es/__tests__/broadcast.unit.test.js.map +0 -1
- package/lib-es/__tests__/buildOptimisticOperation.unit.test.d.ts.map +0 -1
- package/lib-es/__tests__/buildOptimisticOperation.unit.test.js.map +0 -1
- package/lib-es/__tests__/createTransaction.unit.test.d.ts.map +0 -1
- package/lib-es/__tests__/createTransaction.unit.test.js.map +0 -1
- package/lib-es/__tests__/deviceTransactionConfig.unit.test.d.ts.map +0 -1
- package/lib-es/__tests__/deviceTransactionConfig.unit.test.js.map +0 -1
- package/lib-es/__tests__/estimateMaxSpendable.unit.test.d.ts.map +0 -1
- package/lib-es/__tests__/estimateMaxSpendable.unit.test.js.map +0 -1
- package/lib-es/__tests__/gasTracker/index.unit.test.d.ts.map +0 -1
- package/lib-es/__tests__/gasTracker/index.unit.test.js.map +0 -1
- package/lib-es/__tests__/gasTracker/ledger.unit.test.d.ts.map +0 -1
- package/lib-es/__tests__/gasTracker/ledger.unit.test.js.map +0 -1
- package/lib-es/__tests__/getTransactionStatus.unit.test.d.ts.map +0 -1
- package/lib-es/__tests__/getTransactionStatus.unit.test.js.map +0 -1
- package/lib-es/__tests__/hw-getAddress.unit.test.d.ts.map +0 -1
- package/lib-es/__tests__/hw-getAddress.unit.test.js.map +0 -1
- package/lib-es/__tests__/logic.unit.test.d.ts.map +0 -1
- package/lib-es/__tests__/logic.unit.test.js.map +0 -1
- package/lib-es/__tests__/preload.unit.test.d.ts.map +0 -1
- package/lib-es/__tests__/preload.unit.test.js.map +0 -1
- package/lib-es/__tests__/prepareTransaction.unit.test.d.ts.map +0 -1
- package/lib-es/__tests__/prepareTransaction.unit.test.js.map +0 -1
- package/lib-es/__tests__/rpc.unit.test.d.ts.map +0 -1
- package/lib-es/__tests__/rpc.unit.test.js.map +0 -1
- package/lib-es/__tests__/signOperation.unit.test.d.ts.map +0 -1
- package/lib-es/__tests__/signOperation.unit.test.js.map +0 -1
- package/lib-es/__tests__/synchronization.unit.test.d.ts.map +0 -1
- package/lib-es/__tests__/synchronization.unit.test.js.map +0 -1
- package/lib-es/__tests__/transaction.unit.test.d.ts.map +0 -1
- package/lib-es/__tests__/transaction.unit.test.js.map +0 -1
- package/lib-es/bridge.integration.test.d.ts +0 -14
- package/lib-es/bridge.integration.test.d.ts.map +0 -1
- package/lib-es/bridge.integration.test.js +0 -79
- package/lib-es/bridge.integration.test.js.map +0 -1
- package/lib-es/datasets/ethereum.scanAccounts.1.d.ts +0 -7
- package/lib-es/datasets/ethereum.scanAccounts.1.d.ts.map +0 -1
- package/lib-es/datasets/ethereum.scanAccounts.1.js +0 -49
- package/lib-es/datasets/ethereum.scanAccounts.1.js.map +0 -1
- package/lib-es/datasets/ethereum2.d.ts +0 -3
- package/lib-es/datasets/ethereum2.d.ts.map +0 -1
- package/lib-es/datasets/ethereum2.js +0 -19
- package/lib-es/datasets/ethereum2.js.map +0 -1
- package/lib-es/datasets/ethereum_classic.d.ts +0 -5
- package/lib-es/datasets/ethereum_classic.d.ts.map +0 -1
- package/lib-es/datasets/ethereum_classic.js +0 -67
- package/lib-es/datasets/ethereum_classic.js.map +0 -1
- package/lib-es/testUtils.d.ts +0 -6
- package/lib-es/testUtils.d.ts.map +0 -1
- package/lib-es/testUtils.js.map +0 -1
- package/src/__tests__/adapters.unit.test.ts +0 -497
- package/src/__tests__/broadcast.unit.test.ts +0 -163
- package/src/__tests__/transaction.unit.test.ts +0 -188
- package/src/bridge.integration.test.ts +0 -86
- package/src/datasets/ethereum.scanAccounts.1.ts +0 -48
- package/src/datasets/ethereum2.ts +0 -20
- package/src/datasets/ethereum_classic.ts +0 -68
- /package/lib/__tests__/{adapters.unit.test.d.ts → unit/adapters.unit.test.d.ts} +0 -0
- /package/lib/__tests__/{gasTracker → unit/api/gasTracker}/ledger.unit.test.d.ts +0 -0
- /package/lib/__tests__/{rpc.unit.test.d.ts → unit/api/rpc/rpc.unit.test.d.ts} +0 -0
- /package/lib/__tests__/{broadcast.unit.test.d.ts → unit/broadcast.unit.test.d.ts} +0 -0
- /package/lib/__tests__/{buildOptimisticOperation.unit.test.d.ts → unit/buildOptimisticOperation.unit.test.d.ts} +0 -0
- /package/lib/__tests__/{createTransaction.unit.test.d.ts → unit/createTransaction.unit.test.d.ts} +0 -0
- /package/lib/__tests__/{deviceTransactionConfig.unit.test.d.ts → unit/deviceTransactionConfig.unit.test.d.ts} +0 -0
- /package/lib/__tests__/{estimateMaxSpendable.unit.test.d.ts → unit/estimateMaxSpendable.unit.test.d.ts} +0 -0
- /package/lib/__tests__/{getTransactionStatus.unit.test.d.ts → unit/getTransactionStatus.unit.test.d.ts} +0 -0
- /package/lib/__tests__/{hw-getAddress.unit.test.d.ts → unit/hw-getAddress.unit.test.d.ts} +0 -0
- /package/lib/__tests__/{logic.unit.test.d.ts → unit/logic.unit.test.d.ts} +0 -0
- /package/lib/__tests__/{preload.unit.test.d.ts → unit/preload.unit.test.d.ts} +0 -0
- /package/lib/__tests__/{prepareTransaction.unit.test.d.ts → unit/prepareTransaction.unit.test.d.ts} +0 -0
- /package/lib/__tests__/{signOperation.unit.test.d.ts → unit/signOperation.unit.test.d.ts} +0 -0
- /package/lib/__tests__/{synchronization.unit.test.d.ts → unit/synchronization.unit.test.d.ts} +0 -0
- /package/lib/__tests__/{transaction.unit.test.d.ts → unit/transaction.unit.test.d.ts} +0 -0
- /package/lib-es/__tests__/{adapters.unit.test.d.ts → unit/adapters.unit.test.d.ts} +0 -0
- /package/lib-es/__tests__/{gasTracker → unit/api/explorer}/index.unit.test.d.ts +0 -0
- /package/{lib/__tests__ → lib-es/__tests__/unit/api}/gasTracker/index.unit.test.d.ts +0 -0
- /package/lib-es/__tests__/{gasTracker → unit/api/gasTracker}/ledger.unit.test.d.ts +0 -0
- /package/lib-es/__tests__/{rpc.unit.test.d.ts → unit/api/rpc/rpc.unit.test.d.ts} +0 -0
- /package/lib-es/__tests__/{broadcast.unit.test.d.ts → unit/broadcast.unit.test.d.ts} +0 -0
- /package/lib-es/__tests__/{buildOptimisticOperation.unit.test.d.ts → unit/buildOptimisticOperation.unit.test.d.ts} +0 -0
- /package/lib-es/__tests__/{createTransaction.unit.test.d.ts → unit/createTransaction.unit.test.d.ts} +0 -0
- /package/lib-es/__tests__/{deviceTransactionConfig.unit.test.d.ts → unit/deviceTransactionConfig.unit.test.d.ts} +0 -0
- /package/lib-es/__tests__/{estimateMaxSpendable.unit.test.d.ts → unit/estimateMaxSpendable.unit.test.d.ts} +0 -0
- /package/lib-es/__tests__/{getTransactionStatus.unit.test.d.ts → unit/getTransactionStatus.unit.test.d.ts} +0 -0
- /package/lib-es/__tests__/{hw-getAddress.unit.test.d.ts → unit/hw-getAddress.unit.test.d.ts} +0 -0
- /package/lib-es/__tests__/{logic.unit.test.d.ts → unit/logic.unit.test.d.ts} +0 -0
- /package/lib-es/__tests__/{preload.unit.test.d.ts → unit/preload.unit.test.d.ts} +0 -0
- /package/lib-es/__tests__/{prepareTransaction.unit.test.d.ts → unit/prepareTransaction.unit.test.d.ts} +0 -0
- /package/lib-es/__tests__/{signOperation.unit.test.d.ts → unit/signOperation.unit.test.d.ts} +0 -0
- /package/lib-es/__tests__/{synchronization.unit.test.d.ts → unit/synchronization.unit.test.d.ts} +0 -0
- /package/lib-es/__tests__/{transaction.unit.test.d.ts → unit/transaction.unit.test.d.ts} +0 -0
|
@@ -35,110 +35,32 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
35
35
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
36
36
|
};
|
|
37
37
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
|
-
const index_1 = require("@ledgerhq/coin-framework/account/index");
|
|
39
|
-
const cryptoassets_1 = require("@ledgerhq/cryptoassets");
|
|
40
|
-
const assert_1 = require("assert");
|
|
41
38
|
const bignumber_js_1 = __importDefault(require("bignumber.js"));
|
|
42
|
-
const
|
|
43
|
-
const
|
|
44
|
-
const
|
|
45
|
-
const
|
|
46
|
-
const synchronization = __importStar(require("
|
|
47
|
-
const
|
|
39
|
+
const assert_1 = require("assert");
|
|
40
|
+
const accountId_1 = require("@ledgerhq/coin-framework/account/accountId");
|
|
41
|
+
const common_fixtures_1 = require("../fixtures/common.fixtures");
|
|
42
|
+
const etherscanAPI = __importStar(require("../../api/explorer/etherscan"));
|
|
43
|
+
const synchronization = __importStar(require("../../synchronization"));
|
|
44
|
+
const rpcAPI = __importStar(require("../../api/rpc/rpc.common"));
|
|
45
|
+
const env_1 = require("../../../../env");
|
|
46
|
+
const logic = __importStar(require("../../logic"));
|
|
47
|
+
const synchronization_fixtures_1 = require("../fixtures/synchronization.fixtures");
|
|
48
|
+
jest.mock("../../api/rpc/rpc.common");
|
|
48
49
|
jest.useFakeTimers().setSystemTime(new Date("2014-04-21"));
|
|
49
|
-
const currency = Object.assign(Object.assign({}, (0, cryptoassets_1.getCryptoCurrencyById)("ethereum")), { ethereumLikeInfo: {
|
|
50
|
-
chainId: 1,
|
|
51
|
-
rpc: "https://my-rpc.com",
|
|
52
|
-
explorer: {
|
|
53
|
-
uri: "https://api.com",
|
|
54
|
-
type: "etherscan",
|
|
55
|
-
},
|
|
56
|
-
} });
|
|
57
50
|
const getAccountShapeParameters = {
|
|
58
51
|
address: "0xkvn",
|
|
59
|
-
currency,
|
|
52
|
+
currency: synchronization_fixtures_1.currency,
|
|
60
53
|
derivationMode: "",
|
|
61
54
|
derivationPath: "44'/60'/0'/0/0",
|
|
62
55
|
index: 0,
|
|
63
56
|
};
|
|
64
|
-
const tokenCurrency1 = (0, cryptoassets_1.getTokenById)("ethereum/erc20/usd__coin");
|
|
65
|
-
const tokenCurrency2 = (0, cryptoassets_1.getTokenById)("ethereum/erc20/usd_tether__erc20_");
|
|
66
|
-
const tokenAccount = (0, testUtils_1.makeTokenAccount)("0xkvn", tokenCurrency1);
|
|
67
|
-
const account = Object.assign(Object.assign({}, (0, testUtils_1.makeAccount)("0xkvn", currency, [tokenAccount])), { syncHash: logic.getSyncHash(currency) });
|
|
68
|
-
const coinOperation1 = (0, testUtils_1.makeOperation)({
|
|
69
|
-
hash: "0xH4sH",
|
|
70
|
-
accountId: "js:2:ethereum:0xkvn:",
|
|
71
|
-
blockHash: "0x8df71a12a8c06b36c06c26bf6248857dd2a2b75b6edbb4e33e9477078897b282",
|
|
72
|
-
senders: ["0xd48f2332Eeed88243Cb6b1D0d65a10368A5370f0"],
|
|
73
|
-
transactionSequenceNumber: 1,
|
|
74
|
-
date: new Date(),
|
|
75
|
-
blockHeight: 1,
|
|
76
|
-
});
|
|
77
|
-
const coinOperation2 = (0, testUtils_1.makeOperation)({
|
|
78
|
-
hash: "0xOtherHash",
|
|
79
|
-
accountId: "js:2:ethereum:0xkvn:",
|
|
80
|
-
transactionSequenceNumber: 2,
|
|
81
|
-
date: new Date(Date.now() + 1),
|
|
82
|
-
blockHeight: 100,
|
|
83
|
-
});
|
|
84
|
-
const coinOperation3 = (0, testUtils_1.makeOperation)({
|
|
85
|
-
hash: "0xYeTAnOtherHash",
|
|
86
|
-
accountId: "js:2:ethereum:0xkvn:",
|
|
87
|
-
transactionSequenceNumber: 5,
|
|
88
|
-
date: new Date(Date.now() + 2),
|
|
89
|
-
blockHeight: 1000,
|
|
90
|
-
});
|
|
91
|
-
const tokenOperation1 = (0, testUtils_1.makeOperation)({
|
|
92
|
-
hash: "0xH4sHT0k3n",
|
|
93
|
-
accountId: "js:2:ethereum:0xkvn:+ethereum%2Ferc20%2Fusd__coin",
|
|
94
|
-
blockHash: "0x95dc138a02c1b0e3fd49305f785e8e27e88a885004af13a9b4c62ad94eed07dd",
|
|
95
|
-
recipients: ["0xB0B"],
|
|
96
|
-
senders: ["0x9b744C0451D73C0958d8aA566dAd33022E4Ee797"],
|
|
97
|
-
contract: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
|
|
98
|
-
value: new bignumber_js_1.default(152021496),
|
|
99
|
-
fee: new bignumber_js_1.default(1935663357068271),
|
|
100
|
-
type: "OUT",
|
|
101
|
-
date: new Date(),
|
|
102
|
-
blockHeight: 10,
|
|
103
|
-
});
|
|
104
|
-
const tokenOperation2 = (0, testUtils_1.makeOperation)({
|
|
105
|
-
hash: "0xTokenHashAga1n",
|
|
106
|
-
accountId: "js:2:ethereum:0xkvn:+ethereum%2Ferc20%2Fusd__coin",
|
|
107
|
-
contract: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
|
|
108
|
-
date: new Date(Date.now() + 1),
|
|
109
|
-
blockHeight: 1000,
|
|
110
|
-
});
|
|
111
|
-
const tokenOperation3 = (0, testUtils_1.makeOperation)({
|
|
112
|
-
hash: "0xTokenHashAga1n",
|
|
113
|
-
accountId: "js:2:ethereum:0xkvn:+ethereum%2Ferc20%2Fusd__coin",
|
|
114
|
-
contract: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
|
|
115
|
-
date: new Date(Date.now() + 2),
|
|
116
|
-
blockHeight: 10000,
|
|
117
|
-
});
|
|
118
|
-
const tokenOperation4 = (0, testUtils_1.makeOperation)({
|
|
119
|
-
hash: "0xTokenHashOtherToken",
|
|
120
|
-
accountId: "js:2:ethereum:0xkvn:+ethereum%2Ferc20%2Fusd_tether__erc20_",
|
|
121
|
-
contract: "0xdac17f958d2ee523a2206206994597c13d831ec7",
|
|
122
|
-
date: new Date(Date.now() + 3),
|
|
123
|
-
blockHeight: 11000,
|
|
124
|
-
});
|
|
125
|
-
const ignoredTokenOperation = (0, testUtils_1.makeOperation)({
|
|
126
|
-
hash: "0xigN0r3Me",
|
|
127
|
-
accountId: "js:2:ethereum:0xkvn:+ethereum%2Ferc20%2Fusd_tether__erc20_",
|
|
128
|
-
contract: "0xUnknownContract",
|
|
129
|
-
date: new Date(Date.now() + 4),
|
|
130
|
-
blockHeight: 12000,
|
|
131
|
-
});
|
|
132
|
-
const pendingOperation = (0, testUtils_1.makeOperation)({
|
|
133
|
-
hash: "123",
|
|
134
|
-
});
|
|
135
57
|
describe("EVM Family", () => {
|
|
136
58
|
describe("synchronization.ts", () => {
|
|
137
59
|
describe("getAccountShape", () => {
|
|
138
60
|
beforeEach(() => {
|
|
139
61
|
// Mocking getAccount to prevent network calls
|
|
140
62
|
jest.spyOn(rpcAPI, "getBalanceAndBlock").mockImplementation(() => Promise.resolve({
|
|
141
|
-
blockHeight:
|
|
63
|
+
blockHeight: 6969,
|
|
142
64
|
balance: new bignumber_js_1.default(100),
|
|
143
65
|
}));
|
|
144
66
|
jest.spyOn(rpcAPI, "getSubAccount").mockImplementation(() => Promise.resolve({
|
|
@@ -152,7 +74,7 @@ describe("EVM Family", () => {
|
|
|
152
74
|
});
|
|
153
75
|
it("should throw for currency without ethereumLikeInfo", () => __awaiter(void 0, void 0, void 0, function* () {
|
|
154
76
|
try {
|
|
155
|
-
yield synchronization.getAccountShape(Object.assign(Object.assign({}, getAccountShapeParameters), { currency: Object.assign(Object.assign({}, currency), { ethereumLikeInfo: undefined }) }), {});
|
|
77
|
+
yield synchronization.getAccountShape(Object.assign(Object.assign({}, getAccountShapeParameters), { currency: Object.assign(Object.assign({}, synchronization_fixtures_1.currency), { ethereumLikeInfo: undefined }) }), {});
|
|
156
78
|
(0, assert_1.fail)("Promise should have been rejected");
|
|
157
79
|
}
|
|
158
80
|
catch (e) {
|
|
@@ -164,7 +86,7 @@ describe("EVM Family", () => {
|
|
|
164
86
|
}));
|
|
165
87
|
it("should throw for currency with unsupported explorer", () => __awaiter(void 0, void 0, void 0, function* () {
|
|
166
88
|
try {
|
|
167
|
-
yield synchronization.getAccountShape(Object.assign(Object.assign({}, getAccountShapeParameters), { currency: Object.assign(Object.assign({}, currency), { ethereumLikeInfo: {
|
|
89
|
+
yield synchronization.getAccountShape(Object.assign(Object.assign({}, getAccountShapeParameters), { currency: Object.assign(Object.assign({}, synchronization_fixtures_1.currency), { ethereumLikeInfo: {
|
|
168
90
|
chainId: 1,
|
|
169
91
|
explorer: {
|
|
170
92
|
uri: "http://nope.com",
|
|
@@ -182,28 +104,26 @@ describe("EVM Family", () => {
|
|
|
182
104
|
}));
|
|
183
105
|
describe("With no transactions fetched", () => {
|
|
184
106
|
beforeAll(() => {
|
|
185
|
-
jest
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
.spyOn(etherscanAPI === null || etherscanAPI === void 0 ? void 0 : etherscanAPI.default, "getLastTokenOperations")
|
|
196
|
-
.mockImplementation(() => Promise.resolve([]));
|
|
107
|
+
jest.spyOn(etherscanAPI, "getLastOperations").mockImplementation(() => Promise.resolve({
|
|
108
|
+
lastCoinOperations: [],
|
|
109
|
+
lastTokenOperations: [],
|
|
110
|
+
lastNftOperations: [],
|
|
111
|
+
}));
|
|
112
|
+
jest.spyOn(etherscanAPI === null || etherscanAPI === void 0 ? void 0 : etherscanAPI.default, "getLastOperations").mockImplementation(() => Promise.resolve({
|
|
113
|
+
lastCoinOperations: [],
|
|
114
|
+
lastTokenOperations: [],
|
|
115
|
+
lastNftOperations: [],
|
|
116
|
+
}));
|
|
197
117
|
});
|
|
198
118
|
afterAll(() => {
|
|
199
119
|
jest.restoreAllMocks();
|
|
200
120
|
});
|
|
201
121
|
it("should return an account with a valid id", () => __awaiter(void 0, void 0, void 0, function* () {
|
|
202
122
|
const account = yield synchronization.getAccountShape(getAccountShapeParameters, {});
|
|
203
|
-
expect((0,
|
|
123
|
+
expect((0, accountId_1.decodeAccountId)(account.id || "")).toEqual({
|
|
204
124
|
type: "js",
|
|
205
125
|
version: "2",
|
|
206
|
-
currencyId: currency.id,
|
|
126
|
+
currencyId: synchronization_fixtures_1.currency.id,
|
|
207
127
|
xpubOrAddress: "0xkvn",
|
|
208
128
|
derivationMode: "",
|
|
209
129
|
});
|
|
@@ -219,47 +139,47 @@ describe("EVM Family", () => {
|
|
|
219
139
|
}));
|
|
220
140
|
it("should return an account with the correct block height", () => __awaiter(void 0, void 0, void 0, function* () {
|
|
221
141
|
const account = yield synchronization.getAccountShape(getAccountShapeParameters, {});
|
|
222
|
-
expect(account.blockHeight).toBe(
|
|
142
|
+
expect(account.blockHeight).toBe(6969);
|
|
223
143
|
}));
|
|
224
144
|
it("should keep the operations from a sync to another", () => __awaiter(void 0, void 0, void 0, function* () {
|
|
225
145
|
var _b;
|
|
226
|
-
const operations = [
|
|
227
|
-
const
|
|
228
|
-
const accountWithSubAccount = yield synchronization.getAccountShape(Object.assign(Object.assign({}, getAccountShapeParameters), { initialAccount: Object.assign(Object.assign({}, account), { operations, subAccounts: [Object.assign(Object.assign({}, tokenAccount), { operations:
|
|
146
|
+
const operations = [synchronization_fixtures_1.coinOperations[0]];
|
|
147
|
+
const tokenOps = [synchronization_fixtures_1.tokenOperations[0]];
|
|
148
|
+
const accountWithSubAccount = yield synchronization.getAccountShape(Object.assign(Object.assign({}, getAccountShapeParameters), { initialAccount: Object.assign(Object.assign({}, synchronization_fixtures_1.account), { operations, subAccounts: [Object.assign(Object.assign({}, synchronization_fixtures_1.tokenAccount), { operations: tokenOps })] }) }), {});
|
|
229
149
|
expect(accountWithSubAccount.operations).toBe(operations);
|
|
230
|
-
expect((_b = accountWithSubAccount === null || accountWithSubAccount === void 0 ? void 0 : accountWithSubAccount.subAccounts) === null || _b === void 0 ? void 0 : _b[0].operations).toBe(
|
|
150
|
+
expect((_b = accountWithSubAccount === null || accountWithSubAccount === void 0 ? void 0 : accountWithSubAccount.subAccounts) === null || _b === void 0 ? void 0 : _b[0].operations).toBe(tokenOps);
|
|
231
151
|
}));
|
|
232
152
|
it("should do a full sync when syncHash changes", () => __awaiter(void 0, void 0, void 0, function* () {
|
|
233
153
|
jest.spyOn(logic, "getSyncHash").mockImplementationOnce(() => "0xNope");
|
|
234
|
-
yield synchronization.getAccountShape(Object.assign(Object.assign({}, getAccountShapeParameters), { initialAccount: Object.assign(Object.assign({}, account), { operations: [
|
|
235
|
-
expect(etherscanAPI === null || etherscanAPI === void 0 ? void 0 : etherscanAPI.default.
|
|
236
|
-
expect(etherscanAPI === null || etherscanAPI === void 0 ? void 0 : etherscanAPI.default.getLastTokenOperations).toHaveBeenCalledWith(getAccountShapeParameters.currency, getAccountShapeParameters.address, account.id, 0);
|
|
154
|
+
yield synchronization.getAccountShape(Object.assign(Object.assign({}, getAccountShapeParameters), { initialAccount: Object.assign(Object.assign({}, synchronization_fixtures_1.account), { operations: [synchronization_fixtures_1.coinOperations[0]], subAccounts: [Object.assign(Object.assign({}, synchronization_fixtures_1.tokenAccount), { operations: [synchronization_fixtures_1.tokenOperations[0]] })] }) }), {});
|
|
155
|
+
expect(etherscanAPI === null || etherscanAPI === void 0 ? void 0 : etherscanAPI.default.getLastOperations).toHaveBeenCalledWith(getAccountShapeParameters.currency, getAccountShapeParameters.address, synchronization_fixtures_1.account.id, 0, 6969);
|
|
237
156
|
}));
|
|
238
|
-
it("should do
|
|
239
|
-
yield synchronization.getAccountShape(Object.assign(Object.assign({}, getAccountShapeParameters), { initialAccount: Object.assign(Object.assign({}, account), { operations: [
|
|
240
|
-
expect(etherscanAPI === null || etherscanAPI === void 0 ? void 0 : etherscanAPI.default.
|
|
241
|
-
expect(etherscanAPI === null || etherscanAPI === void 0 ? void 0 : etherscanAPI.default.getLastTokenOperations).toHaveBeenCalledWith(getAccountShapeParameters.currency, getAccountShapeParameters.address, account.id, tokenOperation1.blockHeight);
|
|
157
|
+
it("should do an incremental sync when syncHash is identical", () => __awaiter(void 0, void 0, void 0, function* () {
|
|
158
|
+
yield synchronization.getAccountShape(Object.assign(Object.assign({}, getAccountShapeParameters), { initialAccount: Object.assign(Object.assign({}, synchronization_fixtures_1.account), { operations: [synchronization_fixtures_1.coinOperations[2]], subAccounts: [Object.assign(Object.assign({}, synchronization_fixtures_1.tokenAccount), { operations: [synchronization_fixtures_1.tokenOperations[0]] })] }) }), {});
|
|
159
|
+
expect(etherscanAPI === null || etherscanAPI === void 0 ? void 0 : etherscanAPI.default.getLastOperations).toHaveBeenCalledWith(getAccountShapeParameters.currency, getAccountShapeParameters.address, synchronization_fixtures_1.account.id, synchronization_fixtures_1.coinOperations[2].blockHeight - synchronization.SAFE_REORG_THRESHOLD, 6969);
|
|
242
160
|
}));
|
|
243
161
|
});
|
|
244
162
|
describe("With transactions fetched", () => {
|
|
245
163
|
beforeAll(() => {
|
|
246
164
|
jest
|
|
247
|
-
.spyOn(etherscanAPI
|
|
248
|
-
.mockImplementation(() => Promise.resolve([
|
|
249
|
-
jest
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
},
|
|
165
|
+
.spyOn(etherscanAPI, "getLastCoinOperations")
|
|
166
|
+
.mockImplementation(() => Promise.resolve([Object.assign({}, synchronization_fixtures_1.coinOperations[0]), Object.assign({}, synchronization_fixtures_1.coinOperations[1])]));
|
|
167
|
+
jest
|
|
168
|
+
.spyOn(etherscanAPI, "getLastTokenOperations")
|
|
169
|
+
.mockImplementation(() => Promise.resolve([Object.assign({}, synchronization_fixtures_1.tokenOperations[0]), Object.assign({}, synchronization_fixtures_1.tokenOperations[1])]));
|
|
170
|
+
jest
|
|
171
|
+
.spyOn(etherscanAPI, "getLastNftOperations")
|
|
172
|
+
.mockImplementation(() => Promise.resolve([
|
|
173
|
+
Object.assign({}, synchronization_fixtures_1.erc721Operations[0]),
|
|
174
|
+
Object.assign({}, synchronization_fixtures_1.erc721Operations[1]),
|
|
175
|
+
Object.assign({}, synchronization_fixtures_1.erc721Operations[2]),
|
|
176
|
+
Object.assign({}, synchronization_fixtures_1.erc1155Operations[0]),
|
|
177
|
+
Object.assign({}, synchronization_fixtures_1.erc1155Operations[1]),
|
|
258
178
|
]));
|
|
259
179
|
jest
|
|
260
180
|
.spyOn(rpcAPI, "getTokenBalance")
|
|
261
181
|
.mockImplementation((a, b, contractAddress) => __awaiter(void 0, void 0, void 0, function* () {
|
|
262
|
-
if (contractAddress ===
|
|
182
|
+
if (contractAddress === synchronization_fixtures_1.tokenCurrencies[0].contractAddress) {
|
|
263
183
|
return new bignumber_js_1.default(10000);
|
|
264
184
|
}
|
|
265
185
|
throw new Error("Shouldn't be trying to fetch this token balance");
|
|
@@ -270,64 +190,71 @@ describe("EVM Family", () => {
|
|
|
270
190
|
});
|
|
271
191
|
it("should add the fetched transactions to the operations", () => __awaiter(void 0, void 0, void 0, function* () {
|
|
272
192
|
var _a, _b;
|
|
273
|
-
const accountShape = yield synchronization.getAccountShape(Object.assign(Object.assign({}, getAccountShapeParameters), { initialAccount: account }), {});
|
|
274
|
-
expect(accountShape.operations).toEqual([
|
|
193
|
+
const accountShape = yield synchronization.getAccountShape(Object.assign(Object.assign({}, getAccountShapeParameters), { initialAccount: synchronization_fixtures_1.account }), {});
|
|
194
|
+
expect(accountShape.operations).toEqual([
|
|
195
|
+
Object.assign(Object.assign({}, synchronization_fixtures_1.coinOperations[1]), { nftOperations: [synchronization_fixtures_1.erc721Operations[1], synchronization_fixtures_1.erc721Operations[2], synchronization_fixtures_1.erc1155Operations[1]] }),
|
|
196
|
+
Object.assign(Object.assign({}, synchronization_fixtures_1.tokenOperations[1]), { id: `js:2:ethereum:0xkvn:-${synchronization_fixtures_1.tokenOperations[1].hash}-NONE`, type: "NONE", value: new bignumber_js_1.default(0), fee: new bignumber_js_1.default(0), senders: [], recipients: [], subOperations: [synchronization_fixtures_1.tokenOperations[1]], accountId: "", contract: undefined }),
|
|
197
|
+
Object.assign(Object.assign({}, synchronization_fixtures_1.coinOperations[0]), { subOperations: [synchronization_fixtures_1.tokenOperations[0]], nftOperations: [synchronization_fixtures_1.erc721Operations[0], synchronization_fixtures_1.erc1155Operations[0]] }),
|
|
198
|
+
]);
|
|
275
199
|
expect((_b = (_a = accountShape === null || accountShape === void 0 ? void 0 : accountShape.subAccounts) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.operations).toEqual([
|
|
276
|
-
|
|
277
|
-
|
|
200
|
+
synchronization_fixtures_1.tokenOperations[1],
|
|
201
|
+
synchronization_fixtures_1.tokenOperations[0],
|
|
278
202
|
]);
|
|
279
203
|
}));
|
|
204
|
+
it("should add aggregated NFTs to the account", () => __awaiter(void 0, void 0, void 0, function* () {
|
|
205
|
+
const accountShape = yield synchronization.getAccountShape(Object.assign(Object.assign({}, getAccountShapeParameters), { initialAccount: synchronization_fixtures_1.account }), {});
|
|
206
|
+
expect(accountShape.nfts).toEqual([synchronization_fixtures_1.nfts[0], synchronization_fixtures_1.nfts[1]]);
|
|
207
|
+
}));
|
|
280
208
|
it("should return a partial account based on blockHeight", () => __awaiter(void 0, void 0, void 0, function* () {
|
|
281
|
-
jest
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
209
|
+
jest.spyOn(etherscanAPI === null || etherscanAPI === void 0 ? void 0 : etherscanAPI.default, "getLastOperations").mockImplementation(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
210
|
+
return ({
|
|
211
|
+
lastTokenOperations: [],
|
|
212
|
+
lastNftOperations: [],
|
|
213
|
+
lastCoinOperations: [synchronization_fixtures_1.coinOperations[2]],
|
|
214
|
+
});
|
|
215
|
+
}));
|
|
216
|
+
const operations = [
|
|
217
|
+
Object.assign(Object.assign({}, synchronization_fixtures_1.coinOperations[1]), { nftOperations: [synchronization_fixtures_1.erc721Operations[1], synchronization_fixtures_1.erc721Operations[2], synchronization_fixtures_1.erc1155Operations[1]] }),
|
|
218
|
+
Object.assign(Object.assign({}, synchronization_fixtures_1.coinOperations[0]), { nftOperations: [synchronization_fixtures_1.erc721Operations[0], synchronization_fixtures_1.erc1155Operations[0]] }),
|
|
219
|
+
];
|
|
220
|
+
const accountShape = yield synchronization.getAccountShape(Object.assign(Object.assign({}, getAccountShapeParameters), { initialAccount: Object.assign(Object.assign({}, synchronization_fixtures_1.account), { operations }) }), {});
|
|
286
221
|
expect(accountShape).toEqual({
|
|
287
222
|
type: "Account",
|
|
288
|
-
id: account.id,
|
|
223
|
+
id: synchronization_fixtures_1.account.id,
|
|
289
224
|
syncHash: expect.stringMatching(/^0x[A-Fa-f0-9]{64}$/),
|
|
290
225
|
balance: new bignumber_js_1.default(100),
|
|
291
226
|
spendableBalance: new bignumber_js_1.default(100),
|
|
292
|
-
|
|
293
|
-
|
|
227
|
+
nfts: [synchronization_fixtures_1.nfts[0], synchronization_fixtures_1.nfts[1]],
|
|
228
|
+
blockHeight: 6969,
|
|
229
|
+
operations: [synchronization_fixtures_1.coinOperations[2], ...operations],
|
|
294
230
|
operationsCount: 3,
|
|
295
|
-
subAccounts:
|
|
296
|
-
Object.assign(Object.assign({}, tokenAccount), { balance: new bignumber_js_1.default(10000), spendableBalance: new bignumber_js_1.default(10000), operations: [tokenOperation2, tokenOperation1], operationsCount: 2 }),
|
|
297
|
-
],
|
|
231
|
+
subAccounts: synchronization_fixtures_1.account.subAccounts,
|
|
298
232
|
lastSyncDate: new Date("2014-04-21"),
|
|
299
233
|
});
|
|
300
234
|
}));
|
|
301
235
|
});
|
|
302
236
|
describe("With pending operations", () => {
|
|
303
237
|
beforeAll(() => {
|
|
304
|
-
jest
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
.mockImplementation(() => Promise.resolve([]));
|
|
310
|
-
jest
|
|
311
|
-
.spyOn(etherscanAPI, "getLastTokenOperations")
|
|
312
|
-
.mockImplementation(() => Promise.resolve([]));
|
|
313
|
-
jest
|
|
314
|
-
.spyOn(etherscanAPI === null || etherscanAPI === void 0 ? void 0 : etherscanAPI.default, "getLastTokenOperations")
|
|
315
|
-
.mockImplementation(() => Promise.resolve([]));
|
|
238
|
+
jest.spyOn(etherscanAPI === null || etherscanAPI === void 0 ? void 0 : etherscanAPI.default, "getLastOperations").mockImplementation(() => Promise.resolve({
|
|
239
|
+
lastCoinOperations: [],
|
|
240
|
+
lastTokenOperations: [],
|
|
241
|
+
lastNftOperations: [],
|
|
242
|
+
}));
|
|
316
243
|
jest
|
|
317
244
|
.spyOn(synchronization, "getOperationStatus")
|
|
318
|
-
.mockImplementation((currency, op) => Promise.resolve(op.hash ===
|
|
245
|
+
.mockImplementation((currency, op) => Promise.resolve(op.hash === synchronization_fixtures_1.coinOperations[0].hash ? synchronization_fixtures_1.coinOperations[0] : null));
|
|
319
246
|
});
|
|
320
247
|
afterAll(() => {
|
|
321
248
|
jest.restoreAllMocks();
|
|
322
249
|
});
|
|
323
250
|
it("should add the confirmed pending operation to the operations", () => __awaiter(void 0, void 0, void 0, function* () {
|
|
324
|
-
const accountShape = yield synchronization.getAccountShape(Object.assign(Object.assign({}, getAccountShapeParameters), { initialAccount: Object.assign(Object.assign({}, account), {
|
|
251
|
+
const accountShape = yield synchronization.getAccountShape(Object.assign(Object.assign({}, getAccountShapeParameters), { initialAccount: Object.assign(Object.assign({}, synchronization_fixtures_1.account), {
|
|
325
252
|
// 2 operations to confirm here, they're differenciated by id
|
|
326
253
|
pendingOperations: [
|
|
327
|
-
|
|
328
|
-
Object.assign(Object.assign({},
|
|
254
|
+
synchronization_fixtures_1.coinOperations[0],
|
|
255
|
+
Object.assign(Object.assign({}, synchronization_fixtures_1.coinOperations[0]), { hash: "0xN0tH4sH", id: "js:2:ethereum:0xkvn:-0xN0tH4sH-OUT" }),
|
|
329
256
|
] }) }), {});
|
|
330
|
-
expect(accountShape.operations).toEqual([
|
|
257
|
+
expect(accountShape.operations).toEqual([synchronization_fixtures_1.coinOperations[0]]);
|
|
331
258
|
}));
|
|
332
259
|
});
|
|
333
260
|
});
|
|
@@ -348,56 +275,11 @@ describe("EVM Family", () => {
|
|
|
348
275
|
jest.restoreAllMocks();
|
|
349
276
|
});
|
|
350
277
|
it("should return the right subAccounts", () => __awaiter(void 0, void 0, void 0, function* () {
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
{ tokenCurrency: tokenCurrency1, operation: tokenOperation2 },
|
|
355
|
-
{ tokenCurrency: tokenCurrency2, operation: tokenOperation4 },
|
|
356
|
-
{
|
|
357
|
-
tokenCurrency: undefined,
|
|
358
|
-
operation: ignoredTokenOperation,
|
|
359
|
-
},
|
|
360
|
-
];
|
|
361
|
-
}));
|
|
362
|
-
const tokenAccounts = yield synchronization.getSubAccounts(Object.assign(Object.assign({}, getAccountShapeParameters), { initialAccount: account }), account.id);
|
|
363
|
-
const expectedUsdcAccount = Object.assign(Object.assign({}, tokenAccount), { balance: new bignumber_js_1.default(1), spendableBalance: new bignumber_js_1.default(1), operations: [tokenOperation1, tokenOperation2], operationsCount: 2, starred: undefined, swapHistory: [] });
|
|
364
|
-
const expectedUsdtAccount = Object.assign(Object.assign({}, (0, testUtils_1.makeTokenAccount)(account.freshAddress, tokenCurrency2)), { balance: new bignumber_js_1.default(2), spendableBalance: new bignumber_js_1.default(2), operations: [tokenOperation4], operationsCount: 1, starred: undefined, swapHistory: [] });
|
|
278
|
+
const tokenAccounts = yield synchronization.getSubAccounts(Object.assign(Object.assign({}, getAccountShapeParameters), { initialAccount: synchronization_fixtures_1.account }), synchronization_fixtures_1.account.id, [synchronization_fixtures_1.tokenOperations[0], synchronization_fixtures_1.tokenOperations[1], synchronization_fixtures_1.tokenOperations[3]]);
|
|
279
|
+
const expectedUsdcAccount = Object.assign(Object.assign({}, synchronization_fixtures_1.tokenAccount), { balance: new bignumber_js_1.default(1), spendableBalance: new bignumber_js_1.default(1), operations: [synchronization_fixtures_1.tokenOperations[0], synchronization_fixtures_1.tokenOperations[1]], operationsCount: 2, starred: undefined, swapHistory: [] });
|
|
280
|
+
const expectedUsdtAccount = Object.assign(Object.assign({}, (0, common_fixtures_1.makeTokenAccount)(synchronization_fixtures_1.account.freshAddress, synchronization_fixtures_1.tokenCurrencies[1])), { balance: new bignumber_js_1.default(2), spendableBalance: new bignumber_js_1.default(2), operations: [synchronization_fixtures_1.tokenOperations[3]], operationsCount: 1, starred: undefined, swapHistory: [] });
|
|
365
281
|
expect(tokenAccounts).toEqual([expectedUsdcAccount, expectedUsdtAccount]);
|
|
366
282
|
}));
|
|
367
|
-
it("should return a partial sub account based on blockHeight", () => __awaiter(void 0, void 0, void 0, function* () {
|
|
368
|
-
jest
|
|
369
|
-
.spyOn(etherscanAPI === null || etherscanAPI === void 0 ? void 0 : etherscanAPI.default, "getLastTokenOperations")
|
|
370
|
-
.mockImplementation(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
371
|
-
return [
|
|
372
|
-
{ tokenCurrency: tokenCurrency1, operation: tokenOperation3 },
|
|
373
|
-
];
|
|
374
|
-
}));
|
|
375
|
-
const incompleteUsdcAccount = Object.assign(Object.assign({}, tokenAccount), { balance: new bignumber_js_1.default(0), spendableBalance: new bignumber_js_1.default(0), operations: [tokenOperation1, tokenOperation2], operationsCount: 1 });
|
|
376
|
-
const accountWithIncompleteSubAccount = Object.assign(Object.assign({}, account), { subAccounts: [incompleteUsdcAccount] });
|
|
377
|
-
const tokenAccounts = yield synchronization.getSubAccounts(Object.assign(Object.assign({}, getAccountShapeParameters), { initialAccount: accountWithIncompleteSubAccount }), account.id);
|
|
378
|
-
const expectedUsdcAccount = Object.assign(Object.assign({}, incompleteUsdcAccount), { balance: new bignumber_js_1.default(1), spendableBalance: new bignumber_js_1.default(1), operations: [tokenOperation3], operationsCount: 1, starred: undefined, swapHistory: [] });
|
|
379
|
-
expect(tokenAccounts).toEqual([expectedUsdcAccount]);
|
|
380
|
-
// (currency, address, accountId, fromBlock)
|
|
381
|
-
expect(etherscanAPI.default.getLastTokenOperations).toBeCalledWith(currency, account.freshAddress, account.id, tokenOperation2.blockHeight);
|
|
382
|
-
}));
|
|
383
|
-
it("should throw for currency with unsupported explorer", () => __awaiter(void 0, void 0, void 0, function* () {
|
|
384
|
-
try {
|
|
385
|
-
yield synchronization.getSubAccounts(Object.assign(Object.assign({}, getAccountShapeParameters), { currency: Object.assign(Object.assign({}, currency), { ethereumLikeInfo: {
|
|
386
|
-
chainId: 1,
|
|
387
|
-
explorer: {
|
|
388
|
-
uri: "http://nope.com",
|
|
389
|
-
type: "unsupported",
|
|
390
|
-
},
|
|
391
|
-
} }) }), account.id);
|
|
392
|
-
(0, assert_1.fail)("Promise should have been rejected");
|
|
393
|
-
}
|
|
394
|
-
catch (e) {
|
|
395
|
-
if (e instanceof assert_1.AssertionError) {
|
|
396
|
-
throw e;
|
|
397
|
-
}
|
|
398
|
-
expect(e.message).toMatch("No explorer found for currency");
|
|
399
|
-
}
|
|
400
|
-
}));
|
|
401
283
|
});
|
|
402
284
|
describe("getSubAccountShape", () => {
|
|
403
285
|
beforeEach(() => {
|
|
@@ -416,8 +298,8 @@ describe("EVM Family", () => {
|
|
|
416
298
|
jest.restoreAllMocks();
|
|
417
299
|
});
|
|
418
300
|
it("should return a correct sub account shape", () => __awaiter(void 0, void 0, void 0, function* () {
|
|
419
|
-
const subAccount = yield synchronization.getSubAccountShape(currency, account.id,
|
|
420
|
-
expect(subAccount).toEqual(Object.assign(Object.assign({}, tokenAccount), { balance: new bignumber_js_1.default(1), spendableBalance: new bignumber_js_1.default(1), operations: [
|
|
301
|
+
const subAccount = yield synchronization.getSubAccountShape(synchronization_fixtures_1.currency, synchronization_fixtures_1.account.id, synchronization_fixtures_1.tokenCurrencies[0], [synchronization_fixtures_1.tokenOperations[0], synchronization_fixtures_1.tokenOperations[1], synchronization_fixtures_1.tokenOperations[2]]);
|
|
302
|
+
expect(subAccount).toEqual(Object.assign(Object.assign({}, synchronization_fixtures_1.tokenAccount), { balance: new bignumber_js_1.default(1), spendableBalance: new bignumber_js_1.default(1), operations: [synchronization_fixtures_1.tokenOperations[0], synchronization_fixtures_1.tokenOperations[1], synchronization_fixtures_1.tokenOperations[2]], operationsCount: 3, starred: undefined, swapHistory: [] }));
|
|
421
303
|
}));
|
|
422
304
|
});
|
|
423
305
|
describe("getOperationStatus", () => {
|
|
@@ -425,7 +307,8 @@ describe("EVM Family", () => {
|
|
|
425
307
|
jest.spyOn(rpcAPI, "getTransaction").mockImplementationOnce(() => {
|
|
426
308
|
throw new Error();
|
|
427
309
|
});
|
|
428
|
-
|
|
310
|
+
const operationStatus = yield synchronization.getOperationStatus(synchronization_fixtures_1.currency, synchronization_fixtures_1.coinOperations[0]);
|
|
311
|
+
expect(operationStatus).toBe(null);
|
|
429
312
|
}));
|
|
430
313
|
it("should return null if retrieved transaction has no blockHeight", () => __awaiter(void 0, void 0, void 0, function* () {
|
|
431
314
|
jest.spyOn(rpcAPI, "getTransaction").mockImplementationOnce(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -435,7 +318,8 @@ describe("EVM Family", () => {
|
|
|
435
318
|
nonce: 1,
|
|
436
319
|
});
|
|
437
320
|
}));
|
|
438
|
-
|
|
321
|
+
const operationStatus = yield synchronization.getOperationStatus(synchronization_fixtures_1.currency, synchronization_fixtures_1.coinOperations[0]);
|
|
322
|
+
expect(operationStatus).toBe(null);
|
|
439
323
|
}));
|
|
440
324
|
it("should return the retrieved operation with network properties", () => __awaiter(void 0, void 0, void 0, function* () {
|
|
441
325
|
jest.spyOn(rpcAPI, "getTransaction").mockImplementationOnce(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -446,7 +330,19 @@ describe("EVM Family", () => {
|
|
|
446
330
|
nonce: 123,
|
|
447
331
|
});
|
|
448
332
|
}));
|
|
449
|
-
|
|
333
|
+
const expectedAddition = {
|
|
334
|
+
blockHash: "hash",
|
|
335
|
+
blockHeight: 10,
|
|
336
|
+
date: new Date(),
|
|
337
|
+
transactionSequenceNumber: 123,
|
|
338
|
+
};
|
|
339
|
+
const operationStatus = yield synchronization.getOperationStatus(synchronization_fixtures_1.currency, Object.assign(Object.assign({}, synchronization_fixtures_1.coinOperations[0]), { subOperations: [synchronization_fixtures_1.tokenOperations[0]], nftOperations: [synchronization_fixtures_1.erc721Operations[0], synchronization_fixtures_1.erc1155Operations[0]] }));
|
|
340
|
+
expect(operationStatus).toEqual(Object.assign(Object.assign(Object.assign({}, synchronization_fixtures_1.coinOperations[0]), expectedAddition), { subOperations: [
|
|
341
|
+
Object.assign(Object.assign({}, synchronization_fixtures_1.tokenOperations[0]), expectedAddition),
|
|
342
|
+
], nftOperations: [
|
|
343
|
+
Object.assign(Object.assign({}, synchronization_fixtures_1.erc721Operations[0]), expectedAddition),
|
|
344
|
+
Object.assign(Object.assign({}, synchronization_fixtures_1.erc1155Operations[0]), expectedAddition),
|
|
345
|
+
] }));
|
|
450
346
|
}));
|
|
451
347
|
it("should return the retrieved operation with network properties even if the rpc doesn't return timestamp", () => __awaiter(void 0, void 0, void 0, function* () {
|
|
452
348
|
jest.spyOn(rpcAPI, "getTransaction").mockImplementationOnce(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -459,39 +355,51 @@ describe("EVM Family", () => {
|
|
|
459
355
|
jest
|
|
460
356
|
.spyOn(rpcAPI, "getBlock")
|
|
461
357
|
.mockImplementationOnce(() => __awaiter(void 0, void 0, void 0, function* () { return ({ timestamp: Date.now() / 1000 }); }));
|
|
462
|
-
|
|
358
|
+
const expectedAddition = {
|
|
359
|
+
blockHash: "hash",
|
|
360
|
+
blockHeight: 10,
|
|
361
|
+
date: new Date(),
|
|
362
|
+
transactionSequenceNumber: 123,
|
|
363
|
+
};
|
|
364
|
+
const operationStatus = yield synchronization.getOperationStatus(synchronization_fixtures_1.currency, Object.assign(Object.assign({}, synchronization_fixtures_1.coinOperations[0]), { subOperations: [synchronization_fixtures_1.tokenOperations[0]], nftOperations: [synchronization_fixtures_1.erc721Operations[0], synchronization_fixtures_1.erc1155Operations[0]] }));
|
|
365
|
+
expect(operationStatus).toEqual(Object.assign(Object.assign(Object.assign({}, synchronization_fixtures_1.coinOperations[0]), expectedAddition), { subOperations: [
|
|
366
|
+
Object.assign(Object.assign({}, synchronization_fixtures_1.tokenOperations[0]), expectedAddition),
|
|
367
|
+
], nftOperations: [
|
|
368
|
+
Object.assign(Object.assign({}, synchronization_fixtures_1.erc721Operations[0]), expectedAddition),
|
|
369
|
+
Object.assign(Object.assign({}, synchronization_fixtures_1.erc1155Operations[0]), expectedAddition),
|
|
370
|
+
] }));
|
|
463
371
|
}));
|
|
464
372
|
});
|
|
465
373
|
describe("postSync", () => {
|
|
466
374
|
it("should return the freshly synced subAccounts", () => {
|
|
467
|
-
const tokenAccountWithPending = Object.assign(Object.assign({}, tokenAccount), { pendingOperations: [pendingOperation] });
|
|
468
|
-
const accountWithTokenAccount = Object.assign(Object.assign({}, account), { subAccounts: [tokenAccountWithPending] });
|
|
469
|
-
expect(synchronization.postSync(Object.assign(Object.assign({}, account), { subAccounts: [] }), accountWithTokenAccount)).toEqual(accountWithTokenAccount);
|
|
375
|
+
const tokenAccountWithPending = Object.assign(Object.assign({}, synchronization_fixtures_1.tokenAccount), { pendingOperations: [synchronization_fixtures_1.pendingOperation] });
|
|
376
|
+
const accountWithTokenAccount = Object.assign(Object.assign({}, synchronization_fixtures_1.account), { subAccounts: [tokenAccountWithPending] });
|
|
377
|
+
expect(synchronization.postSync(Object.assign(Object.assign({}, synchronization_fixtures_1.account), { subAccounts: [] }), accountWithTokenAccount)).toEqual(accountWithTokenAccount);
|
|
470
378
|
});
|
|
471
379
|
it("should remove pending operations if the main account has removed it", () => {
|
|
472
|
-
const tokenAccountWithPending = Object.assign(Object.assign({}, tokenAccount), { pendingOperations: [pendingOperation] });
|
|
473
|
-
const accountWithPending = Object.assign(Object.assign({}, account), { subAccounts: [tokenAccountWithPending], pendingOperations: [pendingOperation] });
|
|
380
|
+
const tokenAccountWithPending = Object.assign(Object.assign({}, synchronization_fixtures_1.tokenAccount), { pendingOperations: [synchronization_fixtures_1.pendingOperation] });
|
|
381
|
+
const accountWithPending = Object.assign(Object.assign({}, synchronization_fixtures_1.account), { subAccounts: [tokenAccountWithPending], pendingOperations: [synchronization_fixtures_1.pendingOperation] });
|
|
474
382
|
// should not change anything if we maintain the pending op
|
|
475
383
|
expect(synchronization.postSync(accountWithPending, accountWithPending)).toEqual(accountWithPending);
|
|
476
384
|
// Should remove the pending from tokenAccount as well if removed from main account
|
|
477
|
-
expect(synchronization.postSync(accountWithPending, Object.assign(Object.assign({}, accountWithPending), { pendingOperations: [] }))).toEqual(account);
|
|
385
|
+
expect(synchronization.postSync(accountWithPending, Object.assign(Object.assign({}, accountWithPending), { pendingOperations: [] }))).toEqual(synchronization_fixtures_1.account);
|
|
478
386
|
});
|
|
479
387
|
it("should remove pending operation if the token account has confirmed it", () => {
|
|
480
|
-
const tokenAccountWithPending = Object.assign(Object.assign({}, tokenAccount), { pendingOperations: [pendingOperation] });
|
|
481
|
-
const accountWithPending = Object.assign(Object.assign({}, account), { subAccounts: [tokenAccountWithPending], pendingOperations: [pendingOperation] });
|
|
388
|
+
const tokenAccountWithPending = Object.assign(Object.assign({}, synchronization_fixtures_1.tokenAccount), { pendingOperations: [synchronization_fixtures_1.pendingOperation] });
|
|
389
|
+
const accountWithPending = Object.assign(Object.assign({}, synchronization_fixtures_1.account), { subAccounts: [tokenAccountWithPending], pendingOperations: [synchronization_fixtures_1.pendingOperation] });
|
|
482
390
|
// Should remove the pending from tokenAccount if it was confirmed in the tokenAccount ops
|
|
483
|
-
expect(synchronization.postSync(accountWithPending, Object.assign(Object.assign({}, accountWithPending), { pendingOperations: [pendingOperation], subAccounts: [
|
|
484
|
-
Object.assign(Object.assign({}, tokenAccountWithPending), { operations: [pendingOperation] }),
|
|
391
|
+
expect(synchronization.postSync(accountWithPending, Object.assign(Object.assign({}, accountWithPending), { pendingOperations: [synchronization_fixtures_1.pendingOperation], subAccounts: [
|
|
392
|
+
Object.assign(Object.assign({}, tokenAccountWithPending), { operations: [synchronization_fixtures_1.pendingOperation] }),
|
|
485
393
|
] }))).toEqual(Object.assign(Object.assign({}, accountWithPending), { subAccounts: [
|
|
486
|
-
Object.assign(Object.assign({}, tokenAccountWithPending), { operations: [pendingOperation], pendingOperations: [] }),
|
|
394
|
+
Object.assign(Object.assign({}, tokenAccountWithPending), { operations: [synchronization_fixtures_1.pendingOperation], pendingOperations: [] }),
|
|
487
395
|
] }));
|
|
488
396
|
});
|
|
489
397
|
it("should remove pending operation if ", () => {
|
|
490
|
-
const latePending = Object.assign(Object.assign({}, pendingOperation), { date: new Date() + (0, env_1.getEnv)("OPERATION_OPTIMISTIC_RETENTION") + 1 });
|
|
491
|
-
const tokenAccountWithPending = Object.assign(Object.assign({}, tokenAccount), { pendingOperations: [latePending] });
|
|
492
|
-
const accountWithTokenAccount = Object.assign(Object.assign({}, account), { subAccounts: [tokenAccountWithPending] });
|
|
398
|
+
const latePending = Object.assign(Object.assign({}, synchronization_fixtures_1.pendingOperation), { date: new Date() + (0, env_1.getEnv)("OPERATION_OPTIMISTIC_RETENTION") + 1 });
|
|
399
|
+
const tokenAccountWithPending = Object.assign(Object.assign({}, synchronization_fixtures_1.tokenAccount), { pendingOperations: [latePending] });
|
|
400
|
+
const accountWithTokenAccount = Object.assign(Object.assign({}, synchronization_fixtures_1.account), { subAccounts: [tokenAccountWithPending] });
|
|
493
401
|
// Should remove the pending from tokenAccount if it was confirmed in the tokenAccount ops
|
|
494
|
-
expect(synchronization.postSync(accountWithTokenAccount, accountWithTokenAccount)).toEqual(account);
|
|
402
|
+
expect(synchronization.postSync(accountWithTokenAccount, accountWithTokenAccount)).toEqual(synchronization_fixtures_1.account);
|
|
495
403
|
});
|
|
496
404
|
});
|
|
497
405
|
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"synchronization.unit.test.js","sourceRoot":"","sources":["../../../src/__tests__/unit/synchronization.unit.test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gEAAqC;AACrC,mCAA8C;AAC9C,0EAA6E;AAE7E,iEAA+D;AAC/D,2EAA6D;AAC7D,uEAAyD;AACzD,iEAAmD;AACnD,yCAAyC;AACzC,mDAAqC;AACrC,mFAW8C;AAE9C,IAAI,CAAC,IAAI,CAAC,0BAA0B,CAAC,CAAC;AACtC,IAAI,CAAC,aAAa,EAAE,CAAC,aAAa,CAAC,IAAI,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;AAE3D,MAAM,yBAAyB,GAAqB;IAClD,OAAO,EAAE,OAAO;IAChB,QAAQ,EAAR,mCAAQ;IACR,cAAc,EAAE,EAAE;IAClB,cAAc,EAAE,gBAAgB;IAChC,KAAK,EAAE,CAAC;CACT,CAAC;AAEF,QAAQ,CAAC,YAAY,EAAE,GAAG,EAAE;IAC1B,QAAQ,CAAC,o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0F;gBAC1F,MAAM,CACJ,eAAe,CAAC,QAAQ,CAAC,kBAAkB,kCACtC,kBAAkB,KACrB,iBAAiB,EAAE,CAAC,2CAAgB,CAAC,EACrC,WAAW,EAAE;wDAEN,uBAAuB,KAC1B,UAAU,EAAE,CAAC,2CAAgB,CAAC;qBAEjC,IACD,CACH,CAAC,OAAO,iCACJ,kBAAkB,KACrB,WAAW,EAAE;wDAEN,uBAAuB,KAC1B,UAAU,EAAE,CAAC,2CAAgB,CAAC,EAC9B,iBAAiB,EAAE,EAAE;qBAExB,IACD,CAAC;YACL,CAAC,CAAC,CAAC;YAEH,EAAE,CAAC,qCAAqC,EAAE,GAAG,EAAE;gBAC7C,MAAM,WAAW,mCACZ,2CAAgB,KACnB,IAAI,EAAE,IAAI,IAAI,EAAE,GAAG,IAAA,YAAM,EAAC,gCAAgC,CAAC,GAAG,CAAC,GAChE,CAAC;gBACF,MAAM,uBAAuB,mCACxB,uCAAY,KACf,iBAAiB,EAAE,CAAC,WAAW,CAAC,GACjC,CAAC;gBACF,MAAM,uBAAuB,mCACxB,kCAAO,KACV,WAAW,EAAE,CAAC,uBAAuB,CAAC,GACvC,CAAC;gBAEF,0FAA0F;gBAC1F,MAAM,CAAC,eAAe,CAAC,QAAQ,CAAC,uBAAuB,EAAE,uBAAuB,CAAC,CAAC,CAAC,OAAO,CACxF,kCAAO,CACR,CAAC;YACJ,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transaction.unit.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/unit/transaction.unit.test.ts"],"names":[],"mappings":""}
|