@ledgerhq/live-common 34.54.0-nightly.20251206023719 → 34.54.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/lib/__tests__/test-helpers/bridge.js +1 -1
- package/lib/__tests__/test-helpers/bridge.js.map +1 -1
- package/lib/__tests__/test-helpers/environment.js +0 -1
- package/lib/__tests__/test-helpers/environment.js.map +1 -1
- package/lib/account/index.d.ts +0 -1
- package/lib/account/index.d.ts.map +1 -1
- package/lib/account/index.js +1 -4
- package/lib/account/index.js.map +1 -1
- package/lib/bridge/generic-alpaca/accountBridge.d.ts +1 -1
- package/lib/bridge/generic-alpaca/accountBridge.d.ts.map +1 -1
- package/lib/bridge/generic-alpaca/accountBridge.js +1 -2
- package/lib/bridge/generic-alpaca/accountBridge.js.map +1 -1
- package/lib/bridge/generic-alpaca/broadcast.d.ts.map +1 -1
- package/lib/bridge/generic-alpaca/broadcast.js +3 -3
- package/lib/bridge/generic-alpaca/broadcast.js.map +1 -1
- package/lib/bridge/generic-alpaca/currencyBridge.d.ts.map +1 -1
- package/lib/bridge/generic-alpaca/currencyBridge.js +3 -3
- package/lib/bridge/generic-alpaca/currencyBridge.js.map +1 -1
- package/lib/bridge/generic-alpaca/estimateMaxSpendable.d.ts.map +1 -1
- package/lib/bridge/generic-alpaca/estimateMaxSpendable.js +1 -2
- package/lib/bridge/generic-alpaca/estimateMaxSpendable.js.map +1 -1
- package/lib/bridge/generic-alpaca/getAccountShape.d.ts.map +1 -1
- package/lib/bridge/generic-alpaca/getAccountShape.js +7 -16
- package/lib/bridge/generic-alpaca/getAccountShape.js.map +1 -1
- package/lib/bridge/generic-alpaca/getTransactionStatus.d.ts.map +1 -1
- package/lib/bridge/generic-alpaca/getTransactionStatus.js +1 -16
- package/lib/bridge/generic-alpaca/getTransactionStatus.js.map +1 -1
- package/lib/bridge/generic-alpaca/prepareTransaction.d.ts.map +1 -1
- package/lib/bridge/generic-alpaca/prepareTransaction.js +4 -38
- package/lib/bridge/generic-alpaca/prepareTransaction.js.map +1 -1
- package/lib/bridge/generic-alpaca/signOperation.d.ts.map +1 -1
- package/lib/bridge/generic-alpaca/signOperation.js +2 -18
- package/lib/bridge/generic-alpaca/signOperation.js.map +1 -1
- package/lib/bridge/generic-alpaca/signer/Eth.d.ts +0 -2
- package/lib/bridge/generic-alpaca/signer/Eth.d.ts.map +1 -1
- package/lib/bridge/generic-alpaca/signer/Eth.js +1 -8
- package/lib/bridge/generic-alpaca/signer/Eth.js.map +1 -1
- package/lib/bridge/generic-alpaca/signer/index.d.ts.map +1 -1
- package/lib/bridge/generic-alpaca/signer/index.js +0 -7
- package/lib/bridge/generic-alpaca/signer/index.js.map +1 -1
- package/lib/bridge/generic-alpaca/types.d.ts +0 -4
- package/lib/bridge/generic-alpaca/types.d.ts.map +1 -1
- package/lib/bridge/generic-alpaca/utils.d.ts.map +1 -1
- package/lib/bridge/generic-alpaca/utils.js +3 -12
- package/lib/bridge/generic-alpaca/utils.js.map +1 -1
- package/lib/bridge/impl.d.ts.map +1 -1
- package/lib/bridge/impl.js +3 -14
- package/lib/bridge/impl.js.map +1 -1
- package/lib/currencies/cryptoIcons.d.ts +3 -0
- package/lib/currencies/cryptoIcons.d.ts.map +1 -0
- package/lib/currencies/cryptoIcons.js +24 -0
- package/lib/currencies/cryptoIcons.js.map +1 -0
- package/lib/currencies/helpers.d.ts +0 -1
- package/lib/currencies/helpers.d.ts.map +1 -1
- package/lib/currencies/helpers.js +1 -7
- package/lib/currencies/helpers.js.map +1 -1
- package/lib/e2e/data/deviceLabelsData.d.ts.map +1 -1
- package/lib/e2e/data/deviceLabelsData.js +0 -1
- package/lib/e2e/data/deviceLabelsData.js.map +1 -1
- package/lib/e2e/enum/Device.d.ts +0 -1
- package/lib/e2e/enum/Device.d.ts.map +1 -1
- package/lib/e2e/enum/Device.js +0 -1
- package/lib/e2e/enum/Device.js.map +1 -1
- package/lib/e2e/families/cardano.d.ts.map +1 -1
- package/lib/e2e/families/cardano.js +14 -29
- package/lib/e2e/families/cardano.js.map +1 -1
- package/lib/e2e/index.d.ts +3 -23
- package/lib/e2e/index.d.ts.map +1 -1
- package/lib/e2e/index.js +1 -21
- package/lib/e2e/index.js.map +1 -1
- package/lib/e2e/speculos.d.ts.map +1 -1
- package/lib/e2e/speculos.js +4 -31
- package/lib/e2e/speculos.js.map +1 -1
- package/lib/e2e/speculosAppVersion.d.ts.map +1 -1
- package/lib/e2e/speculosAppVersion.js +2 -6
- package/lib/e2e/speculosAppVersion.js.map +1 -1
- package/lib/e2e/swap.d.ts.map +1 -1
- package/lib/e2e/swap.js +6 -7
- package/lib/e2e/swap.js.map +1 -1
- package/lib/env.react.d.ts +1 -1
- package/lib/env.react.d.ts.map +1 -1
- package/lib/exchange/swap/postSwapState.d.ts.map +1 -1
- package/lib/exchange/swap/postSwapState.js +6 -10
- package/lib/exchange/swap/postSwapState.js.map +1 -1
- package/lib/exchange/swap/types.d.ts +1 -3
- package/lib/exchange/swap/types.d.ts.map +1 -1
- package/lib/families/bitcoin/walletApiAdapter.d.ts.map +1 -1
- package/lib/families/bitcoin/walletApiAdapter.js +0 -3
- package/lib/families/bitcoin/walletApiAdapter.js.map +1 -1
- package/lib/families/canton/config.d.ts.map +1 -1
- package/lib/families/canton/config.js +4 -4
- package/lib/families/canton/config.js.map +1 -1
- package/lib/families/canton/react.d.ts +0 -2
- package/lib/families/canton/react.d.ts.map +1 -1
- package/lib/families/canton/react.js +1 -40
- package/lib/families/canton/react.js.map +1 -1
- package/lib/families/celo/setup.d.ts.map +1 -1
- package/lib/families/celo/setup.js +0 -11
- package/lib/families/celo/setup.js.map +1 -1
- package/lib/families/evm/bridge/mock.d.ts +0 -1
- package/lib/families/evm/bridge/mock.d.ts.map +1 -1
- package/lib/families/evm/bridge/mock.js +0 -12
- package/lib/families/evm/bridge/mock.js.map +1 -1
- package/lib/families/evm/setup.d.ts +4 -1
- package/lib/families/evm/setup.d.ts.map +1 -1
- package/lib/families/evm/setup.js +8 -1
- package/lib/families/evm/setup.js.map +1 -1
- package/lib/families/evm/walletApiAdapter.d.ts +0 -7
- package/lib/families/evm/walletApiAdapter.d.ts.map +1 -1
- package/lib/families/evm/walletApiAdapter.js +2 -36
- package/lib/families/evm/walletApiAdapter.js.map +1 -1
- package/lib/families/polkadot/config.js +1 -1
- package/lib/families/polkadot/config.js.map +1 -1
- package/lib/families/stacks/constants.d.ts +1 -1
- package/lib/families/stacks/constants.d.ts.map +1 -1
- package/lib/families/stacks/constants.js +1 -1
- package/lib/families/stacks/constants.js.map +1 -1
- package/lib/featureFlags/defaultFeatures.d.ts.map +1 -1
- package/lib/featureFlags/defaultFeatures.js +1 -18
- package/lib/featureFlags/defaultFeatures.js.map +1 -1
- package/lib/featureFlags/stakePrograms/index.js +4 -4
- package/lib/featureFlags/stakePrograms/index.js.map +1 -1
- package/lib/featureFlags/useFeature.d.ts +1 -1
- package/lib/featureFlags/useFeature.d.ts.map +1 -1
- package/lib/generated/bridge/js.d.ts +1 -0
- package/lib/generated/bridge/js.d.ts.map +1 -1
- package/lib/generated/bridge/js.js +32 -30
- package/lib/generated/bridge/js.js.map +1 -1
- package/lib/generated/bridge/mock.d.ts +0 -1
- package/lib/generated/bridge/mock.d.ts.map +1 -1
- package/lib/helpers.d.ts +0 -1
- package/lib/helpers.d.ts.map +1 -1
- package/lib/helpers.js +0 -15
- package/lib/helpers.js.map +1 -1
- package/lib/hw/getAppAndVersion.d.ts +1 -3
- package/lib/hw/getAppAndVersion.d.ts.map +1 -1
- package/lib/hw/getAppAndVersion.js +2 -2
- package/lib/hw/getAppAndVersion.js.map +1 -1
- package/lib/load/speculos.d.ts.map +1 -1
- package/lib/load/speculos.js +0 -1
- package/lib/load/speculos.js.map +1 -1
- package/lib/operation.d.ts.map +1 -1
- package/lib/operation.js +2 -7
- package/lib/operation.js.map +1 -1
- package/lib/postOnboarding/reducer.d.ts +0 -2
- package/lib/postOnboarding/reducer.d.ts.map +1 -1
- package/lib/react.d.ts +16 -0
- package/lib/react.d.ts.map +1 -0
- package/lib/react.js +64 -0
- package/lib/react.js.map +1 -0
- package/lib/reactNative.d.ts +16 -0
- package/lib/reactNative.d.ts.map +1 -0
- package/lib/reactNative.js +43 -0
- package/lib/reactNative.js.map +1 -0
- package/lib/wallet-api/Exchange/server.d.ts.map +1 -1
- package/lib/wallet-api/Exchange/server.js +0 -4
- package/lib/wallet-api/Exchange/server.js.map +1 -1
- package/lib/wallet-api/constants.d.ts +1 -1
- package/lib/walletSync/getEnvironmentParams.js +6 -6
- package/lib/walletSync/getEnvironmentParams.js.map +1 -1
- package/lib-es/__tests__/test-helpers/bridge.js +1 -1
- package/lib-es/__tests__/test-helpers/bridge.js.map +1 -1
- package/lib-es/__tests__/test-helpers/environment.js +0 -1
- package/lib-es/__tests__/test-helpers/environment.js.map +1 -1
- package/lib-es/account/index.d.ts +0 -1
- package/lib-es/account/index.d.ts.map +1 -1
- package/lib-es/account/index.js +0 -1
- package/lib-es/account/index.js.map +1 -1
- package/lib-es/bridge/generic-alpaca/accountBridge.d.ts +1 -1
- package/lib-es/bridge/generic-alpaca/accountBridge.d.ts.map +1 -1
- package/lib-es/bridge/generic-alpaca/accountBridge.js +1 -2
- package/lib-es/bridge/generic-alpaca/accountBridge.js.map +1 -1
- package/lib-es/bridge/generic-alpaca/broadcast.d.ts.map +1 -1
- package/lib-es/bridge/generic-alpaca/broadcast.js +3 -3
- package/lib-es/bridge/generic-alpaca/broadcast.js.map +1 -1
- package/lib-es/bridge/generic-alpaca/currencyBridge.d.ts.map +1 -1
- package/lib-es/bridge/generic-alpaca/currencyBridge.js +3 -3
- package/lib-es/bridge/generic-alpaca/currencyBridge.js.map +1 -1
- package/lib-es/bridge/generic-alpaca/estimateMaxSpendable.d.ts.map +1 -1
- package/lib-es/bridge/generic-alpaca/estimateMaxSpendable.js +1 -2
- package/lib-es/bridge/generic-alpaca/estimateMaxSpendable.js.map +1 -1
- package/lib-es/bridge/generic-alpaca/getAccountShape.d.ts.map +1 -1
- package/lib-es/bridge/generic-alpaca/getAccountShape.js +7 -16
- package/lib-es/bridge/generic-alpaca/getAccountShape.js.map +1 -1
- package/lib-es/bridge/generic-alpaca/getTransactionStatus.d.ts.map +1 -1
- package/lib-es/bridge/generic-alpaca/getTransactionStatus.js +1 -16
- package/lib-es/bridge/generic-alpaca/getTransactionStatus.js.map +1 -1
- package/lib-es/bridge/generic-alpaca/prepareTransaction.d.ts.map +1 -1
- package/lib-es/bridge/generic-alpaca/prepareTransaction.js +4 -38
- package/lib-es/bridge/generic-alpaca/prepareTransaction.js.map +1 -1
- package/lib-es/bridge/generic-alpaca/signOperation.d.ts.map +1 -1
- package/lib-es/bridge/generic-alpaca/signOperation.js +2 -18
- package/lib-es/bridge/generic-alpaca/signOperation.js.map +1 -1
- package/lib-es/bridge/generic-alpaca/signer/Eth.d.ts +0 -2
- package/lib-es/bridge/generic-alpaca/signer/Eth.d.ts.map +1 -1
- package/lib-es/bridge/generic-alpaca/signer/Eth.js +0 -4
- package/lib-es/bridge/generic-alpaca/signer/Eth.js.map +1 -1
- package/lib-es/bridge/generic-alpaca/signer/index.d.ts.map +1 -1
- package/lib-es/bridge/generic-alpaca/signer/index.js +0 -7
- package/lib-es/bridge/generic-alpaca/signer/index.js.map +1 -1
- package/lib-es/bridge/generic-alpaca/types.d.ts +0 -4
- package/lib-es/bridge/generic-alpaca/types.d.ts.map +1 -1
- package/lib-es/bridge/generic-alpaca/utils.d.ts.map +1 -1
- package/lib-es/bridge/generic-alpaca/utils.js +3 -12
- package/lib-es/bridge/generic-alpaca/utils.js.map +1 -1
- package/lib-es/bridge/impl.d.ts.map +1 -1
- package/lib-es/bridge/impl.js +3 -14
- package/lib-es/bridge/impl.js.map +1 -1
- package/lib-es/currencies/cryptoIcons.d.ts +3 -0
- package/lib-es/currencies/cryptoIcons.d.ts.map +1 -0
- package/lib-es/currencies/cryptoIcons.js +20 -0
- package/lib-es/currencies/cryptoIcons.js.map +1 -0
- package/lib-es/currencies/helpers.d.ts +0 -1
- package/lib-es/currencies/helpers.d.ts.map +1 -1
- package/lib-es/currencies/helpers.js +0 -5
- package/lib-es/currencies/helpers.js.map +1 -1
- package/lib-es/e2e/data/deviceLabelsData.d.ts.map +1 -1
- package/lib-es/e2e/data/deviceLabelsData.js +0 -1
- package/lib-es/e2e/data/deviceLabelsData.js.map +1 -1
- package/lib-es/e2e/enum/Device.d.ts +0 -1
- package/lib-es/e2e/enum/Device.d.ts.map +1 -1
- package/lib-es/e2e/enum/Device.js +0 -1
- package/lib-es/e2e/enum/Device.js.map +1 -1
- package/lib-es/e2e/families/cardano.d.ts.map +1 -1
- package/lib-es/e2e/families/cardano.js +14 -29
- package/lib-es/e2e/families/cardano.js.map +1 -1
- package/lib-es/e2e/index.d.ts +3 -23
- package/lib-es/e2e/index.d.ts.map +1 -1
- package/lib-es/e2e/index.js +0 -16
- package/lib-es/e2e/index.js.map +1 -1
- package/lib-es/e2e/speculos.d.ts.map +1 -1
- package/lib-es/e2e/speculos.js +4 -31
- package/lib-es/e2e/speculos.js.map +1 -1
- package/lib-es/e2e/speculosAppVersion.d.ts.map +1 -1
- package/lib-es/e2e/speculosAppVersion.js +2 -6
- package/lib-es/e2e/speculosAppVersion.js.map +1 -1
- package/lib-es/e2e/swap.d.ts.map +1 -1
- package/lib-es/e2e/swap.js +6 -7
- package/lib-es/e2e/swap.js.map +1 -1
- package/lib-es/env.react.d.ts +1 -1
- package/lib-es/env.react.d.ts.map +1 -1
- package/lib-es/exchange/swap/postSwapState.d.ts.map +1 -1
- package/lib-es/exchange/swap/postSwapState.js +6 -10
- package/lib-es/exchange/swap/postSwapState.js.map +1 -1
- package/lib-es/exchange/swap/types.d.ts +1 -3
- package/lib-es/exchange/swap/types.d.ts.map +1 -1
- package/lib-es/families/bitcoin/walletApiAdapter.d.ts.map +1 -1
- package/lib-es/families/bitcoin/walletApiAdapter.js +0 -3
- package/lib-es/families/bitcoin/walletApiAdapter.js.map +1 -1
- package/lib-es/families/canton/config.d.ts.map +1 -1
- package/lib-es/families/canton/config.js +4 -4
- package/lib-es/families/canton/config.js.map +1 -1
- package/lib-es/families/canton/react.d.ts +0 -2
- package/lib-es/families/canton/react.d.ts.map +1 -1
- package/lib-es/families/canton/react.js +1 -38
- package/lib-es/families/canton/react.js.map +1 -1
- package/lib-es/families/celo/setup.d.ts.map +1 -1
- package/lib-es/families/celo/setup.js +0 -11
- package/lib-es/families/celo/setup.js.map +1 -1
- package/lib-es/families/evm/bridge/mock.d.ts +0 -1
- package/lib-es/families/evm/bridge/mock.d.ts.map +1 -1
- package/lib-es/families/evm/bridge/mock.js +0 -12
- package/lib-es/families/evm/bridge/mock.js.map +1 -1
- package/lib-es/families/evm/setup.d.ts +4 -1
- package/lib-es/families/evm/setup.d.ts.map +1 -1
- package/lib-es/families/evm/setup.js +8 -2
- package/lib-es/families/evm/setup.js.map +1 -1
- package/lib-es/families/evm/walletApiAdapter.d.ts +0 -7
- package/lib-es/families/evm/walletApiAdapter.d.ts.map +1 -1
- package/lib-es/families/evm/walletApiAdapter.js +1 -30
- package/lib-es/families/evm/walletApiAdapter.js.map +1 -1
- package/lib-es/families/polkadot/config.js +1 -1
- package/lib-es/families/polkadot/config.js.map +1 -1
- package/lib-es/families/stacks/constants.d.ts +1 -1
- package/lib-es/families/stacks/constants.d.ts.map +1 -1
- package/lib-es/families/stacks/constants.js +1 -1
- package/lib-es/families/stacks/constants.js.map +1 -1
- package/lib-es/featureFlags/defaultFeatures.d.ts.map +1 -1
- package/lib-es/featureFlags/defaultFeatures.js +1 -18
- package/lib-es/featureFlags/defaultFeatures.js.map +1 -1
- package/lib-es/featureFlags/stakePrograms/index.js +4 -4
- package/lib-es/featureFlags/stakePrograms/index.js.map +1 -1
- package/lib-es/featureFlags/useFeature.d.ts +1 -1
- package/lib-es/featureFlags/useFeature.d.ts.map +1 -1
- package/lib-es/generated/bridge/js.d.ts +1 -0
- package/lib-es/generated/bridge/js.d.ts.map +1 -1
- package/lib-es/generated/bridge/js.js +2 -0
- package/lib-es/generated/bridge/js.js.map +1 -1
- package/lib-es/generated/bridge/mock.d.ts +0 -1
- package/lib-es/generated/bridge/mock.d.ts.map +1 -1
- package/lib-es/helpers.d.ts +0 -1
- package/lib-es/helpers.d.ts.map +1 -1
- package/lib-es/helpers.js +0 -1
- package/lib-es/helpers.js.map +1 -1
- package/lib-es/hw/getAppAndVersion.d.ts +1 -3
- package/lib-es/hw/getAppAndVersion.d.ts.map +1 -1
- package/lib-es/hw/getAppAndVersion.js +2 -2
- package/lib-es/hw/getAppAndVersion.js.map +1 -1
- package/lib-es/load/speculos.d.ts.map +1 -1
- package/lib-es/load/speculos.js +0 -1
- package/lib-es/load/speculos.js.map +1 -1
- package/lib-es/operation.d.ts.map +1 -1
- package/lib-es/operation.js +2 -7
- package/lib-es/operation.js.map +1 -1
- package/lib-es/postOnboarding/reducer.d.ts +0 -2
- package/lib-es/postOnboarding/reducer.d.ts.map +1 -1
- package/lib-es/react.d.ts +16 -0
- package/lib-es/react.d.ts.map +1 -0
- package/lib-es/react.js +33 -0
- package/lib-es/react.js.map +1 -0
- package/lib-es/reactNative.d.ts +16 -0
- package/lib-es/reactNative.d.ts.map +1 -0
- package/lib-es/reactNative.js +15 -0
- package/lib-es/reactNative.js.map +1 -0
- package/lib-es/wallet-api/Exchange/server.d.ts.map +1 -1
- package/lib-es/wallet-api/Exchange/server.js +0 -4
- package/lib-es/wallet-api/Exchange/server.js.map +1 -1
- package/lib-es/wallet-api/constants.d.ts +1 -1
- package/lib-es/walletSync/getEnvironmentParams.js +6 -6
- package/lib-es/walletSync/getEnvironmentParams.js.map +1 -1
- package/package.json +86 -78
- package/react.js +1 -0
- package/reactNative.js +1 -0
- package/src/__tests__/test-helpers/bridge.ts +1 -1
- package/src/__tests__/test-helpers/environment.ts +0 -1
- package/src/account/index.ts +0 -6
- package/src/bridge/generic-alpaca/accountBridge.ts +2 -3
- package/src/bridge/generic-alpaca/broadcast.ts +3 -6
- package/src/bridge/generic-alpaca/currencyBridge.ts +3 -3
- package/src/bridge/generic-alpaca/estimateMaxSpendable.ts +1 -2
- package/src/bridge/generic-alpaca/getAccountShape.ts +12 -24
- package/src/bridge/generic-alpaca/getTransactionStatus.ts +1 -16
- package/src/bridge/generic-alpaca/prepareTransaction.ts +10 -44
- package/src/bridge/generic-alpaca/signOperation.ts +2 -18
- package/src/bridge/generic-alpaca/signer/Eth.ts +1 -5
- package/src/bridge/generic-alpaca/signer/index.ts +0 -7
- package/src/bridge/generic-alpaca/tests/getAccountShape.test.ts +2 -2
- package/src/bridge/generic-alpaca/tests/prepareTransaction.test.ts +0 -32
- package/src/bridge/generic-alpaca/types.ts +0 -4
- package/src/bridge/generic-alpaca/utils.test.ts +0 -4
- package/src/bridge/generic-alpaca/utils.ts +3 -15
- package/src/bridge/impl.ts +3 -16
- package/src/currencies/cryptoIcons.test.ts +54 -0
- package/src/currencies/cryptoIcons.ts +21 -0
- package/src/currencies/helpers.test.ts +1 -10
- package/src/currencies/helpers.ts +0 -6
- package/src/e2e/data/deviceLabelsData.ts +0 -1
- package/src/e2e/enum/Device.ts +0 -1
- package/src/e2e/families/cardano.ts +14 -32
- package/src/e2e/index.ts +0 -20
- package/src/e2e/speculos.ts +4 -35
- package/src/e2e/speculosAppVersion.ts +2 -8
- package/src/e2e/swap.ts +7 -8
- package/src/exchange/swap/postSwapState.ts +5 -10
- package/src/exchange/swap/types.ts +1 -3
- package/src/families/bitcoin/walletApiAdapter.test.ts +0 -36
- package/src/families/bitcoin/walletApiAdapter.ts +0 -4
- package/src/families/canton/config.ts +4 -5
- package/src/families/canton/react.ts +1 -45
- package/src/families/celo/setup.ts +0 -12
- package/src/families/cosmos/datasets/__snapshots__/cosmos.integration.test.ts.snap +4 -73
- package/src/families/cosmos/datasets/__snapshots__/cryptoOrg.integration.test.ts.snap +2 -2
- package/src/families/cosmos/datasets/__snapshots__/injective.integration.test.ts.snap +2 -2
- package/src/families/cosmos/datasets/__snapshots__/mantra.integration.test.ts.snap +2 -2
- package/src/families/cosmos/datasets/__snapshots__/osmosis.integration.test.ts.snap +2 -2
- package/src/families/cosmos/datasets/__snapshots__/persistence.integration.test.ts.snap +4 -4
- package/src/families/cosmos/datasets/__snapshots__/stargaze.integration.test.ts.snap +2 -2
- package/src/families/evm/bridge/mock.ts +0 -14
- package/src/families/evm/setup.ts +22 -3
- package/src/families/evm/walletApiAdapter.ts +1 -33
- package/src/families/hedera/__snapshots__/bridge.integration.test.ts.snap +17 -278
- package/src/families/polkadot/__snapshots__/bridge.integration.test.ts.snap +3653 -6
- package/src/families/polkadot/config.ts +1 -1
- package/src/families/stacks/__snapshots__/bridge.integration.test.ts.snap +17 -1536
- package/src/families/stacks/__tests__/sync.integration.test.ts +2 -2
- package/src/families/stacks/constants.ts +1 -1
- package/src/families/stellar/__snapshots__/bridge.integration.test.ts.snap +9 -9
- package/src/featureFlags/defaultFeatures.ts +1 -18
- package/src/featureFlags/stakePrograms/index.ts +4 -4
- package/src/generated/bridge/js.ts +2 -0
- package/src/helpers.ts +0 -2
- package/src/hw/getAppAndVersion.ts +1 -2
- package/src/load/speculos.ts +0 -1
- package/src/operation.ts +2 -10
- package/src/react.tsx +43 -0
- package/src/reactNative.ts +23 -0
- package/src/reactNativeSvg.d.ts +19 -0
- package/src/wallet-api/Exchange/server.ts +0 -5
- package/src/walletSync/getEnvironmentParams.ts +6 -6
- package/lib/account/recentAddresses.d.ts +0 -10
- package/lib/account/recentAddresses.d.ts.map +0 -1
- package/lib/account/recentAddresses.js +0 -60
- package/lib/account/recentAddresses.js.map +0 -1
- package/lib/bridge/generic-alpaca/postSync.d.ts +0 -16
- package/lib/bridge/generic-alpaca/postSync.d.ts.map +0 -1
- package/lib/bridge/generic-alpaca/postSync.js +0 -44
- package/lib/bridge/generic-alpaca/postSync.js.map +0 -1
- package/lib/e2e/data/regexes.d.ts +0 -2
- package/lib/e2e/data/regexes.d.ts.map +0 -1
- package/lib/e2e/data/regexes.js +0 -5
- package/lib/e2e/data/regexes.js.map +0 -1
- package/lib/families/hedera/react.d.ts +0 -6
- package/lib/families/hedera/react.d.ts.map +0 -1
- package/lib/families/hedera/react.js +0 -50
- package/lib/families/hedera/react.js.map +0 -1
- package/lib/helpers/cryptoIconSize.d.ts +0 -3
- package/lib/helpers/cryptoIconSize.d.ts.map +0 -1
- package/lib/helpers/cryptoIconSize.js +0 -40
- package/lib/helpers/cryptoIconSize.js.map +0 -1
- package/lib/hooks/useHtmlLinkSegments.d.ts +0 -19
- package/lib/hooks/useHtmlLinkSegments.d.ts.map +0 -1
- package/lib/hooks/useHtmlLinkSegments.js +0 -128
- package/lib/hooks/useHtmlLinkSegments.js.map +0 -1
- package/lib-es/account/recentAddresses.d.ts +0 -10
- package/lib-es/account/recentAddresses.d.ts.map +0 -1
- package/lib-es/account/recentAddresses.js +0 -55
- package/lib-es/account/recentAddresses.js.map +0 -1
- package/lib-es/bridge/generic-alpaca/postSync.d.ts +0 -16
- package/lib-es/bridge/generic-alpaca/postSync.d.ts.map +0 -1
- package/lib-es/bridge/generic-alpaca/postSync.js +0 -37
- package/lib-es/bridge/generic-alpaca/postSync.js.map +0 -1
- package/lib-es/e2e/data/regexes.d.ts +0 -2
- package/lib-es/e2e/data/regexes.d.ts.map +0 -1
- package/lib-es/e2e/data/regexes.js +0 -2
- package/lib-es/e2e/data/regexes.js.map +0 -1
- package/lib-es/families/hedera/react.d.ts +0 -6
- package/lib-es/families/hedera/react.d.ts.map +0 -1
- package/lib-es/families/hedera/react.js +0 -41
- package/lib-es/families/hedera/react.js.map +0 -1
- package/lib-es/helpers/cryptoIconSize.d.ts +0 -3
- package/lib-es/helpers/cryptoIconSize.d.ts.map +0 -1
- package/lib-es/helpers/cryptoIconSize.js +0 -35
- package/lib-es/helpers/cryptoIconSize.js.map +0 -1
- package/lib-es/hooks/useHtmlLinkSegments.d.ts +0 -19
- package/lib-es/hooks/useHtmlLinkSegments.d.ts.map +0 -1
- package/lib-es/hooks/useHtmlLinkSegments.js +0 -121
- package/lib-es/hooks/useHtmlLinkSegments.js.map +0 -1
- package/src/account/recentAddresses.test.ts +0 -104
- package/src/account/recentAddresses.ts +0 -84
- package/src/bridge/generic-alpaca/postSync.test.ts +0 -97
- package/src/bridge/generic-alpaca/postSync.ts +0 -42
- package/src/e2e/data/regexes.ts +0 -1
- package/src/families/canton/react.test.ts +0 -147
- package/src/families/hedera/react.test.ts +0 -272
- package/src/families/hedera/react.ts +0 -63
- package/src/helpers/cryptoIconSize.ts +0 -25
- package/src/hooks/__tests__/useHtmlLinkSegments.test.ts +0 -105
- package/src/hooks/useHtmlLinkSegments.ts +0 -158
|
@@ -16,10 +16,10 @@ describe("sync for token transfers", () => {
|
|
|
16
16
|
});
|
|
17
17
|
|
|
18
18
|
test("sync build operations only for transfer type txn", async () => {
|
|
19
|
-
const
|
|
19
|
+
const rawTxs = await fetchFullTxs(address);
|
|
20
20
|
|
|
21
21
|
// Contains operations for txn of type token_transfer
|
|
22
|
-
const operations = flatMap(
|
|
22
|
+
const operations = flatMap(rawTxs, mapTxToOps(accountId, address));
|
|
23
23
|
|
|
24
24
|
expect(operations.length).toBeTruthy();
|
|
25
25
|
});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Encapsulate for LLD & LLM
|
|
2
|
-
export * from "@ledgerhq/coin-stacks/
|
|
2
|
+
export * from "@ledgerhq/coin-stacks/contants";
|
|
@@ -16,7 +16,7 @@ exports[`stellar currency bridge scanAccounts stellar seed 1 1`] = `
|
|
|
16
16
|
"spendableBalance": "311064932",
|
|
17
17
|
"subAccounts": [],
|
|
18
18
|
"swapHistory": [],
|
|
19
|
-
"syncHash": "
|
|
19
|
+
"syncHash": "0x1431ef5f",
|
|
20
20
|
"used": true,
|
|
21
21
|
"xpub": "GAT4LBXYJGJJJRSNK74NPFLO55CDDXSYVMQODSEAAH3M6EY4S7LPH5GV",
|
|
22
22
|
},
|
|
@@ -31,10 +31,10 @@ exports[`stellar currency bridge scanAccounts stellar seed 1 1`] = `
|
|
|
31
31
|
"operationsCount": 43,
|
|
32
32
|
"pendingOperations": [],
|
|
33
33
|
"seedIdentifier": "27c586f8499294c64d57f8d7956eef4431de58ab20e1c88001f6cf131c97d6f3",
|
|
34
|
-
"spendableBalance": "
|
|
34
|
+
"spendableBalance": "79999759",
|
|
35
35
|
"subAccounts": [],
|
|
36
36
|
"swapHistory": [],
|
|
37
|
-
"syncHash": "
|
|
37
|
+
"syncHash": "0x1431ef5f",
|
|
38
38
|
"used": true,
|
|
39
39
|
"xpub": "GAIXIJBMYPTSF2CDVQ35WOTULCLZIE4W2SDEK3RQGAA3A22BPWY7R53Z",
|
|
40
40
|
},
|
|
@@ -49,10 +49,10 @@ exports[`stellar currency bridge scanAccounts stellar seed 1 1`] = `
|
|
|
49
49
|
"operationsCount": 38,
|
|
50
50
|
"pendingOperations": [],
|
|
51
51
|
"seedIdentifier": "27c586f8499294c64d57f8d7956eef4431de58ab20e1c88001f6cf131c97d6f3",
|
|
52
|
-
"spendableBalance": "
|
|
52
|
+
"spendableBalance": "44999261",
|
|
53
53
|
"subAccounts": [],
|
|
54
54
|
"swapHistory": [],
|
|
55
|
-
"syncHash": "
|
|
55
|
+
"syncHash": "0x1431ef5f",
|
|
56
56
|
"used": true,
|
|
57
57
|
"xpub": "GCDDN6T2LJN3T7SPWJQV6BCCL5KNY5GBN7X4CMSZLDEXDHXAH32TOAHS",
|
|
58
58
|
},
|
|
@@ -67,10 +67,10 @@ exports[`stellar currency bridge scanAccounts stellar seed 1 1`] = `
|
|
|
67
67
|
"operationsCount": 17,
|
|
68
68
|
"pendingOperations": [],
|
|
69
69
|
"seedIdentifier": "27c586f8499294c64d57f8d7956eef4431de58ab20e1c88001f6cf131c97d6f3",
|
|
70
|
-
"spendableBalance": "
|
|
70
|
+
"spendableBalance": "10145720",
|
|
71
71
|
"subAccounts": [],
|
|
72
72
|
"swapHistory": [],
|
|
73
|
-
"syncHash": "
|
|
73
|
+
"syncHash": "0x1431ef5f",
|
|
74
74
|
"used": true,
|
|
75
75
|
"xpub": "GAHQKL7UW5DSNJXWNA4ASJ6D2I7JYFWVHDFWYJZK3WDR4BUTG27K2PWC",
|
|
76
76
|
},
|
|
@@ -88,7 +88,7 @@ exports[`stellar currency bridge scanAccounts stellar seed 1 1`] = `
|
|
|
88
88
|
"spendableBalance": "0",
|
|
89
89
|
"subAccounts": [],
|
|
90
90
|
"swapHistory": [],
|
|
91
|
-
"syncHash": "
|
|
91
|
+
"syncHash": "0x1431ef5f",
|
|
92
92
|
"used": true,
|
|
93
93
|
"xpub": "GBQMOU2WYJUP6AKY53FFKZJGQMDWCMTWSOUTZ5DVIAQPVW7AJUHSX2M5",
|
|
94
94
|
},
|
|
@@ -106,7 +106,7 @@ exports[`stellar currency bridge scanAccounts stellar seed 1 1`] = `
|
|
|
106
106
|
"spendableBalance": "0",
|
|
107
107
|
"subAccounts": [],
|
|
108
108
|
"swapHistory": [],
|
|
109
|
-
"syncHash": "
|
|
109
|
+
"syncHash": "0x1431ef5f",
|
|
110
110
|
"used": false,
|
|
111
111
|
"xpub": "GAJEKFXY76YWDSKJESDOKS2EGKRMCHSIC5AU32SU7OF54E5VVREUHXLH",
|
|
112
112
|
},
|
|
@@ -8,7 +8,6 @@ import {
|
|
|
8
8
|
import reduce from "lodash/reduce";
|
|
9
9
|
import { BUY_SELL_UI_APP_ID } from "../wallet-api/constants";
|
|
10
10
|
import { formatToFirebaseFeatureId } from "./firebaseFeatureFlags";
|
|
11
|
-
import { DeviceModelId } from "@ledgerhq/types-devices";
|
|
12
11
|
|
|
13
12
|
/**
|
|
14
13
|
* Default disabled feature.
|
|
@@ -216,18 +215,6 @@ export const DEFAULT_FEATURES: Features = {
|
|
|
216
215
|
protectId: "protect-simu",
|
|
217
216
|
},
|
|
218
217
|
},
|
|
219
|
-
recoverUpsellPostOnboarding: {
|
|
220
|
-
...DEFAULT_FEATURE,
|
|
221
|
-
params: {
|
|
222
|
-
deviceIds: [
|
|
223
|
-
DeviceModelId.nanoSP,
|
|
224
|
-
DeviceModelId.nanoX,
|
|
225
|
-
DeviceModelId.stax,
|
|
226
|
-
DeviceModelId.europa,
|
|
227
|
-
DeviceModelId.apex,
|
|
228
|
-
],
|
|
229
|
-
},
|
|
230
|
-
},
|
|
231
218
|
|
|
232
219
|
storyly: {
|
|
233
220
|
enabled: false,
|
|
@@ -596,8 +583,6 @@ export const DEFAULT_FEATURES: Features = {
|
|
|
596
583
|
postOnboarding: true,
|
|
597
584
|
},
|
|
598
585
|
},
|
|
599
|
-
lwmLedgerSyncOptimisation: DEFAULT_FEATURE,
|
|
600
|
-
lwdLedgerSyncOptimisation: DEFAULT_FEATURE,
|
|
601
586
|
lldNanoSUpsellBanners: {
|
|
602
587
|
...DEFAULT_FEATURE,
|
|
603
588
|
params: {
|
|
@@ -682,8 +667,8 @@ export const DEFAULT_FEATURES: Features = {
|
|
|
682
667
|
chains: ["ethereum", "polygon", "base", "arbitrum"],
|
|
683
668
|
},
|
|
684
669
|
},
|
|
685
|
-
ldmkSolanaSigner: DEFAULT_FEATURE,
|
|
686
670
|
ldmkConnectApp: DEFAULT_FEATURE,
|
|
671
|
+
ldmkSolanaSigner: DEFAULT_FEATURE,
|
|
687
672
|
lldNetworkBasedAddAccount: DEFAULT_FEATURE,
|
|
688
673
|
llmDatadog: {
|
|
689
674
|
...DEFAULT_FEATURE,
|
|
@@ -733,8 +718,6 @@ export const DEFAULT_FEATURES: Features = {
|
|
|
733
718
|
},
|
|
734
719
|
},
|
|
735
720
|
zcashShielded: DEFAULT_FEATURE,
|
|
736
|
-
llmNanoOnboardingFundWallet: DEFAULT_FEATURE,
|
|
737
|
-
lldRebornABtest: DEFAULT_FEATURE,
|
|
738
721
|
};
|
|
739
722
|
|
|
740
723
|
// Firebase SDK treat JSON values as strings
|
|
@@ -44,7 +44,7 @@ export const getBitcoinYieldSetting = (stakePrograms: Feature_StakePrograms | nu
|
|
|
44
44
|
};
|
|
45
45
|
|
|
46
46
|
export const getEthDepositScreenSetting = (stakePrograms: Feature_StakePrograms | null): string => {
|
|
47
|
-
/** Check if Ethereum has "earn" provider configured in redirects with
|
|
47
|
+
/** Check if Ethereum has "earn" provider configured in redirects with cohort. */
|
|
48
48
|
const ethereumRedirect = stakePrograms?.enabled
|
|
49
49
|
? stakePrograms?.params?.redirects?.["ethereum"]
|
|
50
50
|
: undefined;
|
|
@@ -55,8 +55,8 @@ export const getEthDepositScreenSetting = (stakePrograms: Feature_StakePrograms
|
|
|
55
55
|
return "standard";
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
// Extract
|
|
59
|
-
const
|
|
58
|
+
// Extract cohort from queryParams
|
|
59
|
+
const cohort = ethereumRedirect.queryParams?.cohort;
|
|
60
60
|
|
|
61
|
-
return
|
|
61
|
+
return cohort ?? "missing_cohort_value";
|
|
62
62
|
};
|
|
@@ -6,6 +6,7 @@ import { bridge as casper } from "../../families/casper/setup";
|
|
|
6
6
|
import { bridge as canton } from "../../families/canton/setup";
|
|
7
7
|
import { bridge as celo } from "../../families/celo/setup";
|
|
8
8
|
import { bridge as cosmos } from "../../families/cosmos/setup";
|
|
9
|
+
import { bridge as evm } from "../../families/evm/setup";
|
|
9
10
|
import { bridge as hedera } from "../../families/hedera/setup";
|
|
10
11
|
import { bridge as filecoin } from "../../families/filecoin/setup";
|
|
11
12
|
import { bridge as internet_computer } from "../../families/internet_computer/setup";
|
|
@@ -31,6 +32,7 @@ export default {
|
|
|
31
32
|
canton,
|
|
32
33
|
celo,
|
|
33
34
|
cosmos,
|
|
35
|
+
evm,
|
|
34
36
|
hedera,
|
|
35
37
|
filecoin,
|
|
36
38
|
internet_computer,
|
package/src/helpers.ts
CHANGED
|
@@ -2,13 +2,12 @@ import { GetAppAndVersionUnsupportedFormat } from "../errors";
|
|
|
2
2
|
import Transport from "@ledgerhq/hw-transport";
|
|
3
3
|
export default async (
|
|
4
4
|
transport: Transport,
|
|
5
|
-
{ abortTimeoutMs }: { abortTimeoutMs?: number } = {},
|
|
6
5
|
): Promise<{
|
|
7
6
|
name: string;
|
|
8
7
|
version: string;
|
|
9
8
|
flags: number | Buffer;
|
|
10
9
|
}> => {
|
|
11
|
-
const r = await transport.send(0xb0, 0x01, 0x00, 0x00
|
|
10
|
+
const r = await transport.send(0xb0, 0x01, 0x00, 0x00);
|
|
12
11
|
let i = 0;
|
|
13
12
|
const format = r[i++];
|
|
14
13
|
|
package/src/load/speculos.ts
CHANGED
package/src/operation.ts
CHANGED
|
@@ -5,16 +5,8 @@ import {
|
|
|
5
5
|
isStuckOperation as isStuckOperationEvm,
|
|
6
6
|
getStuckAccountAndOperation as getStuckAccountAndOperationEvm,
|
|
7
7
|
} from "@ledgerhq/coin-evm/operation";
|
|
8
|
-
import { getCurrencyConfiguration } from "./config";
|
|
9
|
-
import { CryptoCurrency } from "@ledgerhq/types-cryptoassets";
|
|
10
|
-
import { EvmConfigInfo } from "@ledgerhq/coin-evm/config";
|
|
11
8
|
export * from "@ledgerhq/coin-framework/operation";
|
|
12
9
|
|
|
13
|
-
function hasGasTracker(currency: CryptoCurrency): boolean {
|
|
14
|
-
const config = getCurrencyConfiguration<EvmConfigInfo>(currency);
|
|
15
|
-
return !!config.gasTracker;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
10
|
/**
|
|
19
11
|
* Return weather an operation is editable or not.
|
|
20
12
|
*/
|
|
@@ -26,7 +18,7 @@ export const isEditableOperation = ({
|
|
|
26
18
|
operation: Operation;
|
|
27
19
|
}): boolean => {
|
|
28
20
|
if (account.currency.family === "evm") {
|
|
29
|
-
return isEditableOperationEvm(account, operation
|
|
21
|
+
return isEditableOperationEvm(account, operation);
|
|
30
22
|
}
|
|
31
23
|
|
|
32
24
|
return false;
|
|
@@ -66,7 +58,7 @@ export const getStuckAccountAndOperation = (
|
|
|
66
58
|
const mainAccount = getMainAccount(account, parentAccount);
|
|
67
59
|
|
|
68
60
|
if (mainAccount.currency.family === "evm") {
|
|
69
|
-
return getStuckAccountAndOperationEvm(account, parentAccount
|
|
61
|
+
return getStuckAccountAndOperationEvm(account, parentAccount);
|
|
70
62
|
}
|
|
71
63
|
|
|
72
64
|
return undefined;
|
package/src/react.tsx
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { CryptoCurrency, TokenCurrency } from "@ledgerhq/types-cryptoassets";
|
|
3
|
+
import * as icons from "@ledgerhq/crypto-icons-ui/react";
|
|
4
|
+
import { inferCryptoCurrencyIcon } from "./currencies/cryptoIcons";
|
|
5
|
+
|
|
6
|
+
type Icon = React.ComponentType<{
|
|
7
|
+
size: number;
|
|
8
|
+
color?: string;
|
|
9
|
+
}>;
|
|
10
|
+
|
|
11
|
+
const polyfillMappingCache = new WeakMap<Icon, Icon>();
|
|
12
|
+
/**
|
|
13
|
+
* thin wrapper from the crypto-icons lib to the format expected by ledger-live-common
|
|
14
|
+
* @deprecated prefer using @ledgerhq/crypto-icons-ui directly + mapping provided by @ledgerhq/live-common/currencies/cryptoIcons
|
|
15
|
+
*/
|
|
16
|
+
function polyfillIconComponent(IconComponent: Icon | null | undefined): Icon | null | undefined {
|
|
17
|
+
if (!IconComponent) return IconComponent;
|
|
18
|
+
if (polyfillMappingCache.has(IconComponent)) return polyfillMappingCache.get(IconComponent);
|
|
19
|
+
const PolyfillIconComponent = (props: { size: number; color?: string }) =>
|
|
20
|
+
props.color === undefined ? (
|
|
21
|
+
// in the previous behavior, we were fallbacking on "currentColor"
|
|
22
|
+
// if you need this behavior, it will be preferrable to explicit set it. as we will drop this polyfill implementation.
|
|
23
|
+
<IconComponent {...props} color="currentColor" />
|
|
24
|
+
) : (
|
|
25
|
+
<IconComponent {...props} />
|
|
26
|
+
);
|
|
27
|
+
polyfillMappingCache.set(IconComponent, PolyfillIconComponent);
|
|
28
|
+
return PolyfillIconComponent;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* @deprecated prefer using @ledgerhq/crypto-icons-ui directly + mapping provided by @ledgerhq/live-common/currencies/cryptoIcons
|
|
33
|
+
*/
|
|
34
|
+
export function getCryptoCurrencyIcon(currency: CryptoCurrency): Icon | null | undefined {
|
|
35
|
+
return polyfillIconComponent(inferCryptoCurrencyIcon(icons, currency));
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* @deprecated prefer using @ledgerhq/crypto-icons-ui directly + mapping provided by @ledgerhq/live-common/currencies/cryptoIcons
|
|
40
|
+
*/
|
|
41
|
+
export function getTokenCurrencyIcon(token: TokenCurrency): Icon | null | undefined {
|
|
42
|
+
return polyfillIconComponent(inferCryptoCurrencyIcon(icons, token));
|
|
43
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import * as icons from "@ledgerhq/crypto-icons-ui/native";
|
|
3
|
+
import type { CryptoCurrency, TokenCurrency } from "@ledgerhq/types-cryptoassets";
|
|
4
|
+
import { inferCryptoCurrencyIcon } from "./currencies/cryptoIcons";
|
|
5
|
+
|
|
6
|
+
type Icon = React.ComponentType<{
|
|
7
|
+
size: number;
|
|
8
|
+
color: string;
|
|
9
|
+
}>;
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* @deprecated prefer using @ledgerhq/crypto-icons-ui directly + mapping provided by @ledgerhq/live-common/currencies/cryptoIcons
|
|
13
|
+
*/
|
|
14
|
+
export function getCryptoCurrencyIcon(currency: CryptoCurrency): Icon | null | undefined {
|
|
15
|
+
return inferCryptoCurrencyIcon(icons, currency);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* @deprecated prefer using @ledgerhq/crypto-icons-ui directly + mapping provided by @ledgerhq/live-common/currencies/cryptoIcons
|
|
20
|
+
*/
|
|
21
|
+
export function getTokenCurrencyIcon(token: TokenCurrency): Icon | null | undefined {
|
|
22
|
+
return inferCryptoCurrencyIcon(icons, token);
|
|
23
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
declare module "react-native-svg" {
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
|
|
4
|
+
export default class Svg extends React.Component<any, any> {}
|
|
5
|
+
export class Path extends React.Component<any, any> {}
|
|
6
|
+
export class Rect extends React.Component<any, any> {}
|
|
7
|
+
export class Text extends React.Component<any, any> {}
|
|
8
|
+
export class Defs extends React.Component<any, any> {}
|
|
9
|
+
export class ClipPath extends React.Component<any, any> {}
|
|
10
|
+
export class G extends React.Component<any, any> {}
|
|
11
|
+
export class Stop extends React.Component<any, any> {}
|
|
12
|
+
export class Mask extends React.Component<any, any> {}
|
|
13
|
+
export class LinearGradient extends React.Component<any, any> {}
|
|
14
|
+
export class Ellipse extends React.Component<any, any> {}
|
|
15
|
+
export class Circle extends React.Component<any, any> {}
|
|
16
|
+
export class Polygon extends React.Component<any, any> {}
|
|
17
|
+
export class Polyline extends React.Component<any, any> {}
|
|
18
|
+
export class Line extends React.Component<any, any> {}
|
|
19
|
+
}
|
|
@@ -53,8 +53,6 @@ import { getSwapStepFromError } from "../../exchange/error";
|
|
|
53
53
|
import { postSwapCancelled } from "../../exchange/swap";
|
|
54
54
|
import { DeviceModelId } from "@ledgerhq/types-devices";
|
|
55
55
|
import { setBroadcastTransaction } from "../../exchange/swap/setBroadcastTransaction";
|
|
56
|
-
import { Transaction as EvmTransaction } from "@ledgerhq/coin-evm/types/index";
|
|
57
|
-
import { padHexString } from "@ledgerhq/hw-app-eth";
|
|
58
56
|
|
|
59
57
|
export { ExchangeType };
|
|
60
58
|
|
|
@@ -601,9 +599,6 @@ export const handlers = ({
|
|
|
601
599
|
fromAmount,
|
|
602
600
|
seedIdFrom: mainFromAccount.seedIdentifier,
|
|
603
601
|
seedIdTo: toParentAccount?.seedIdentifier || (toAccount as Account)?.seedIdentifier,
|
|
604
|
-
data: (transaction as EvmTransaction).data
|
|
605
|
-
? `0x${padHexString((transaction as EvmTransaction).data?.toString("hex") || "")}`
|
|
606
|
-
: "0x",
|
|
607
602
|
});
|
|
608
603
|
|
|
609
604
|
reject(error);
|
|
@@ -11,12 +11,12 @@ export default function getEnvironmentParams(
|
|
|
11
11
|
): EnvironmentParams {
|
|
12
12
|
return {
|
|
13
13
|
cloudSyncApiBaseUrl:
|
|
14
|
-
environment && environment === "
|
|
15
|
-
? getEnv("
|
|
16
|
-
: getEnv("
|
|
14
|
+
environment && environment === "PROD"
|
|
15
|
+
? getEnv("CLOUD_SYNC_API_PROD")
|
|
16
|
+
: getEnv("CLOUD_SYNC_API_STAGING"),
|
|
17
17
|
trustchainApiBaseUrl:
|
|
18
|
-
environment && environment === "
|
|
19
|
-
? getEnv("
|
|
20
|
-
: getEnv("
|
|
18
|
+
environment && environment === "PROD"
|
|
19
|
+
? getEnv("TRUSTCHAIN_API_PROD")
|
|
20
|
+
: getEnv("TRUSTCHAIN_API_STAGING"),
|
|
21
21
|
};
|
|
22
22
|
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare const RECENT_ADDRESSES_COUNT_LIMIT = 12;
|
|
2
|
-
export type RecentAddressesCache = Record<string, string[]>;
|
|
3
|
-
export interface RecentAddressesStore {
|
|
4
|
-
addAddress(currency: string, address: string): void;
|
|
5
|
-
syncAddresses(cache: RecentAddressesCache): void;
|
|
6
|
-
getAddresses(currency: string): string[];
|
|
7
|
-
}
|
|
8
|
-
export declare function getRecentAddressesStore(): RecentAddressesStore;
|
|
9
|
-
export declare function setupRecentAddressesStore(addressesByCurrency: RecentAddressesCache, onAddAddressComplete: (addressesByCurrency: RecentAddressesCache) => void): void;
|
|
10
|
-
//# sourceMappingURL=recentAddresses.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"recentAddresses.d.ts","sourceRoot":"","sources":["../../src/account/recentAddresses.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,4BAA4B,KAAK,CAAC;AAE/C,MAAM,MAAM,oBAAoB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;AAE5D,MAAM,WAAW,oBAAoB;IACnC,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACpD,aAAa,CAAC,KAAK,EAAE,oBAAoB,GAAG,IAAI,CAAC;IACjD,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;CAC1C;AAMD,wBAAgB,uBAAuB,IAAI,oBAAoB,CAO9D;AAED,wBAAgB,yBAAyB,CACvC,mBAAmB,EAAE,oBAAoB,EACzC,oBAAoB,EAAE,CAAC,mBAAmB,EAAE,oBAAoB,KAAK,IAAI,GACxE,IAAI,CAEN"}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.setupRecentAddressesStore = exports.getRecentAddressesStore = exports.RECENT_ADDRESSES_COUNT_LIMIT = void 0;
|
|
4
|
-
exports.RECENT_ADDRESSES_COUNT_LIMIT = 12;
|
|
5
|
-
let recentAddressesStore = null;
|
|
6
|
-
function getRecentAddressesStore() {
|
|
7
|
-
if (recentAddressesStore === null) {
|
|
8
|
-
throw new Error("Recent addresses store instance is null, please call function setupRecentAddressesStore in application initialization");
|
|
9
|
-
}
|
|
10
|
-
return recentAddressesStore;
|
|
11
|
-
}
|
|
12
|
-
exports.getRecentAddressesStore = getRecentAddressesStore;
|
|
13
|
-
function setupRecentAddressesStore(addressesByCurrency, onAddAddressComplete) {
|
|
14
|
-
recentAddressesStore = new RecentAddressesStoreImpl(addressesByCurrency, onAddAddressComplete);
|
|
15
|
-
}
|
|
16
|
-
exports.setupRecentAddressesStore = setupRecentAddressesStore;
|
|
17
|
-
class RecentAddressesStoreImpl {
|
|
18
|
-
addressesByCurrency = {};
|
|
19
|
-
onAddAddressComplete;
|
|
20
|
-
constructor(addressesByCurrency, onAddAddressComplete) {
|
|
21
|
-
this.addressesByCurrency = { ...addressesByCurrency };
|
|
22
|
-
this.onAddAddressComplete = onAddAddressComplete;
|
|
23
|
-
}
|
|
24
|
-
addAddress(currency, address) {
|
|
25
|
-
this.addAddressToCache(currency, address, "triggerCallback");
|
|
26
|
-
}
|
|
27
|
-
syncAddresses(cache) {
|
|
28
|
-
const previousAddresses = { ...this.addressesByCurrency };
|
|
29
|
-
this.addressesByCurrency = { ...cache };
|
|
30
|
-
for (const currency in previousAddresses) {
|
|
31
|
-
for (const address of previousAddresses[currency]) {
|
|
32
|
-
this.addAddressToCache(currency, address, "skipCallback");
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
this.onAddAddressComplete(this.addressesByCurrency);
|
|
36
|
-
}
|
|
37
|
-
getAddresses(currency) {
|
|
38
|
-
const addresses = this.addressesByCurrency[currency];
|
|
39
|
-
return addresses ?? [];
|
|
40
|
-
}
|
|
41
|
-
addAddressToCache(currency, address, callbackMode) {
|
|
42
|
-
if (!this.addressesByCurrency[currency]) {
|
|
43
|
-
this.addressesByCurrency[currency] = [];
|
|
44
|
-
}
|
|
45
|
-
const addresses = this.addressesByCurrency[currency];
|
|
46
|
-
const addressIndex = addresses.indexOf(address);
|
|
47
|
-
if (addressIndex !== -1) {
|
|
48
|
-
addresses.splice(addressIndex, 1);
|
|
49
|
-
}
|
|
50
|
-
else if (addresses.length >= exports.RECENT_ADDRESSES_COUNT_LIMIT) {
|
|
51
|
-
addresses.pop();
|
|
52
|
-
}
|
|
53
|
-
addresses.unshift(address);
|
|
54
|
-
this.addressesByCurrency[currency] = [...addresses];
|
|
55
|
-
if (callbackMode === "triggerCallback") {
|
|
56
|
-
this.onAddAddressComplete(this.addressesByCurrency);
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
//# sourceMappingURL=recentAddresses.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"recentAddresses.js","sourceRoot":"","sources":["../../src/account/recentAddresses.ts"],"names":[],"mappings":";;;AAAa,QAAA,4BAA4B,GAAG,EAAE,CAAC;AAY/C,IAAI,oBAAoB,GAAgC,IAAI,CAAC;AAE7D,SAAgB,uBAAuB;IACrC,IAAI,oBAAoB,KAAK,IAAI,EAAE;QACjC,MAAM,IAAI,KAAK,CACb,uHAAuH,CACxH,CAAC;KACH;IACD,OAAO,oBAAoB,CAAC;AAC9B,CAAC;AAPD,0DAOC;AAED,SAAgB,yBAAyB,CACvC,mBAAyC,EACzC,oBAAyE;IAEzE,oBAAoB,GAAG,IAAI,wBAAwB,CAAC,mBAAmB,EAAE,oBAAoB,CAAC,CAAC;AACjG,CAAC;AALD,8DAKC;AAED,MAAM,wBAAwB;IACpB,mBAAmB,GAAyB,EAAE,CAAC;IACtC,oBAAoB,CAA0D;IAE/F,YACE,mBAAyC,EACzC,oBAAyE;QAEzE,IAAI,CAAC,mBAAmB,GAAG,EAAE,GAAG,mBAAmB,EAAE,CAAC;QACtD,IAAI,CAAC,oBAAoB,GAAG,oBAAoB,CAAC;IACnD,CAAC;IAED,UAAU,CAAC,QAAgB,EAAE,OAAe;QAC1C,IAAI,CAAC,iBAAiB,CAAC,QAAQ,EAAE,OAAO,EAAE,iBAAiB,CAAC,CAAC;IAC/D,CAAC;IAED,aAAa,CAAC,KAA2B;QACvC,MAAM,iBAAiB,GAAG,EAAE,GAAG,IAAI,CAAC,mBAAmB,EAAE,CAAC;QAC1D,IAAI,CAAC,mBAAmB,GAAG,EAAE,GAAG,KAAK,EAAE,CAAC;QACxC,KAAK,MAAM,QAAQ,IAAI,iBAAiB,EAAE;YACxC,KAAK,MAAM,OAAO,IAAI,iBAAiB,CAAC,QAAQ,CAAC,EAAE;gBACjD,IAAI,CAAC,iBAAiB,CAAC,QAAQ,EAAE,OAAO,EAAE,cAAc,CAAC,CAAC;aAC3D;SACF;QAED,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;IACtD,CAAC;IAED,YAAY,CAAC,QAAgB;QAC3B,MAAM,SAAS,GAAG,IAAI,CAAC,mBAAmB,CAAC,QAAQ,CAAC,CAAC;QACrD,OAAO,SAAS,IAAI,EAAE,CAAC;IACzB,CAAC;IAEO,iBAAiB,CAAC,QAAgB,EAAE,OAAe,EAAE,YAA0B;QACrF,IAAI,CAAC,IAAI,CAAC,mBAAmB,CAAC,QAAQ,CAAC,EAAE;YACvC,IAAI,CAAC,mBAAmB,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC;SACzC;QAED,MAAM,SAAS,GAAG,IAAI,CAAC,mBAAmB,CAAC,QAAQ,CAAC,CAAC;QACrD,MAAM,YAAY,GAAG,SAAS,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QAChD,IAAI,YAAY,KAAK,CAAC,CAAC,EAAE;YACvB,SAAS,CAAC,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC;SACnC;aAAM,IAAI,SAAS,CAAC,MAAM,IAAI,oCAA4B,EAAE;YAC3D,SAAS,CAAC,GAAG,EAAE,CAAC;SACjB;QAED,SAAS,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QAC3B,IAAI,CAAC,mBAAmB,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC,CAAC;QAEpD,IAAI,YAAY,KAAK,iBAAiB,EAAE;YACtC,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;SACrD;IACH,CAAC;CACF"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { Account } from "@ledgerhq/types-live";
|
|
2
|
-
/**
|
|
3
|
-
* After each sync or scan, remove operations from the pending pools if necessary
|
|
4
|
-
* Operations stay pending if and only if
|
|
5
|
-
* - they are confirmed, i.e. their hash appear in the operation list
|
|
6
|
-
* - they are not outdated, i.e. their sequence number is at least greater than the
|
|
7
|
-
* sequence number of the latest transaction
|
|
8
|
-
* NOTE Compared to the default behaviour
|
|
9
|
-
* - pending operations of token accounts are cleaned up, so we don't see both pending and completed
|
|
10
|
-
* sub operations in the operation details drawer
|
|
11
|
-
* - pending operations are cleaned if their hash already belong to the completed operations, preventing
|
|
12
|
-
* undesired replacement (ex: optimistic operation for self token sending on EVM is incomplete, since
|
|
13
|
-
* it only contains the OUT sub operation)
|
|
14
|
-
*/
|
|
15
|
-
export declare function postSync(initial: Account, synced: Account): Account;
|
|
16
|
-
//# sourceMappingURL=postSync.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"postSync.d.ts","sourceRoot":"","sources":["../../../src/bridge/generic-alpaca/postSync.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAA0B,MAAM,sBAAsB,CAAC;AAG5E;;;;;;;;;;;;GAYG;AACH,wBAAgB,QAAQ,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,GAAG,OAAO,CAyBnE"}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.postSync = void 0;
|
|
7
|
-
const bignumber_js_1 = __importDefault(require("bignumber.js"));
|
|
8
|
-
/**
|
|
9
|
-
* After each sync or scan, remove operations from the pending pools if necessary
|
|
10
|
-
* Operations stay pending if and only if
|
|
11
|
-
* - they are confirmed, i.e. their hash appear in the operation list
|
|
12
|
-
* - they are not outdated, i.e. their sequence number is at least greater than the
|
|
13
|
-
* sequence number of the latest transaction
|
|
14
|
-
* NOTE Compared to the default behaviour
|
|
15
|
-
* - pending operations of token accounts are cleaned up, so we don't see both pending and completed
|
|
16
|
-
* sub operations in the operation details drawer
|
|
17
|
-
* - pending operations are cleaned if their hash already belong to the completed operations, preventing
|
|
18
|
-
* undesired replacement (ex: optimistic operation for self token sending on EVM is incomplete, since
|
|
19
|
-
* it only contains the OUT sub operation)
|
|
20
|
-
*/
|
|
21
|
-
function postSync(initial, synced) {
|
|
22
|
-
const lastOperation = synced.operations.find(op => ["OUT", "FEES"].includes(op.type));
|
|
23
|
-
const latestSequence = lastOperation?.transactionSequenceNumber || new bignumber_js_1.default(-1);
|
|
24
|
-
function isPending(account, op) {
|
|
25
|
-
return (
|
|
26
|
-
// Operation is not confirmed
|
|
27
|
-
!account.operations.some(o => o.hash === op.hash) &&
|
|
28
|
-
// Operation is not outdated
|
|
29
|
-
op.transactionSequenceNumber !== undefined &&
|
|
30
|
-
op.transactionSequenceNumber.gt(latestSequence));
|
|
31
|
-
}
|
|
32
|
-
const pendingOperations = initial.pendingOperations.length
|
|
33
|
-
? initial.pendingOperations.filter(op => isPending(synced, op))
|
|
34
|
-
: [];
|
|
35
|
-
const subAccounts = synced.subAccounts?.length
|
|
36
|
-
? synced.subAccounts.map(subAccount => ({
|
|
37
|
-
...subAccount,
|
|
38
|
-
pendingOperations: subAccount.pendingOperations.filter(op => isPending(subAccount, op)),
|
|
39
|
-
}))
|
|
40
|
-
: [];
|
|
41
|
-
return { ...synced, pendingOperations, subAccounts };
|
|
42
|
-
}
|
|
43
|
-
exports.postSync = postSync;
|
|
44
|
-
//# sourceMappingURL=postSync.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"postSync.js","sourceRoot":"","sources":["../../../src/bridge/generic-alpaca/postSync.ts"],"names":[],"mappings":";;;;;;AACA,gEAAqC;AAErC;;;;;;;;;;;;GAYG;AACH,SAAgB,QAAQ,CAAC,OAAgB,EAAE,MAAe;IACxD,MAAM,aAAa,GAAG,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;IACtF,MAAM,cAAc,GAAG,aAAa,EAAE,yBAAyB,IAAI,IAAI,sBAAS,CAAC,CAAC,CAAC,CAAC,CAAC;IAErF,SAAS,SAAS,CAAC,OAAoB,EAAE,EAAa;QACpD,OAAO;QACL,6BAA6B;QAC7B,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,EAAE,CAAC,IAAI,CAAC;YACjD,4BAA4B;YAC5B,EAAE,CAAC,yBAAyB,KAAK,SAAS;YAC1C,EAAE,CAAC,yBAAyB,CAAC,EAAE,CAAC,cAAc,CAAC,CAChD,CAAC;IACJ,CAAC;IAED,MAAM,iBAAiB,GAAG,OAAO,CAAC,iBAAiB,CAAC,MAAM;QACxD,CAAC,CAAC,OAAO,CAAC,iBAAiB,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC,SAAS,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;QAC/D,CAAC,CAAC,EAAE,CAAC;IACP,MAAM,WAAW,GAAG,MAAM,CAAC,WAAW,EAAE,MAAM;QAC5C,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;YACpC,GAAG,UAAU;YACb,iBAAiB,EAAE,UAAU,CAAC,iBAAiB,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC,SAAS,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;SACxF,CAAC,CAAC;QACL,CAAC,CAAC,EAAE,CAAC;IAEP,OAAO,EAAE,GAAG,MAAM,EAAE,iBAAiB,EAAE,WAAW,EAAE,CAAC;AACvD,CAAC;AAzBD,4BAyBC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"regexes.d.ts","sourceRoot":"","sources":["../../../src/e2e/data/regexes.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,QAAgB,CAAC"}
|
package/lib/e2e/data/regexes.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"regexes.js","sourceRoot":"","sources":["../../../src/e2e/data/regexes.ts"],"names":[],"mappings":";;;AAAa,QAAA,gBAAgB,GAAG,aAAa,CAAC"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { CryptoCurrency } from "@ledgerhq/types-cryptoassets";
|
|
2
|
-
import type { HederaAccount, HederaPreloadData, HederaValidator, HederaDelegation, HederaEnrichedDelegation } from "./types";
|
|
3
|
-
export declare function useHederaPreloadData(currency: CryptoCurrency): HederaPreloadData | undefined | null;
|
|
4
|
-
export declare function useHederaValidators(currency: CryptoCurrency, search?: string): HederaValidator[];
|
|
5
|
-
export declare function useHederaEnrichedDelegation(account: HederaAccount, delegation: HederaDelegation): HederaEnrichedDelegation;
|
|
6
|
-
//# sourceMappingURL=react.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../../../src/families/hedera/react.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAQnE,OAAO,KAAK,EACV,aAAa,EACb,iBAAiB,EACjB,eAAe,EACf,gBAAgB,EAChB,wBAAwB,EACzB,MAAM,SAAS,CAAC;AAEjB,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,cAAc,GACvB,iBAAiB,GAAG,SAAS,GAAG,IAAI,CAEtC;AAED,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,cAAc,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,eAAe,EAAE,CAchG;AAED,wBAAgB,2BAA2B,CACzC,OAAO,EAAE,aAAa,EACtB,UAAU,EAAE,gBAAgB,GAC3B,wBAAwB,CAoB1B"}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.useHederaEnrichedDelegation = exports.useHederaValidators = exports.useHederaPreloadData = void 0;
|
|
7
|
-
const bignumber_js_1 = __importDefault(require("bignumber.js"));
|
|
8
|
-
const react_1 = require("react");
|
|
9
|
-
const preload_data_1 = require("@ledgerhq/coin-hedera/preload-data");
|
|
10
|
-
const utils_1 = require("./utils");
|
|
11
|
-
const observable_1 = require("../../observable");
|
|
12
|
-
function useHederaPreloadData(currency) {
|
|
13
|
-
return (0, observable_1.useObservable)((0, preload_data_1.getHederaPreloadData)(currency), (0, preload_data_1.getCurrentHederaPreloadData)(currency));
|
|
14
|
-
}
|
|
15
|
-
exports.useHederaPreloadData = useHederaPreloadData;
|
|
16
|
-
function useHederaValidators(currency, search) {
|
|
17
|
-
const data = useHederaPreloadData(currency);
|
|
18
|
-
return (0, react_1.useMemo)(() => {
|
|
19
|
-
const validators = data?.validators ?? [];
|
|
20
|
-
if (validators.length === 0 || !search || search === "") {
|
|
21
|
-
return validators;
|
|
22
|
-
}
|
|
23
|
-
return validators.filter(validator => {
|
|
24
|
-
return (0, utils_1.filterValidatorBySearchTerm)(validator, search);
|
|
25
|
-
});
|
|
26
|
-
}, [data, search]);
|
|
27
|
-
}
|
|
28
|
-
exports.useHederaValidators = useHederaValidators;
|
|
29
|
-
function useHederaEnrichedDelegation(account, delegation) {
|
|
30
|
-
const validators = useHederaValidators(account.currency);
|
|
31
|
-
const validatorByNodeId = new Map(validators.map(v => [v.nodeId, v]));
|
|
32
|
-
const validator = validatorByNodeId.get(delegation.nodeId) ?? null;
|
|
33
|
-
return {
|
|
34
|
-
...delegation,
|
|
35
|
-
status: (0, utils_1.getDelegationStatus)(validator),
|
|
36
|
-
validator: {
|
|
37
|
-
name: validator?.name ?? "",
|
|
38
|
-
address: validator?.address ?? "",
|
|
39
|
-
addressChecksum: validator?.addressChecksum ?? null,
|
|
40
|
-
nodeId: delegation.nodeId,
|
|
41
|
-
minStake: validator?.minStake ?? new bignumber_js_1.default(0),
|
|
42
|
-
maxStake: validator?.maxStake ?? new bignumber_js_1.default(0),
|
|
43
|
-
activeStake: validator?.activeStake ?? new bignumber_js_1.default(0),
|
|
44
|
-
activeStakePercentage: validator?.activeStakePercentage ?? new bignumber_js_1.default(0),
|
|
45
|
-
overstaked: validator?.overstaked ?? false,
|
|
46
|
-
},
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
exports.useHederaEnrichedDelegation = useHederaEnrichedDelegation;
|
|
50
|
-
//# sourceMappingURL=react.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"react.js","sourceRoot":"","sources":["../../../src/families/hedera/react.ts"],"names":[],"mappings":";;;;;;AAAA,gEAAqC;AAErC,iCAAgC;AAChC,qEAG4C;AAC5C,mCAA2E;AAC3E,iDAAiD;AASjD,SAAgB,oBAAoB,CAClC,QAAwB;IAExB,OAAO,IAAA,0BAAa,EAAC,IAAA,mCAAoB,EAAC,QAAQ,CAAC,EAAE,IAAA,0CAA2B,EAAC,QAAQ,CAAC,CAAC,CAAC;AAC9F,CAAC;AAJD,oDAIC;AAED,SAAgB,mBAAmB,CAAC,QAAwB,EAAE,MAAe;IAC3E,MAAM,IAAI,GAAG,oBAAoB,CAAC,QAAQ,CAAC,CAAC;IAE5C,OAAO,IAAA,eAAO,EAAC,GAAG,EAAE;QAClB,MAAM,UAAU,GAAG,IAAI,EAAE,UAAU,IAAI,EAAE,CAAC;QAE1C,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC,IAAI,CAAC,MAAM,IAAI,MAAM,KAAK,EAAE,EAAE;YACvD,OAAO,UAAU,CAAC;SACnB;QAED,OAAO,UAAU,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE;YACnC,OAAO,IAAA,mCAA2B,EAAC,SAAS,EAAE,MAAM,CAAC,CAAC;QACxD,CAAC,CAAC,CAAC;IACL,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC;AACrB,CAAC;AAdD,kDAcC;AAED,SAAgB,2BAA2B,CACzC,OAAsB,EACtB,UAA4B;IAE5B,MAAM,UAAU,GAAG,mBAAmB,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IACzD,MAAM,iBAAiB,GAAG,IAAI,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;IACtE,MAAM,SAAS,GAAG,iBAAiB,CAAC,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC;IAEnE,OAAO;QACL,GAAG,UAAU;QACb,MAAM,EAAE,IAAA,2BAAmB,EAAC,SAAS,CAAC;QACtC,SAAS,EAAE;YACT,IAAI,EAAE,SAAS,EAAE,IAAI,IAAI,EAAE;YAC3B,OAAO,EAAE,SAAS,EAAE,OAAO,IAAI,EAAE;YACjC,eAAe,EAAE,SAAS,EAAE,eAAe,IAAI,IAAI;YACnD,MAAM,EAAE,UAAU,CAAC,MAAM;YACzB,QAAQ,EAAE,SAAS,EAAE,QAAQ,IAAI,IAAI,sBAAS,CAAC,CAAC,CAAC;YACjD,QAAQ,EAAE,SAAS,EAAE,QAAQ,IAAI,IAAI,sBAAS,CAAC,CAAC,CAAC;YACjD,WAAW,EAAE,SAAS,EAAE,WAAW,IAAI,IAAI,sBAAS,CAAC,CAAC,CAAC;YACvD,qBAAqB,EAAE,SAAS,EAAE,qBAAqB,IAAI,IAAI,sBAAS,CAAC,CAAC,CAAC;YAC3E,UAAU,EAAE,SAAS,EAAE,UAAU,IAAI,KAAK;SAC3C;KACF,CAAC;AACJ,CAAC;AAvBD,kEAuBC"}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export declare const getValidCryptoIconSizeNative: (size: number) => 16 | 20 | 24 | 32 | 40 | 48 | 56;
|
|
2
|
-
export declare const getValidCryptoIconSize: (size: number) => "16px" | "20px" | "24px" | "32px" | "40px" | "48px" | "56px";
|
|
3
|
-
//# sourceMappingURL=cryptoIconSize.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cryptoIconSize.d.ts","sourceRoot":"","sources":["../../src/helpers/cryptoIconSize.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,4BAA4B,SAAU,MAAM,KAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAQzF,CAAC;AAIF,eAAO,MAAM,sBAAsB,SAC3B,MAAM,KACX,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,MAQxD,CAAC"}
|