@ledgerhq/live-common 27.0.0 → 27.1.0-next.1
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/lib/__tests__/families/bitcoin/wallet-btc/xpub.syncing.integration.test.js +2 -2
- package/lib/__tests__/test-helpers/environment.d.ts +2 -0
- package/lib/__tests__/test-helpers/environment.d.ts.map +1 -0
- package/lib/__tests__/test-helpers/environment.js +107 -0
- package/lib/__tests__/test-helpers/environment.js.map +1 -0
- package/lib/__tests__/test-helpers/setup.d.ts +1 -1
- package/lib/__tests__/test-helpers/setup.d.ts.map +1 -1
- package/lib/__tests__/test-helpers/setup.js +1 -101
- package/lib/__tests__/test-helpers/setup.js.map +1 -1
- package/lib/account/serialization.d.ts +2 -0
- package/lib/account/serialization.d.ts.map +1 -1
- package/lib/account/serialization.js +105 -47
- package/lib/account/serialization.js.map +1 -1
- package/lib/apps/support.d.ts.map +1 -1
- package/lib/apps/support.js +1 -0
- package/lib/apps/support.js.map +1 -1
- package/lib/bot/bot-test-context.d.ts +3 -0
- package/lib/bot/bot-test-context.d.ts.map +1 -0
- package/lib/bot/bot-test-context.js +26 -0
- package/lib/bot/bot-test-context.js.map +1 -0
- package/lib/bot/bot-test-context.test.d.ts +2 -0
- package/lib/bot/bot-test-context.test.d.ts.map +1 -0
- package/lib/bot/bot-test-context.test.js +41 -0
- package/lib/bot/bot-test-context.test.js.map +1 -0
- package/lib/bot/cli.d.ts +2 -0
- package/lib/bot/cli.d.ts.map +1 -0
- package/lib/bot/cli.js +14 -0
- package/lib/bot/cli.js.map +1 -0
- package/lib/bot/engine.d.ts +5 -5
- package/lib/bot/engine.d.ts.map +1 -1
- package/lib/bot/engine.js +161 -112
- package/lib/bot/engine.js.map +1 -1
- package/lib/bot/formatters.d.ts +2 -2
- package/lib/bot/formatters.d.ts.map +1 -1
- package/lib/bot/formatters.js +41 -15
- package/lib/bot/formatters.js.map +1 -1
- package/lib/bot/index.d.ts +1 -1
- package/lib/bot/index.d.ts.map +1 -1
- package/lib/bot/index.js +90 -15
- package/lib/bot/index.js.map +1 -1
- package/lib/bot/specs.d.ts +2 -1
- package/lib/bot/specs.d.ts.map +1 -1
- package/lib/bot/specs.js +13 -9
- package/lib/bot/specs.js.map +1 -1
- package/lib/bot/types.d.ts +5 -2
- package/lib/bot/types.d.ts.map +1 -1
- package/lib/countervalues/logic.integration.test.js +65 -0
- package/lib/countervalues/logic.integration.test.js.map +1 -1
- package/lib/countervalues/modules/weth.d.ts.map +1 -1
- package/lib/countervalues/modules/weth.js +5 -10
- package/lib/countervalues/modules/weth.js.map +1 -1
- package/lib/currencies/sortByMarketcap.d.ts +0 -2
- package/lib/currencies/sortByMarketcap.d.ts.map +1 -1
- package/lib/currencies/sortByMarketcap.js +3 -17
- package/lib/currencies/sortByMarketcap.js.map +1 -1
- package/lib/currencies/sortByMarketcap.test.js +0 -5
- package/lib/currencies/sortByMarketcap.test.js.map +1 -1
- package/lib/env.js +1 -1
- package/lib/families/algorand/specs.d.ts.map +1 -1
- package/lib/families/algorand/specs.js +18 -10
- package/lib/families/algorand/specs.js.map +1 -1
- package/lib/families/algorand/speculos-deviceActions.d.ts +1 -4
- package/lib/families/algorand/speculos-deviceActions.d.ts.map +1 -1
- package/lib/families/algorand/speculos-deviceActions.js +25 -8
- package/lib/families/algorand/speculos-deviceActions.js.map +1 -1
- package/lib/families/bitcoin/bridge/mock.d.ts.map +1 -1
- package/lib/families/bitcoin/bridge/mock.js +6 -1
- package/lib/families/bitcoin/bridge/mock.js.map +1 -1
- package/lib/families/bitcoin/datasets/bitcoin_cash.d.ts.map +1 -1
- package/lib/families/bitcoin/datasets/bitcoin_cash.js +1 -1
- package/lib/families/bitcoin/datasets/bitcoin_cash.js.map +1 -1
- package/lib/families/bitcoin/datasets/dash.d.ts.map +1 -1
- package/lib/families/bitcoin/datasets/dash.js +1 -1
- package/lib/families/bitcoin/datasets/dash.js.map +1 -1
- package/lib/families/bitcoin/datasets/decred.d.ts.map +1 -1
- package/lib/families/bitcoin/datasets/decred.js +1 -1
- package/lib/families/bitcoin/datasets/decred.js.map +1 -1
- package/lib/families/bitcoin/datasets/digibyte.d.ts.map +1 -1
- package/lib/families/bitcoin/datasets/digibyte.js +8 -2
- package/lib/families/bitcoin/datasets/digibyte.js.map +1 -1
- package/lib/families/bitcoin/datasets/dogecoin.d.ts.map +1 -1
- package/lib/families/bitcoin/datasets/dogecoin.js +1 -1
- package/lib/families/bitcoin/datasets/dogecoin.js.map +1 -1
- package/lib/families/bitcoin/datasets/komodo.js +1 -1
- package/lib/families/bitcoin/datasets/komodo.js.map +1 -1
- package/lib/families/bitcoin/datasets/litecoin.d.ts.map +1 -1
- package/lib/families/bitcoin/datasets/litecoin.js +8 -2
- package/lib/families/bitcoin/datasets/litecoin.js.map +1 -1
- package/lib/families/bitcoin/datasets/peercoin.js +1 -1
- package/lib/families/bitcoin/datasets/peercoin.js.map +1 -1
- package/lib/families/bitcoin/datasets/pivx.js +1 -1
- package/lib/families/bitcoin/datasets/pivx.js.map +1 -1
- package/lib/families/bitcoin/datasets/qtum.js +1 -1
- package/lib/families/bitcoin/datasets/qtum.js.map +1 -1
- package/lib/families/bitcoin/datasets/stakenet.d.ts.map +1 -1
- package/lib/families/bitcoin/datasets/stakenet.js +1 -1
- package/lib/families/bitcoin/datasets/stakenet.js.map +1 -1
- package/lib/families/bitcoin/datasets/vertcoin.d.ts.map +1 -1
- package/lib/families/bitcoin/datasets/vertcoin.js +1 -1
- package/lib/families/bitcoin/datasets/vertcoin.js.map +1 -1
- package/lib/families/bitcoin/datasets/viacoin.d.ts.map +1 -1
- package/lib/families/bitcoin/datasets/viacoin.js +1 -1
- package/lib/families/bitcoin/datasets/viacoin.js.map +1 -1
- package/lib/families/bitcoin/datasets/zcash.d.ts.map +1 -1
- package/lib/families/bitcoin/datasets/zcash.js +1 -1
- package/lib/families/bitcoin/datasets/zcash.js.map +1 -1
- package/lib/families/bitcoin/datasets/zencash.d.ts.map +1 -1
- package/lib/families/bitcoin/datasets/zencash.js +1 -1
- package/lib/families/bitcoin/datasets/zencash.js.map +1 -1
- package/lib/families/bitcoin/platformAdapter.test.d.ts +2 -0
- package/lib/families/bitcoin/platformAdapter.test.d.ts.map +1 -0
- package/lib/families/bitcoin/platformAdapter.test.js +48 -0
- package/lib/families/bitcoin/platformAdapter.test.js.map +1 -0
- package/lib/families/bitcoin/specs.d.ts.map +1 -1
- package/lib/families/bitcoin/specs.js +62 -24
- package/lib/families/bitcoin/specs.js.map +1 -1
- package/lib/families/bitcoin/speculos-deviceActions.d.ts +1 -4
- package/lib/families/bitcoin/speculos-deviceActions.d.ts.map +1 -1
- package/lib/families/bitcoin/speculos-deviceActions.js +2 -4
- package/lib/families/bitcoin/speculos-deviceActions.js.map +1 -1
- package/lib/families/cardano/js-estimateMaxSpendable.js +1 -1
- package/lib/families/cardano/js-estimateMaxSpendable.js.map +1 -1
- package/lib/families/cardano/specs.d.ts.map +1 -1
- package/lib/families/cardano/specs.js +19 -8
- package/lib/families/cardano/specs.js.map +1 -1
- package/lib/families/cardano/speculos-deviceActions.d.ts +1 -4
- package/lib/families/cardano/speculos-deviceActions.d.ts.map +1 -1
- package/lib/families/cardano/speculos-deviceActions.js +2 -2
- package/lib/families/cardano/speculos-deviceActions.js.map +1 -1
- package/lib/families/celo/api/hubble.d.ts +6 -1
- package/lib/families/celo/api/hubble.d.ts.map +1 -1
- package/lib/families/celo/api/hubble.js +135 -13
- package/lib/families/celo/api/hubble.js.map +1 -1
- package/lib/families/celo/api/index.d.ts +1 -1
- package/lib/families/celo/api/index.d.ts.map +1 -1
- package/lib/families/celo/api/index.js +2 -1
- package/lib/families/celo/api/index.js.map +1 -1
- package/lib/families/celo/api/sdk.d.ts +22 -0
- package/lib/families/celo/api/sdk.d.ts.map +1 -1
- package/lib/families/celo/api/sdk.js +168 -1
- package/lib/families/celo/api/sdk.js.map +1 -1
- package/lib/families/celo/bridge/js.d.ts.map +1 -1
- package/lib/families/celo/bridge/js.js +4 -42
- package/lib/families/celo/bridge/js.js.map +1 -1
- package/lib/families/celo/cli-transaction.d.ts +12 -2
- package/lib/families/celo/cli-transaction.d.ts.map +1 -1
- package/lib/families/celo/cli-transaction.js +38 -4
- package/lib/families/celo/cli-transaction.js.map +1 -1
- package/lib/families/celo/datasets/celo.scanAccounts.1.d.ts +1 -0
- package/lib/families/celo/datasets/celo.scanAccounts.1.d.ts.map +1 -1
- package/lib/families/celo/datasets/celo.scanAccounts.1.js +298 -2
- package/lib/families/celo/datasets/celo.scanAccounts.1.js.map +1 -1
- package/lib/families/celo/errors.d.ts +2 -0
- package/lib/families/celo/errors.d.ts.map +1 -0
- package/lib/families/celo/errors.js +6 -0
- package/lib/families/celo/errors.js.map +1 -0
- package/lib/families/celo/js-buildTransaction.d.ts +2 -3
- package/lib/families/celo/js-buildTransaction.d.ts.map +1 -1
- package/lib/families/celo/js-buildTransaction.js +194 -19
- package/lib/families/celo/js-buildTransaction.js.map +1 -1
- package/lib/families/celo/js-createTransaction.d.ts.map +1 -1
- package/lib/families/celo/js-createTransaction.js +3 -1
- package/lib/families/celo/js-createTransaction.js.map +1 -1
- package/lib/families/celo/js-estimateMaxSpendable.d.ts.map +1 -1
- package/lib/families/celo/js-estimateMaxSpendable.js.map +1 -1
- package/lib/families/celo/js-getFeesForTransaction.d.ts +2 -3
- package/lib/families/celo/js-getFeesForTransaction.d.ts.map +1 -1
- package/lib/families/celo/js-getFeesForTransaction.js +137 -10
- package/lib/families/celo/js-getFeesForTransaction.js.map +1 -1
- package/lib/families/celo/js-getTransactionStatus.d.ts +2 -3
- package/lib/families/celo/js-getTransactionStatus.d.ts.map +1 -1
- package/lib/families/celo/js-getTransactionStatus.js +97 -41
- package/lib/families/celo/js-getTransactionStatus.js.map +1 -1
- package/lib/families/celo/js-prepareTransaction.d.ts +2 -3
- package/lib/families/celo/js-prepareTransaction.d.ts.map +1 -1
- package/lib/families/celo/js-prepareTransaction.js +8 -3
- package/lib/families/celo/js-prepareTransaction.js.map +1 -1
- package/lib/families/celo/js-signOperation.d.ts.map +1 -1
- package/lib/families/celo/js-signOperation.js +17 -3
- package/lib/families/celo/js-signOperation.js.map +1 -1
- package/lib/families/celo/js-synchronisation.d.ts.map +1 -1
- package/lib/families/celo/js-synchronisation.js +51 -6
- package/lib/families/celo/js-synchronisation.js.map +1 -1
- package/lib/families/celo/logic.d.ts +21 -0
- package/lib/families/celo/logic.d.ts.map +1 -0
- package/lib/families/celo/logic.js +132 -0
- package/lib/families/celo/logic.js.map +1 -0
- package/lib/families/celo/preload.d.ts +10 -0
- package/lib/families/celo/preload.d.ts.map +1 -0
- package/lib/families/celo/preload.js +118 -0
- package/lib/families/celo/preload.js.map +1 -0
- package/lib/families/celo/react.d.ts +4 -0
- package/lib/families/celo/react.d.ts.map +1 -0
- package/lib/families/celo/react.js +47 -0
- package/lib/families/celo/react.js.map +1 -0
- package/lib/families/celo/serialization.d.ts +4 -0
- package/lib/families/celo/serialization.d.ts.map +1 -0
- package/lib/families/celo/serialization.js +55 -0
- package/lib/families/celo/serialization.js.map +1 -0
- package/lib/families/celo/specs/createActivateVoteMutation.d.ts +4 -0
- package/lib/families/celo/specs/createActivateVoteMutation.d.ts.map +1 -0
- package/lib/families/celo/specs/createActivateVoteMutation.js +38 -0
- package/lib/families/celo/specs/createActivateVoteMutation.js.map +1 -0
- package/lib/families/celo/specs/createLockMutation.d.ts +4 -0
- package/lib/families/celo/specs/createLockMutation.d.ts.map +1 -0
- package/lib/families/celo/specs/createLockMutation.js +40 -0
- package/lib/families/celo/specs/createLockMutation.js.map +1 -0
- package/lib/families/celo/specs/createRegisterAccountMutation.d.ts +4 -0
- package/lib/families/celo/specs/createRegisterAccountMutation.d.ts.map +1 -0
- package/lib/families/celo/specs/createRegisterAccountMutation.js +31 -0
- package/lib/families/celo/specs/createRegisterAccountMutation.js.map +1 -0
- package/lib/families/celo/specs/createRevokeVoteMutation.d.ts +4 -0
- package/lib/families/celo/specs/createRevokeVoteMutation.d.ts.map +1 -0
- package/lib/families/celo/specs/createRevokeVoteMutation.js +39 -0
- package/lib/families/celo/specs/createRevokeVoteMutation.js.map +1 -0
- package/lib/families/celo/specs/createSendMutation.d.ts +5 -0
- package/lib/families/celo/specs/createSendMutation.d.ts.map +1 -0
- package/lib/families/celo/specs/createSendMutation.js +44 -0
- package/lib/families/celo/specs/createSendMutation.js.map +1 -0
- package/lib/families/celo/specs/createUnlockMutation.d.ts +4 -0
- package/lib/families/celo/specs/createUnlockMutation.d.ts.map +1 -0
- package/lib/families/celo/specs/createUnlockMutation.js +37 -0
- package/lib/families/celo/specs/createUnlockMutation.js.map +1 -0
- package/lib/families/celo/specs/createVoteMutation.d.ts +4 -0
- package/lib/families/celo/specs/createVoteMutation.d.ts.map +1 -0
- package/lib/families/celo/specs/createVoteMutation.js +51 -0
- package/lib/families/celo/specs/createVoteMutation.js.map +1 -0
- package/lib/families/celo/specs/createWithdrawMutation.d.ts +4 -0
- package/lib/families/celo/specs/createWithdrawMutation.d.ts.map +1 -0
- package/lib/families/celo/specs/createWithdrawMutation.js +36 -0
- package/lib/families/celo/specs/createWithdrawMutation.js.map +1 -0
- package/lib/families/celo/specs/index.d.ts +9 -0
- package/lib/families/celo/specs/index.d.ts.map +1 -0
- package/lib/families/celo/specs/index.js +25 -0
- package/lib/families/celo/specs/index.js.map +1 -0
- package/lib/families/celo/specs.d.ts +1 -1
- package/lib/families/celo/specs.d.ts.map +1 -1
- package/lib/families/celo/specs.js +22 -37
- package/lib/families/celo/specs.js.map +1 -1
- package/lib/families/celo/speculos-deviceActions.d.ts +1 -4
- package/lib/families/celo/speculos-deviceActions.d.ts.map +1 -1
- package/lib/families/celo/speculos-deviceActions.js +24 -4
- package/lib/families/celo/speculos-deviceActions.js.map +1 -1
- package/lib/families/celo/transaction.d.ts.map +1 -1
- package/lib/families/celo/transaction.js +8 -6
- package/lib/families/celo/transaction.js.map +1 -1
- package/lib/families/celo/types.d.ts +102 -1
- package/lib/families/celo/types.d.ts.map +1 -1
- package/lib/families/celo/validators.d.ts +3 -0
- package/lib/families/celo/validators.d.ts.map +1 -0
- package/lib/families/celo/validators.js +6 -0
- package/lib/families/celo/validators.js.map +1 -0
- package/lib/families/cosmos/specs.d.ts.map +1 -1
- package/lib/families/cosmos/specs.js +41 -25
- package/lib/families/cosmos/specs.js.map +1 -1
- package/lib/families/cosmos/speculos-deviceActions.d.ts +1 -4
- package/lib/families/cosmos/speculos-deviceActions.d.ts.map +1 -1
- package/lib/families/cosmos/speculos-deviceActions.js +2 -4
- package/lib/families/cosmos/speculos-deviceActions.js.map +1 -1
- package/lib/families/crypto_org/specs.d.ts.map +1 -1
- package/lib/families/crypto_org/specs.js +3 -0
- package/lib/families/crypto_org/specs.js.map +1 -1
- package/lib/families/crypto_org/speculos-deviceActions.d.ts +1 -4
- package/lib/families/crypto_org/speculos-deviceActions.d.ts.map +1 -1
- package/lib/families/crypto_org/speculos-deviceActions.js +2 -2
- package/lib/families/crypto_org/speculos-deviceActions.js.map +1 -1
- package/lib/families/elrond/specs.d.ts.map +1 -1
- package/lib/families/elrond/specs.js +15 -2
- package/lib/families/elrond/specs.js.map +1 -1
- package/lib/families/elrond/speculos-deviceActions.d.ts +1 -4
- package/lib/families/elrond/speculos-deviceActions.d.ts.map +1 -1
- package/lib/families/elrond/speculos-deviceActions.js +2 -4
- package/lib/families/elrond/speculos-deviceActions.js.map +1 -1
- package/lib/families/ethereum/platformAdapter.test.d.ts +2 -0
- package/lib/families/ethereum/platformAdapter.test.d.ts.map +1 -0
- package/lib/families/ethereum/platformAdapter.test.js +88 -0
- package/lib/families/ethereum/platformAdapter.test.js.map +1 -0
- package/lib/families/ethereum/specs.d.ts.map +1 -1
- package/lib/families/ethereum/specs.js +36 -12
- package/lib/families/ethereum/specs.js.map +1 -1
- package/lib/families/ethereum/speculos-deviceActions.d.ts +1 -4
- package/lib/families/ethereum/speculos-deviceActions.d.ts.map +1 -1
- package/lib/families/ethereum/speculos-deviceActions.js +2 -4
- package/lib/families/ethereum/speculos-deviceActions.js.map +1 -1
- package/lib/families/filecoin/specs.d.ts.map +1 -1
- package/lib/families/filecoin/specs.js +2 -0
- package/lib/families/filecoin/specs.js.map +1 -1
- package/lib/families/filecoin/speculos-deviceActions.d.ts +1 -4
- package/lib/families/filecoin/speculos-deviceActions.d.ts.map +1 -1
- package/lib/families/filecoin/speculos-deviceActions.js +2 -2
- package/lib/families/filecoin/speculos-deviceActions.js.map +1 -1
- package/lib/families/hedera/specs.d.ts.map +1 -1
- package/lib/families/hedera/specs.js +11 -3
- package/lib/families/hedera/specs.js.map +1 -1
- package/lib/families/hedera/speculos-deviceActions.d.ts +1 -4
- package/lib/families/hedera/speculos-deviceActions.d.ts.map +1 -1
- package/lib/families/hedera/speculos-deviceActions.js +4 -4
- package/lib/families/hedera/speculos-deviceActions.js.map +1 -1
- package/lib/families/osmosis/specs.d.ts.map +1 -1
- package/lib/families/osmosis/specs.js +13 -5
- package/lib/families/osmosis/specs.js.map +1 -1
- package/lib/families/osmosis/speculos-deviceActions.d.ts +1 -4
- package/lib/families/osmosis/speculos-deviceActions.d.ts.map +1 -1
- package/lib/families/osmosis/speculos-deviceActions.js +2 -4
- package/lib/families/osmosis/speculos-deviceActions.js.map +1 -1
- package/lib/families/polkadot/platformAdapter.test.d.ts +2 -0
- package/lib/families/polkadot/platformAdapter.test.d.ts.map +1 -0
- package/lib/families/polkadot/platformAdapter.test.js +51 -0
- package/lib/families/polkadot/platformAdapter.test.js.map +1 -0
- package/lib/families/polkadot/specs.d.ts.map +1 -1
- package/lib/families/polkadot/specs.js +12 -1
- package/lib/families/polkadot/specs.js.map +1 -1
- package/lib/families/polkadot/speculos-deviceActions.d.ts +1 -4
- package/lib/families/polkadot/speculos-deviceActions.d.ts.map +1 -1
- package/lib/families/polkadot/speculos-deviceActions.js +2 -4
- package/lib/families/polkadot/speculos-deviceActions.js.map +1 -1
- package/lib/families/ripple/platformAdapter.test.d.ts +2 -0
- package/lib/families/ripple/platformAdapter.test.d.ts.map +1 -0
- package/lib/families/ripple/platformAdapter.test.js +51 -0
- package/lib/families/ripple/platformAdapter.test.js.map +1 -0
- package/lib/families/ripple/specs.d.ts.map +1 -1
- package/lib/families/ripple/specs.js +9 -4
- package/lib/families/ripple/specs.js.map +1 -1
- package/lib/families/ripple/speculos-deviceActions.d.ts +1 -4
- package/lib/families/ripple/speculos-deviceActions.d.ts.map +1 -1
- package/lib/families/ripple/speculos-deviceActions.js +2 -4
- package/lib/families/ripple/speculos-deviceActions.js.map +1 -1
- package/lib/families/solana/api/chain/instruction/token/types.d.ts +2 -2
- package/lib/families/solana/specs.d.ts.map +1 -1
- package/lib/families/solana/specs.js +29 -11
- package/lib/families/solana/specs.js.map +1 -1
- package/lib/families/solana/speculos-deviceActions.d.ts +0 -5
- package/lib/families/solana/speculos-deviceActions.d.ts.map +1 -1
- package/lib/families/solana/speculos-deviceActions.js +0 -4
- package/lib/families/solana/speculos-deviceActions.js.map +1 -1
- package/lib/families/stellar/api/horizon.d.ts.map +1 -1
- package/lib/families/stellar/api/horizon.js +15 -10
- package/lib/families/stellar/api/horizon.js.map +1 -1
- package/lib/families/stellar/specs.d.ts.map +1 -1
- package/lib/families/stellar/specs.js +30 -12
- package/lib/families/stellar/specs.js.map +1 -1
- package/lib/families/stellar/speculos-deviceActions.d.ts +1 -4
- package/lib/families/stellar/speculos-deviceActions.d.ts.map +1 -1
- package/lib/families/stellar/speculos-deviceActions.js +2 -4
- package/lib/families/stellar/speculos-deviceActions.js.map +1 -1
- package/lib/families/tezos/bakers.whitelist-default.d.ts.map +1 -1
- package/lib/families/tezos/bakers.whitelist-default.js +1 -1
- package/lib/families/tezos/bakers.whitelist-default.js.map +1 -1
- package/lib/families/tezos/specs.d.ts.map +1 -1
- package/lib/families/tezos/specs.js +2 -0
- package/lib/families/tezos/specs.js.map +1 -1
- package/lib/families/tezos/speculos-deviceActions.d.ts +1 -4
- package/lib/families/tezos/speculos-deviceActions.d.ts.map +1 -1
- package/lib/families/tezos/speculos-deviceActions.js +2 -2
- package/lib/families/tezos/speculos-deviceActions.js.map +1 -1
- package/lib/families/tron/specs.d.ts.map +1 -1
- package/lib/families/tron/specs.js +49 -17
- package/lib/families/tron/specs.js.map +1 -1
- package/lib/families/tron/speculos-deviceActions.d.ts +1 -4
- package/lib/families/tron/speculos-deviceActions.d.ts.map +1 -1
- package/lib/families/tron/speculos-deviceActions.js +2 -4
- package/lib/families/tron/speculos-deviceActions.js.map +1 -1
- package/lib/generated/cli-transaction.d.ts +12 -2
- package/lib/generated/cli-transaction.d.ts.map +1 -1
- package/lib/hw/getGenuineCheckFromDeviceId.d.ts +22 -0
- package/lib/hw/getGenuineCheckFromDeviceId.d.ts.map +1 -0
- package/lib/hw/getGenuineCheckFromDeviceId.js +49 -0
- package/lib/hw/getGenuineCheckFromDeviceId.js.map +1 -0
- package/lib/hw/getGenuineCheckFromDeviceId.test.d.ts +2 -0
- package/lib/hw/getGenuineCheckFromDeviceId.test.d.ts.map +1 -0
- package/lib/hw/getGenuineCheckFromDeviceId.test.js +84 -0
- package/lib/hw/getGenuineCheckFromDeviceId.test.js.map +1 -0
- package/lib/hw/getLatestAvailableFirmwareFromDeviceId.d.ts +17 -0
- package/lib/hw/getLatestAvailableFirmwareFromDeviceId.d.ts.map +1 -0
- package/lib/hw/getLatestAvailableFirmwareFromDeviceId.js +27 -0
- package/lib/hw/getLatestAvailableFirmwareFromDeviceId.js.map +1 -0
- package/lib/hw/hooks/useGenuineCheck.d.ts +34 -0
- package/lib/hw/hooks/useGenuineCheck.d.ts.map +1 -0
- package/lib/hw/hooks/useGenuineCheck.js +115 -0
- package/lib/hw/hooks/useGenuineCheck.js.map +1 -0
- package/lib/hw/hooks/useGenuineCheck.test.d.ts +2 -0
- package/lib/hw/hooks/useGenuineCheck.test.d.ts.map +1 -0
- package/lib/hw/hooks/useGenuineCheck.test.js +316 -0
- package/lib/hw/hooks/useGenuineCheck.test.js.map +1 -0
- package/lib/hw/hooks/useGetLatestAvailableFirmware.d.ts +29 -0
- package/lib/hw/hooks/useGetLatestAvailableFirmware.d.ts.map +1 -0
- package/lib/hw/hooks/useGetLatestAvailableFirmware.js +72 -0
- package/lib/hw/hooks/useGetLatestAvailableFirmware.js.map +1 -0
- package/lib/hw/hooks/useGetLatestAvailableFirmware.test.d.ts +2 -0
- package/lib/hw/hooks/useGetLatestAvailableFirmware.test.d.ts.map +1 -0
- package/lib/hw/hooks/useGetLatestAvailableFirmware.test.js +155 -0
- package/lib/hw/hooks/useGetLatestAvailableFirmware.test.js.map +1 -0
- package/lib/load/speculos.d.ts +1 -0
- package/lib/load/speculos.d.ts.map +1 -1
- package/lib/load/speculos.js +2 -1
- package/lib/load/speculos.js.map +1 -1
- package/lib/mock/fixtures/cryptoCurrencies.d.ts +5 -0
- package/lib/mock/fixtures/cryptoCurrencies.d.ts.map +1 -0
- package/lib/mock/fixtures/cryptoCurrencies.js +91 -0
- package/lib/mock/fixtures/cryptoCurrencies.js.map +1 -0
- package/lib/operation.d.ts.map +1 -1
- package/lib/operation.js +6 -0
- package/lib/operation.js.map +1 -1
- package/lib/platform/converters.test.js +44 -218
- package/lib/platform/converters.test.js.map +1 -1
- package/lib/platform/logic.d.ts +44 -0
- package/lib/platform/logic.d.ts.map +1 -1
- package/lib/platform/logic.js +147 -1
- package/lib/platform/logic.js.map +1 -1
- package/lib/platform/logic.test.d.ts +2 -0
- package/lib/platform/logic.test.d.ts.map +1 -0
- package/lib/platform/logic.test.js +903 -0
- package/lib/platform/logic.test.js.map +1 -0
- package/lib/platform/react.d.ts +6 -0
- package/lib/platform/react.d.ts.map +1 -1
- package/lib/platform/react.js +6 -0
- package/lib/platform/react.js.map +1 -1
- package/lib/platform/tracking.d.ts +1 -1
- package/lib/platform/tracking.d.ts.map +1 -1
- package/lib/platform/tracking.test.js +14 -41
- package/lib/platform/tracking.test.js.map +1 -1
- package/lib/reconciliation.d.ts.map +1 -1
- package/lib/reconciliation.js +39 -10
- package/lib/reconciliation.js.map +1 -1
- package/package.json +5 -7
- package/src/__tests__/families/bitcoin/wallet-btc/xpub.syncing.integration.test.ts +2 -2
- package/src/__tests__/test-helpers/environment.ts +91 -0
- package/src/__tests__/test-helpers/setup.ts +2 -91
- package/src/account/serialization.ts +125 -66
- package/src/apps/support.ts +1 -0
- package/src/bot/bot-test-context.test.ts +37 -0
- package/src/bot/bot-test-context.ts +24 -0
- package/src/bot/cli.ts +18 -0
- package/src/bot/engine.ts +109 -73
- package/src/bot/formatters.ts +40 -14
- package/src/bot/index.ts +124 -18
- package/src/bot/specs.ts +10 -5
- package/src/bot/types.ts +7 -3
- package/src/countervalues/logic.integration.test.ts +50 -0
- package/src/countervalues/modules/weth.ts +9 -12
- package/src/currencies/__snapshots__/sortByMarketcap.test.ts.snap +59 -1
- package/src/currencies/sortByMarketcap.test.ts +1 -12
- package/src/currencies/sortByMarketcap.ts +2 -22
- package/src/env.ts +1 -1
- package/src/families/algorand/__snapshots__/bridge.integration.test.ts.snap +733 -8
- package/src/families/algorand/specs.ts +26 -16
- package/src/families/algorand/speculos-deviceActions.ts +31 -10
- package/src/families/bitcoin/__snapshots__/bridge.integration.test.ts.snap +43309 -7957
- package/src/families/bitcoin/bridge/mock.ts +7 -1
- package/src/families/bitcoin/datasets/bitcoin_cash.ts +73 -13
- package/src/families/bitcoin/datasets/dash.ts +29 -17
- package/src/families/bitcoin/datasets/decred.ts +42 -12
- package/src/families/bitcoin/datasets/digibyte.ts +9 -3
- package/src/families/bitcoin/datasets/dogecoin.ts +29 -17
- package/src/families/bitcoin/datasets/komodo.ts +22 -22
- package/src/families/bitcoin/datasets/litecoin.ts +9 -3
- package/src/families/bitcoin/datasets/peercoin.ts +17 -17
- package/src/families/bitcoin/datasets/pivx.ts +17 -17
- package/src/families/bitcoin/datasets/qtum.ts +40 -40
- package/src/families/bitcoin/datasets/stakenet.ts +56 -26
- package/src/families/bitcoin/datasets/vertcoin.ts +43 -55
- package/src/families/bitcoin/datasets/viacoin.ts +35 -23
- package/src/families/bitcoin/datasets/zcash.ts +78 -12
- package/src/families/bitcoin/datasets/zencash.ts +56 -10
- package/src/families/bitcoin/platformAdapter.test.ts +58 -0
- package/src/families/bitcoin/specs.ts +81 -41
- package/src/families/bitcoin/speculos-deviceActions.ts +68 -69
- package/src/families/cardano/js-estimateMaxSpendable.ts +1 -1
- package/src/families/cardano/specs.ts +28 -11
- package/src/families/cardano/speculos-deviceActions.ts +65 -66
- package/src/families/celo/__snapshots__/bridge.integration.test.ts.snap +134 -857
- package/src/families/celo/api/hubble.ts +113 -16
- package/src/families/celo/api/index.ts +1 -1
- package/src/families/celo/api/sdk.ts +88 -0
- package/src/families/celo/bridge/js.ts +2 -3
- package/src/families/celo/cli-transaction.ts +46 -2
- package/src/families/celo/datasets/celo.scanAccounts.1.ts +365 -5
- package/src/families/celo/errors.ts +5 -0
- package/src/families/celo/js-buildTransaction.ts +173 -20
- package/src/families/celo/js-createTransaction.ts +2 -0
- package/src/families/celo/js-estimateMaxSpendable.ts +2 -2
- package/src/families/celo/js-getFeesForTransaction.ts +118 -19
- package/src/families/celo/js-getTransactionStatus.ts +72 -17
- package/src/families/celo/js-prepareTransaction.ts +13 -7
- package/src/families/celo/js-signOperation.ts +22 -5
- package/src/families/celo/js-synchronisation.ts +32 -0
- package/src/families/celo/logic.ts +184 -0
- package/src/families/celo/preload.ts +78 -0
- package/src/families/celo/react.ts +35 -0
- package/src/families/celo/serialization.ts +61 -0
- package/src/families/celo/specs/createActivateVoteMutation.ts +44 -0
- package/src/families/celo/specs/createLockMutation.ts +46 -0
- package/src/families/celo/specs/createRegisterAccountMutation.ts +34 -0
- package/src/families/celo/specs/createRevokeVoteMutation.ts +43 -0
- package/src/families/celo/specs/createSendMutation.ts +44 -0
- package/src/families/celo/specs/createUnlockMutation.ts +44 -0
- package/src/families/celo/specs/createVoteMutation.ts +67 -0
- package/src/families/celo/specs/createWithdrawMutation.ts +44 -0
- package/src/families/celo/specs/index.ts +8 -0
- package/src/families/celo/specs.ts +34 -34
- package/src/families/celo/speculos-deviceActions.ts +63 -45
- package/src/families/celo/transaction.ts +12 -4
- package/src/families/celo/types.ts +113 -0
- package/src/families/celo/validators.ts +2 -0
- package/src/families/cosmos/__snapshots__/bridge.integration.test.ts.snap +246 -5
- package/src/families/cosmos/specs.ts +44 -28
- package/src/families/cosmos/speculos-deviceActions.ts +82 -83
- package/src/families/crypto_org/specs.ts +3 -0
- package/src/families/crypto_org/speculos-deviceActions.ts +58 -59
- package/src/families/elrond/specs.ts +21 -4
- package/src/families/elrond/speculos-deviceActions.ts +41 -42
- package/src/families/ethereum/__snapshots__/bridge.integration.test.ts.snap +90 -90
- package/src/families/ethereum/platformAdapter.test.ts +112 -0
- package/src/families/ethereum/specs.ts +47 -23
- package/src/families/ethereum/speculos-deviceActions.ts +93 -95
- package/src/families/filecoin/specs.ts +2 -1
- package/src/families/filecoin/speculos-deviceActions.ts +61 -62
- package/src/families/hedera/__snapshots__/bridge.integration.test.ts.snap +57 -2
- package/src/families/hedera/specs.ts +13 -5
- package/src/families/hedera/speculos-deviceActions.ts +59 -60
- package/src/families/osmosis/specs.ts +15 -7
- package/src/families/osmosis/speculos-deviceActions.ts +82 -83
- package/src/families/polkadot/platformAdapter.test.ts +61 -0
- package/src/families/polkadot/specs.ts +20 -2
- package/src/families/polkadot/speculos-deviceActions.ts +83 -82
- package/src/families/ripple/platformAdapter.test.ts +54 -0
- package/src/families/ripple/specs.ts +14 -7
- package/src/families/ripple/speculos-deviceActions.ts +72 -73
- package/src/families/solana/specs.ts +33 -14
- package/src/families/solana/speculos-deviceActions.ts +0 -5
- package/src/families/stellar/api/horizon.ts +10 -6
- package/src/families/stellar/specs.ts +37 -19
- package/src/families/stellar/speculos-deviceActions.ts +85 -87
- package/src/families/tezos/bakers.whitelist-default.ts +0 -1
- package/src/families/tezos/specs.ts +2 -0
- package/src/families/tezos/speculos-deviceActions.ts +76 -77
- package/src/families/tron/specs.ts +67 -30
- package/src/families/tron/speculos-deviceActions.ts +81 -84
- package/src/hw/getGenuineCheckFromDeviceId.test.ts +98 -0
- package/src/hw/getGenuineCheckFromDeviceId.ts +61 -0
- package/src/hw/getLatestAvailableFirmwareFromDeviceId.ts +37 -0
- package/src/hw/hooks/useGenuineCheck.test.ts +232 -0
- package/src/hw/hooks/useGenuineCheck.ts +138 -0
- package/src/hw/hooks/useGetLatestAvailableFirmware.test.ts +111 -0
- package/src/hw/hooks/useGetLatestAvailableFirmware.ts +90 -0
- package/src/load/speculos.ts +2 -0
- package/src/mock/fixtures/cryptoCurrencies.ts +88 -0
- package/src/operation.ts +6 -0
- package/src/platform/converters.test.ts +49 -282
- package/src/platform/logic.test.ts +756 -0
- package/src/platform/logic.ts +285 -0
- package/src/platform/react.ts +6 -0
- package/src/platform/tracking.test.ts +6 -7
- package/src/platform/tracking.ts +1 -1
- package/src/reconciliation.ts +88 -43
- package/lib/bot/test.bot.d.ts +0 -2
- package/lib/bot/test.bot.d.ts.map +0 -1
- package/lib/bot/test.bot.js +0 -62
- package/lib/bot/test.bot.js.map +0 -1
- package/lib/generated/speculos-deviceActions.d.ts +0 -56
- package/lib/generated/speculos-deviceActions.d.ts.map +0 -1
- package/lib/generated/speculos-deviceActions.js +0 -42
- package/lib/generated/speculos-deviceActions.js.map +0 -1
- package/src/bot/test.bot.ts +0 -21
- package/src/generated/speculos-deviceActions.ts +0 -37
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
3
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
4
|
+
if (!m) return o;
|
|
5
|
+
var i = m.call(o), r, ar = [], e;
|
|
6
|
+
try {
|
|
7
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
8
|
+
}
|
|
9
|
+
catch (error) { e = { error: error }; }
|
|
10
|
+
finally {
|
|
11
|
+
try {
|
|
12
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
13
|
+
}
|
|
14
|
+
finally { if (e) throw e.error; }
|
|
15
|
+
}
|
|
16
|
+
return ar;
|
|
17
|
+
};
|
|
18
|
+
exports.__esModule = true;
|
|
19
|
+
exports.useGenuineCheck = void 0;
|
|
20
|
+
var react_1 = require("react");
|
|
21
|
+
var errors_1 = require("@ledgerhq/errors");
|
|
22
|
+
var getGenuineCheckFromDeviceId_1 = require("../getGenuineCheckFromDeviceId");
|
|
23
|
+
var SOCKET_EVENT_PAYLOAD_GENUINE = "0000";
|
|
24
|
+
/**
|
|
25
|
+
* Hook to check that a device is genuine
|
|
26
|
+
* It replaces a DeviceAction if we're only interested in getting the genuine check
|
|
27
|
+
* @param getGenuineCheckFromDeviceId An optional function to get a genuine check for a given device id,
|
|
28
|
+
* by default set to live-common/hw/getGenuineCheckFromDeviceId.
|
|
29
|
+
* This dependency injection is needed for LLD to have the hook working on the internal thread
|
|
30
|
+
* @param isHookEnabled A boolean to enable (true, default value) or disable (false) the hook
|
|
31
|
+
* @param deviceId A device id, or an empty string if device is usb plugged
|
|
32
|
+
* @param lockedDeviceTimeoutMs Time of no response from device after which the device is considered locked, in ms. Default 1000ms.
|
|
33
|
+
* @returns An object containing:
|
|
34
|
+
* - genuineState: the current GenuineState
|
|
35
|
+
* - devicePermissionState: the current DevicePermissionState
|
|
36
|
+
* - error: any error that occurred during the genuine check, or null
|
|
37
|
+
*/
|
|
38
|
+
var useGenuineCheck = function (_a) {
|
|
39
|
+
var _b = _a.getGenuineCheckFromDeviceId, getGenuineCheckFromDeviceId = _b === void 0 ? getGenuineCheckFromDeviceId_1.getGenuineCheckFromDeviceId : _b, _c = _a.isHookEnabled, isHookEnabled = _c === void 0 ? true : _c, deviceId = _a.deviceId, _d = _a.lockedDeviceTimeoutMs, lockedDeviceTimeoutMs = _d === void 0 ? 1000 : _d;
|
|
40
|
+
var _e = __read((0, react_1.useState)("unchecked"), 2), genuineState = _e[0], setGenuineState = _e[1];
|
|
41
|
+
var _f = __read((0, react_1.useState)("unrequested"), 2), devicePermissionState = _f[0], setDevicePermissionState = _f[1];
|
|
42
|
+
var _g = __read((0, react_1.useState)(null), 2), error = _g[0], setError = _g[1];
|
|
43
|
+
var resetGenuineCheckState = (0, react_1.useCallback)(function () {
|
|
44
|
+
setDevicePermissionState("unrequested");
|
|
45
|
+
setGenuineState("unchecked");
|
|
46
|
+
}, []);
|
|
47
|
+
(0, react_1.useEffect)(function () {
|
|
48
|
+
if (!isHookEnabled) {
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
var sub = getGenuineCheckFromDeviceId({
|
|
52
|
+
deviceId: deviceId,
|
|
53
|
+
lockedDeviceTimeoutMs: lockedDeviceTimeoutMs
|
|
54
|
+
}).subscribe({
|
|
55
|
+
next: function (_a) {
|
|
56
|
+
var socketEvent = _a.socketEvent, deviceIsLocked = _a.deviceIsLocked;
|
|
57
|
+
if (socketEvent) {
|
|
58
|
+
switch (socketEvent.type) {
|
|
59
|
+
case "device-permission-requested":
|
|
60
|
+
setDevicePermissionState("requested");
|
|
61
|
+
break;
|
|
62
|
+
case "device-permission-granted":
|
|
63
|
+
setDevicePermissionState("granted");
|
|
64
|
+
break;
|
|
65
|
+
case "result":
|
|
66
|
+
if (socketEvent.payload === SOCKET_EVENT_PAYLOAD_GENUINE) {
|
|
67
|
+
setGenuineState("genuine");
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
setGenuineState("non-genuine");
|
|
71
|
+
}
|
|
72
|
+
break;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
// If no socketEvent, the device is locked or has been unlocked
|
|
77
|
+
if (deviceIsLocked) {
|
|
78
|
+
setDevicePermissionState("unlock-needed");
|
|
79
|
+
}
|
|
80
|
+
else {
|
|
81
|
+
setDevicePermissionState("unlocked");
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
error: function (e) {
|
|
86
|
+
if (e instanceof errors_1.UserRefusedAllowManager) {
|
|
87
|
+
setDevicePermissionState("refused");
|
|
88
|
+
}
|
|
89
|
+
else if (e instanceof Error) {
|
|
90
|
+
// Probably an error of type DisconnectedDeviceDuringOperation or something else
|
|
91
|
+
setError(e);
|
|
92
|
+
}
|
|
93
|
+
else {
|
|
94
|
+
setError(new Error("Unknown error: ".concat(e)));
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
return function () {
|
|
99
|
+
sub.unsubscribe();
|
|
100
|
+
};
|
|
101
|
+
}, [
|
|
102
|
+
isHookEnabled,
|
|
103
|
+
deviceId,
|
|
104
|
+
lockedDeviceTimeoutMs,
|
|
105
|
+
getGenuineCheckFromDeviceId,
|
|
106
|
+
]);
|
|
107
|
+
return {
|
|
108
|
+
genuineState: genuineState,
|
|
109
|
+
devicePermissionState: devicePermissionState,
|
|
110
|
+
error: error,
|
|
111
|
+
resetGenuineCheckState: resetGenuineCheckState
|
|
112
|
+
};
|
|
113
|
+
};
|
|
114
|
+
exports.useGenuineCheck = useGenuineCheck;
|
|
115
|
+
//# sourceMappingURL=useGenuineCheck.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useGenuineCheck.js","sourceRoot":"","sources":["../../../src/hw/hooks/useGenuineCheck.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,+BAAyD;AACzD,2CAA2D;AAE3D,8EAAmH;AAmCnH,IAAM,4BAA4B,GAAG,MAAM,CAAC;AAE5C;;;;;;;;;;;;;GAaG;AACI,IAAM,eAAe,GAAG,UAAC,EAMH;QAL3B,mCAAgE,EAAhE,2BAA2B,mBAAG,yDAAkC,KAAA,EAChE,qBAAoB,EAApB,aAAa,mBAAG,IAAI,KAAA,EACpB,QAAQ,cAAA,EACR,6BAA4B,EAA5B,qBAAqB,mBAAG,IAAI,KAAA;IAGtB,IAAA,KAAA,OAAkC,IAAA,gBAAQ,EAAe,WAAW,CAAC,IAAA,EAApE,YAAY,QAAA,EAAE,eAAe,QAAuC,CAAC;IACtE,IAAA,KAAA,OACJ,I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EAAE;oBACxC,wBAAwB,CAAC,SAAS,CAAC,CAAC;iBACrC;qBAAM,IAAI,CAAC,YAAY,KAAK,EAAE;oBAC7B,gFAAgF;oBAChF,QAAQ,CAAC,CAAC,CAAC,CAAC;iBACb;qBAAM;oBACL,QAAQ,CAAC,IAAI,KAAK,CAAC,yBAAkB,CAAC,CAAE,CAAC,CAAC,CAAC;iBAC5C;YACH,CAAC;SACF,CAAC,CAAC;QAEH,OAAO;YACL,GAAG,CAAC,WAAW,EAAE,CAAC;QACpB,CAAC,CAAC;IACJ,CAAC,EAAE;QACD,aAAa;QACb,QAAQ;QACR,qBAAqB;QACrB,2BAA2B;KAC5B,CAAC,CAAC;IAEH,OAAO;QACL,YAAY,cAAA;QACZ,qBAAqB,uBAAA;QACrB,KAAK,OAAA;QACL,sBAAsB,wBAAA;KACvB,CAAC;AACJ,CAAC,CAAC;AAnFW,QAAA,eAAe,mBAmF1B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useGenuineCheck.test.d.ts","sourceRoot":"","sources":["../../../src/hw/hooks/useGenuineCheck.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,316 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
+
function step(op) {
|
|
16
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
+
while (_) try {
|
|
18
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
+
switch (op[0]) {
|
|
21
|
+
case 0: case 1: t = op; break;
|
|
22
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
+
default:
|
|
26
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
+
if (t[2]) _.ops.pop();
|
|
31
|
+
_.trys.pop(); continue;
|
|
32
|
+
}
|
|
33
|
+
op = body.call(thisArg, _);
|
|
34
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
exports.__esModule = true;
|
|
39
|
+
var react_hooks_1 = require("@testing-library/react-hooks");
|
|
40
|
+
var rxjs_1 = require("rxjs");
|
|
41
|
+
var errors_1 = require("@ledgerhq/errors");
|
|
42
|
+
var useGenuineCheck_1 = require("./useGenuineCheck");
|
|
43
|
+
var getGenuineCheckFromDeviceId_1 = require("../getGenuineCheckFromDeviceId");
|
|
44
|
+
jest.mock("../getGenuineCheckFromDeviceId");
|
|
45
|
+
jest.useFakeTimers();
|
|
46
|
+
var mockedGetGenuineCheckFromDeviceId = jest.mocked(getGenuineCheckFromDeviceId_1.getGenuineCheckFromDeviceId);
|
|
47
|
+
describe("useGenuineCheck", function () {
|
|
48
|
+
afterEach(function () {
|
|
49
|
+
mockedGetGenuineCheckFromDeviceId.mockClear();
|
|
50
|
+
jest.clearAllTimers();
|
|
51
|
+
});
|
|
52
|
+
describe("When the genuine check requests for a device permission", function () {
|
|
53
|
+
it("should notify the hook consumer of the request", function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
54
|
+
var result;
|
|
55
|
+
return __generator(this, function (_a) {
|
|
56
|
+
switch (_a.label) {
|
|
57
|
+
case 0:
|
|
58
|
+
mockedGetGenuineCheckFromDeviceId.mockReturnValue((0, rxjs_1.of)({
|
|
59
|
+
socketEvent: { type: "device-permission-requested", wording: "" },
|
|
60
|
+
deviceIsLocked: false
|
|
61
|
+
}));
|
|
62
|
+
result = (0, react_hooks_1.renderHook)(function () {
|
|
63
|
+
return (0, useGenuineCheck_1.useGenuineCheck)({
|
|
64
|
+
getGenuineCheckFromDeviceId: mockedGetGenuineCheckFromDeviceId,
|
|
65
|
+
deviceId: "A_DEVICE_ID"
|
|
66
|
+
});
|
|
67
|
+
}).result;
|
|
68
|
+
return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
69
|
+
return __generator(this, function (_a) {
|
|
70
|
+
jest.advanceTimersByTime(1);
|
|
71
|
+
return [2 /*return*/];
|
|
72
|
+
});
|
|
73
|
+
}); })];
|
|
74
|
+
case 1:
|
|
75
|
+
_a.sent();
|
|
76
|
+
expect(result.current.devicePermissionState).toEqual("requested");
|
|
77
|
+
expect(result.current.genuineState).toEqual("unchecked");
|
|
78
|
+
expect(result.current.error).toBeNull();
|
|
79
|
+
return [2 /*return*/];
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
}); });
|
|
83
|
+
it("should notify the hook consumer if the device permission is granted", function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
84
|
+
var result;
|
|
85
|
+
return __generator(this, function (_a) {
|
|
86
|
+
switch (_a.label) {
|
|
87
|
+
case 0:
|
|
88
|
+
mockedGetGenuineCheckFromDeviceId.mockReturnValue((0, rxjs_1.of)({
|
|
89
|
+
socketEvent: { type: "device-permission-granted" },
|
|
90
|
+
deviceIsLocked: false
|
|
91
|
+
}));
|
|
92
|
+
result = (0, react_hooks_1.renderHook)(function () {
|
|
93
|
+
return (0, useGenuineCheck_1.useGenuineCheck)({
|
|
94
|
+
getGenuineCheckFromDeviceId: mockedGetGenuineCheckFromDeviceId,
|
|
95
|
+
deviceId: "A_DEVICE_ID"
|
|
96
|
+
});
|
|
97
|
+
}).result;
|
|
98
|
+
return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
99
|
+
return __generator(this, function (_a) {
|
|
100
|
+
jest.advanceTimersByTime(1);
|
|
101
|
+
return [2 /*return*/];
|
|
102
|
+
});
|
|
103
|
+
}); })];
|
|
104
|
+
case 1:
|
|
105
|
+
_a.sent();
|
|
106
|
+
expect(result.current.devicePermissionState).toEqual("granted");
|
|
107
|
+
expect(result.current.genuineState).toEqual("unchecked");
|
|
108
|
+
expect(result.current.error).toBeNull();
|
|
109
|
+
return [2 /*return*/];
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
}); });
|
|
113
|
+
it("should notify the hook consumer if the device permission is refused", function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
114
|
+
var result;
|
|
115
|
+
return __generator(this, function (_a) {
|
|
116
|
+
switch (_a.label) {
|
|
117
|
+
case 0:
|
|
118
|
+
mockedGetGenuineCheckFromDeviceId.mockReturnValue((0, rxjs_1.throwError)(new errors_1.UserRefusedAllowManager()));
|
|
119
|
+
result = (0, react_hooks_1.renderHook)(function () {
|
|
120
|
+
return (0, useGenuineCheck_1.useGenuineCheck)({
|
|
121
|
+
getGenuineCheckFromDeviceId: mockedGetGenuineCheckFromDeviceId,
|
|
122
|
+
deviceId: "A_DEVICE_ID"
|
|
123
|
+
});
|
|
124
|
+
}).result;
|
|
125
|
+
return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
126
|
+
return __generator(this, function (_a) {
|
|
127
|
+
jest.advanceTimersByTime(1);
|
|
128
|
+
return [2 /*return*/];
|
|
129
|
+
});
|
|
130
|
+
}); })];
|
|
131
|
+
case 1:
|
|
132
|
+
_a.sent();
|
|
133
|
+
expect(result.current.devicePermissionState).toEqual("refused");
|
|
134
|
+
expect(result.current.genuineState).toEqual("unchecked");
|
|
135
|
+
expect(result.current.error).toBeNull();
|
|
136
|
+
return [2 /*return*/];
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
}); });
|
|
140
|
+
});
|
|
141
|
+
describe("When an error occurred during the genuine check", function () {
|
|
142
|
+
it("should notify the hook consumer that an error occurred", function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
143
|
+
var result;
|
|
144
|
+
return __generator(this, function (_a) {
|
|
145
|
+
switch (_a.label) {
|
|
146
|
+
case 0:
|
|
147
|
+
mockedGetGenuineCheckFromDeviceId.mockReturnValue((0, rxjs_1.throwError)(new errors_1.DisconnectedDeviceDuringOperation()));
|
|
148
|
+
result = (0, react_hooks_1.renderHook)(function () {
|
|
149
|
+
return (0, useGenuineCheck_1.useGenuineCheck)({
|
|
150
|
+
getGenuineCheckFromDeviceId: mockedGetGenuineCheckFromDeviceId,
|
|
151
|
+
deviceId: "A_DEVICE_ID"
|
|
152
|
+
});
|
|
153
|
+
}).result;
|
|
154
|
+
return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
155
|
+
return __generator(this, function (_a) {
|
|
156
|
+
jest.advanceTimersByTime(1);
|
|
157
|
+
return [2 /*return*/];
|
|
158
|
+
});
|
|
159
|
+
}); })];
|
|
160
|
+
case 1:
|
|
161
|
+
_a.sent();
|
|
162
|
+
expect(result.current.genuineState).toEqual("unchecked");
|
|
163
|
+
expect(result.current.error).toBeInstanceOf(errors_1.DisconnectedDeviceDuringOperation);
|
|
164
|
+
return [2 /*return*/];
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
}); });
|
|
168
|
+
});
|
|
169
|
+
describe("When the genuine check is completed", function () {
|
|
170
|
+
describe("and it is a success", function () {
|
|
171
|
+
it("should notify the hook consumer of the success", function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
172
|
+
var result;
|
|
173
|
+
return __generator(this, function (_a) {
|
|
174
|
+
switch (_a.label) {
|
|
175
|
+
case 0:
|
|
176
|
+
mockedGetGenuineCheckFromDeviceId.mockReturnValue((0, rxjs_1.of)({
|
|
177
|
+
socketEvent: { type: "result", payload: "0000" },
|
|
178
|
+
deviceIsLocked: false
|
|
179
|
+
}));
|
|
180
|
+
result = (0, react_hooks_1.renderHook)(function () {
|
|
181
|
+
return (0, useGenuineCheck_1.useGenuineCheck)({
|
|
182
|
+
getGenuineCheckFromDeviceId: mockedGetGenuineCheckFromDeviceId,
|
|
183
|
+
deviceId: "A_DEVICE_ID"
|
|
184
|
+
});
|
|
185
|
+
}).result;
|
|
186
|
+
return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
187
|
+
return __generator(this, function (_a) {
|
|
188
|
+
jest.advanceTimersByTime(1);
|
|
189
|
+
return [2 /*return*/];
|
|
190
|
+
});
|
|
191
|
+
}); })];
|
|
192
|
+
case 1:
|
|
193
|
+
_a.sent();
|
|
194
|
+
expect(result.current.genuineState).toEqual("genuine");
|
|
195
|
+
expect(result.current.error).toBeNull();
|
|
196
|
+
return [2 /*return*/];
|
|
197
|
+
}
|
|
198
|
+
});
|
|
199
|
+
}); });
|
|
200
|
+
});
|
|
201
|
+
describe("and the device is not genuine", function () {
|
|
202
|
+
it("should notify the hook consumer that the device is not genuine", function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
203
|
+
var result;
|
|
204
|
+
return __generator(this, function (_a) {
|
|
205
|
+
switch (_a.label) {
|
|
206
|
+
case 0:
|
|
207
|
+
mockedGetGenuineCheckFromDeviceId.mockReturnValue((0, rxjs_1.of)({
|
|
208
|
+
socketEvent: { type: "result", payload: "1111" },
|
|
209
|
+
deviceIsLocked: false
|
|
210
|
+
}));
|
|
211
|
+
result = (0, react_hooks_1.renderHook)(function () {
|
|
212
|
+
return (0, useGenuineCheck_1.useGenuineCheck)({
|
|
213
|
+
getGenuineCheckFromDeviceId: mockedGetGenuineCheckFromDeviceId,
|
|
214
|
+
deviceId: "A_DEVICE_ID"
|
|
215
|
+
});
|
|
216
|
+
}).result;
|
|
217
|
+
return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
218
|
+
return __generator(this, function (_a) {
|
|
219
|
+
jest.advanceTimersByTime(1);
|
|
220
|
+
return [2 /*return*/];
|
|
221
|
+
});
|
|
222
|
+
}); })];
|
|
223
|
+
case 1:
|
|
224
|
+
_a.sent();
|
|
225
|
+
expect(result.current.genuineState).toEqual("non-genuine");
|
|
226
|
+
expect(result.current.error).toBeNull();
|
|
227
|
+
return [2 /*return*/];
|
|
228
|
+
}
|
|
229
|
+
});
|
|
230
|
+
}); });
|
|
231
|
+
});
|
|
232
|
+
});
|
|
233
|
+
describe("When the hook consumer requests to reset the genuine check state", function () {
|
|
234
|
+
it("should reset the device permission and genuine states", function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
235
|
+
var result;
|
|
236
|
+
return __generator(this, function (_a) {
|
|
237
|
+
switch (_a.label) {
|
|
238
|
+
case 0:
|
|
239
|
+
// In the case of an unsuccessful genuine check
|
|
240
|
+
mockedGetGenuineCheckFromDeviceId.mockReturnValue((0, rxjs_1.of)({
|
|
241
|
+
socketEvent: { type: "device-permission-granted" },
|
|
242
|
+
deviceIsLocked: false
|
|
243
|
+
}, {
|
|
244
|
+
socketEvent: { type: "result", payload: "1111" },
|
|
245
|
+
deviceIsLocked: false
|
|
246
|
+
}));
|
|
247
|
+
result = (0, react_hooks_1.renderHook)(function () {
|
|
248
|
+
return (0, useGenuineCheck_1.useGenuineCheck)({
|
|
249
|
+
getGenuineCheckFromDeviceId: mockedGetGenuineCheckFromDeviceId,
|
|
250
|
+
isHookEnabled: true,
|
|
251
|
+
deviceId: "A_DEVICE_ID"
|
|
252
|
+
});
|
|
253
|
+
}).result;
|
|
254
|
+
return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
255
|
+
return __generator(this, function (_a) {
|
|
256
|
+
jest.advanceTimersByTime(1);
|
|
257
|
+
return [2 /*return*/];
|
|
258
|
+
});
|
|
259
|
+
}); })];
|
|
260
|
+
case 1:
|
|
261
|
+
_a.sent();
|
|
262
|
+
expect(result.current.devicePermissionState).toEqual("granted");
|
|
263
|
+
expect(result.current.genuineState).toEqual("non-genuine");
|
|
264
|
+
expect(result.current.error).toBeNull();
|
|
265
|
+
// We ask to reset the genuine check state
|
|
266
|
+
return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
267
|
+
return __generator(this, function (_a) {
|
|
268
|
+
result.current.resetGenuineCheckState();
|
|
269
|
+
return [2 /*return*/];
|
|
270
|
+
});
|
|
271
|
+
}); })];
|
|
272
|
+
case 2:
|
|
273
|
+
// We ask to reset the genuine check state
|
|
274
|
+
_a.sent();
|
|
275
|
+
expect(result.current.devicePermissionState).toEqual("unrequested");
|
|
276
|
+
expect(result.current.genuineState).toEqual("unchecked");
|
|
277
|
+
expect(result.current.error).toBeNull();
|
|
278
|
+
return [2 /*return*/];
|
|
279
|
+
}
|
|
280
|
+
});
|
|
281
|
+
}); });
|
|
282
|
+
});
|
|
283
|
+
describe("When the device is locked before doing a genuine check, and it timed out", function () {
|
|
284
|
+
it("should notify the hook consumer of the need to unlock the device", function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
285
|
+
var result;
|
|
286
|
+
return __generator(this, function (_a) {
|
|
287
|
+
switch (_a.label) {
|
|
288
|
+
case 0:
|
|
289
|
+
mockedGetGenuineCheckFromDeviceId.mockReturnValue((0, rxjs_1.of)({
|
|
290
|
+
socketEvent: null,
|
|
291
|
+
deviceIsLocked: true
|
|
292
|
+
}));
|
|
293
|
+
result = (0, react_hooks_1.renderHook)(function () {
|
|
294
|
+
return (0, useGenuineCheck_1.useGenuineCheck)({
|
|
295
|
+
getGenuineCheckFromDeviceId: mockedGetGenuineCheckFromDeviceId,
|
|
296
|
+
deviceId: "A_DEVICE_ID"
|
|
297
|
+
});
|
|
298
|
+
}).result;
|
|
299
|
+
return [4 /*yield*/, (0, react_hooks_1.act)(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
300
|
+
return __generator(this, function (_a) {
|
|
301
|
+
jest.advanceTimersByTime(1);
|
|
302
|
+
return [2 /*return*/];
|
|
303
|
+
});
|
|
304
|
+
}); })];
|
|
305
|
+
case 1:
|
|
306
|
+
_a.sent();
|
|
307
|
+
expect(result.current.devicePermissionState).toEqual("unlock-needed");
|
|
308
|
+
expect(result.current.genuineState).toEqual("unchecked");
|
|
309
|
+
expect(result.current.error).toBeNull();
|
|
310
|
+
return [2 /*return*/];
|
|
311
|
+
}
|
|
312
|
+
});
|
|
313
|
+
}); });
|
|
314
|
+
});
|
|
315
|
+
});
|
|
316
|
+
//# sourceMappingURL=useGenuineCheck.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useGenuineCheck.test.js","sourceRoot":"","sources":["../../../src/hw/hooks/useGenuineCheck.test.ts"],"names":[],"mappings":";;;;;;;;;;;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2
|
+
import type { GetLatestAvailableFirmwareFromDeviceIdArgs, GetLatestAvailableFirmwareFromDeviceIdOutput } from "../getLatestAvailableFirmwareFromDeviceId";
|
|
3
|
+
export declare type FirmwareUpdateGettingStatus = "unchecked" | "checking" | "no-available-firmware" | "available-firmware";
|
|
4
|
+
export declare type useGetLatestAvailableFirmwareDependencies = {
|
|
5
|
+
getLatestAvailableFirmwareFromDeviceId?: (args: GetLatestAvailableFirmwareFromDeviceIdArgs) => GetLatestAvailableFirmwareFromDeviceIdOutput;
|
|
6
|
+
};
|
|
7
|
+
export declare type useGetLatestAvailableFirmwareArgs = {
|
|
8
|
+
isHookEnabled?: boolean;
|
|
9
|
+
deviceId: DeviceId;
|
|
10
|
+
};
|
|
11
|
+
export declare type useGetLatestAvailableFirmwareResult = {
|
|
12
|
+
latestFirmware: FirmwareUpdateContext | null;
|
|
13
|
+
status: FirmwareUpdateGettingStatus;
|
|
14
|
+
error: Error | null;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Hook to get the latest available firmware for a device
|
|
18
|
+
* @param getLatestAvailableFirmwareFromDeviceId An optional function to get the latest available firmware
|
|
19
|
+
* for a given device id, by default set to live-common/hw/getLatestAvailableFirmwareFromDeviceId.
|
|
20
|
+
* This dependency injection is needed for LLD to have the hook working on the internal thread
|
|
21
|
+
* @param isHookEnabled A boolean to enable (true, default value) or disable (false) the hook
|
|
22
|
+
* @param deviceId A device id, or an empty string if device is usb plugged
|
|
23
|
+
* @returns An object containing:
|
|
24
|
+
* - latestFirmware A FirmwareUpdateContext if found, or null if still processing or no available firmware update
|
|
25
|
+
* - status A FirmwareUpdateGettingStatus to notify consumer on the hook state
|
|
26
|
+
* - error: any error that occurred during the process, or null
|
|
27
|
+
*/
|
|
28
|
+
export declare const useGetLatestAvailableFirmware: ({ getLatestAvailableFirmwareFromDeviceId, isHookEnabled, deviceId, }: useGetLatestAvailableFirmwareArgs & useGetLatestAvailableFirmwareDependencies) => useGetLatestAvailableFirmwareResult;
|
|
29
|
+
//# sourceMappingURL=useGetLatestAvailableFirmware.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useGetLatestAvailableFirmware.d.ts","sourceRoot":"","sources":["../../../src/hw/hooks/useGetLatestAvailableFirmware.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAC5E,OAAO,KAAK,EACV,0CAA0C,EAE1C,4CAA4C,EAC7C,MAAM,2CAA2C,CAAC;AAGnD,oBAAY,2BAA2B,GACnC,WAAW,GACX,UAAU,GACV,uBAAuB,GACvB,oBAAoB,CAAC;AAEzB,oBAAY,yCAAyC,GAAG;IACtD,sCAAsC,CAAC,EAAE,CACvC,IAAI,EAAE,0CAA0C,KAC7C,4CAA4C,CAAC;CACnD,CAAC;AAEF,oBAAY,iCAAiC,GAAG;IAC9C,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,EAAE,QAAQ,CAAC;CACpB,CAAC;AAEF,oBAAY,mCAAmC,GAAG;IAChD,cAAc,EAAE,qBAAqB,GAAG,IAAI,CAAC;IAC7C,MAAM,EAAE,2BAA2B,CAAC;IACpC,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;CACrB,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,6BAA6B,yEAIvC,iCAAiC,GAClC,yCAAyC,KAAG,mCAwC7C,CAAC"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
3
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
4
|
+
if (!m) return o;
|
|
5
|
+
var i = m.call(o), r, ar = [], e;
|
|
6
|
+
try {
|
|
7
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
8
|
+
}
|
|
9
|
+
catch (error) { e = { error: error }; }
|
|
10
|
+
finally {
|
|
11
|
+
try {
|
|
12
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
13
|
+
}
|
|
14
|
+
finally { if (e) throw e.error; }
|
|
15
|
+
}
|
|
16
|
+
return ar;
|
|
17
|
+
};
|
|
18
|
+
exports.__esModule = true;
|
|
19
|
+
exports.useGetLatestAvailableFirmware = void 0;
|
|
20
|
+
var react_1 = require("react");
|
|
21
|
+
var getLatestAvailableFirmwareFromDeviceId_1 = require("../getLatestAvailableFirmwareFromDeviceId");
|
|
22
|
+
/**
|
|
23
|
+
* Hook to get the latest available firmware for a device
|
|
24
|
+
* @param getLatestAvailableFirmwareFromDeviceId An optional function to get the latest available firmware
|
|
25
|
+
* for a given device id, by default set to live-common/hw/getLatestAvailableFirmwareFromDeviceId.
|
|
26
|
+
* This dependency injection is needed for LLD to have the hook working on the internal thread
|
|
27
|
+
* @param isHookEnabled A boolean to enable (true, default value) or disable (false) the hook
|
|
28
|
+
* @param deviceId A device id, or an empty string if device is usb plugged
|
|
29
|
+
* @returns An object containing:
|
|
30
|
+
* - latestFirmware A FirmwareUpdateContext if found, or null if still processing or no available firmware update
|
|
31
|
+
* - status A FirmwareUpdateGettingStatus to notify consumer on the hook state
|
|
32
|
+
* - error: any error that occurred during the process, or null
|
|
33
|
+
*/
|
|
34
|
+
var useGetLatestAvailableFirmware = function (_a) {
|
|
35
|
+
var _b = _a.getLatestAvailableFirmwareFromDeviceId, getLatestAvailableFirmwareFromDeviceId = _b === void 0 ? getLatestAvailableFirmwareFromDeviceId_1.getLatestAvailableFirmwareFromDeviceId : _b, _c = _a.isHookEnabled, isHookEnabled = _c === void 0 ? true : _c, deviceId = _a.deviceId;
|
|
36
|
+
var _d = __read((0, react_1.useState)(null), 2), latestFirmware = _d[0], setLatestFirmware = _d[1];
|
|
37
|
+
var _e = __read((0, react_1.useState)(null), 2), error = _e[0], setError = _e[1];
|
|
38
|
+
var _f = __read((0, react_1.useState)("unchecked"), 2), status = _f[0], setStatus = _f[1];
|
|
39
|
+
(0, react_1.useEffect)(function () {
|
|
40
|
+
if (!isHookEnabled) {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
setStatus("checking");
|
|
44
|
+
var sub = getLatestAvailableFirmwareFromDeviceId({ deviceId: deviceId }).subscribe({
|
|
45
|
+
next: function (_a) {
|
|
46
|
+
var firmwareUpdateContext = _a.firmwareUpdateContext;
|
|
47
|
+
if (!firmwareUpdateContext) {
|
|
48
|
+
setLatestFirmware(null);
|
|
49
|
+
setStatus("no-available-firmware");
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
setLatestFirmware(firmwareUpdateContext);
|
|
53
|
+
setStatus("available-firmware");
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
error: function (e) {
|
|
57
|
+
if (e instanceof Error) {
|
|
58
|
+
setError(e);
|
|
59
|
+
}
|
|
60
|
+
else {
|
|
61
|
+
setError(new Error("Unknown error: ".concat(e)));
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
return function () {
|
|
66
|
+
sub.unsubscribe();
|
|
67
|
+
};
|
|
68
|
+
}, [deviceId, getLatestAvailableFirmwareFromDeviceId, isHookEnabled]);
|
|
69
|
+
return { latestFirmware: latestFirmware, error: error, status: status };
|
|
70
|
+
};
|
|
71
|
+
exports.useGetLatestAvailableFirmware = useGetLatestAvailableFirmware;
|
|
72
|
+
//# sourceMappingURL=useGetLatestAvailableFirmware.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useGetLatestAvailableFirmware.js","sourceRoot":"","sources":["../../../src/hw/hooks/useGetLatestAvailableFirmware.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,+BAA4C;AAO5C,oGAAoJ;AAyBpJ;;;;;;;;;;;GAWG;AACI,IAAM,6BAA6B,GAAG,UAAC,EAKH;QAJzC,8CAAsF,EAAtF,sCAAsC,mBAAG,+EAA6C,KAAA,EACtF,qBAAoB,EAApB,aAAa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cAAc,gBAAA,EAAE,KAAK,OAAA,EAAE,MAAM,QAAA,EAAE,CAAC;AAC3C,CAAC,CAAC;AA7CW,QAAA,6BAA6B,iCA6CxC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useGetLatestAvailableFirmware.test.d.ts","sourceRoot":"","sources":["../../../src/hw/hooks/useGetLatestAvailableFirmware.test.ts"],"names":[],"mappings":""}
|