@ledgerhq/live-common 34.49.0-nightly.5 → 34.49.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/bridge/react/BridgeSync.d.ts.map +1 -1
- package/lib/bridge/react/BridgeSync.js +4 -17
- package/lib/bridge/react/BridgeSync.js.map +1 -1
- package/lib/deposit/deposit.integration.test.js +1 -60
- package/lib/deposit/deposit.integration.test.js.map +1 -1
- package/lib/e2e/data/deviceLabelsData.js +2 -2
- package/lib/e2e/data/deviceLabelsData.js.map +1 -1
- package/lib/e2e/enum/Account.d.ts +0 -1
- package/lib/e2e/enum/Account.d.ts.map +1 -1
- package/lib/e2e/enum/Account.js +1 -2
- package/lib/e2e/enum/Account.js.map +1 -1
- package/lib/e2e/enum/DeviceLabels.d.ts +9 -3
- package/lib/e2e/enum/DeviceLabels.d.ts.map +1 -1
- package/lib/e2e/enum/DeviceLabels.js +8 -2
- package/lib/e2e/enum/DeviceLabels.js.map +1 -1
- package/lib/e2e/families/bitcoin.d.ts +0 -1
- package/lib/e2e/families/bitcoin.d.ts.map +1 -1
- package/lib/e2e/families/bitcoin.js +1 -28
- package/lib/e2e/families/bitcoin.js.map +1 -1
- package/lib/e2e/families/tezos.d.ts.map +1 -1
- package/lib/e2e/families/tezos.js +3 -5
- package/lib/e2e/families/tezos.js.map +1 -1
- package/lib/e2e/index.d.ts +0 -4
- package/lib/e2e/index.d.ts.map +1 -1
- package/lib/e2e/models/Swap.d.ts +0 -2
- package/lib/e2e/models/Swap.d.ts.map +1 -1
- package/lib/e2e/models/Swap.js +0 -6
- package/lib/e2e/models/Swap.js.map +1 -1
- package/lib/e2e/speculos.d.ts +0 -8
- package/lib/e2e/speculos.d.ts.map +1 -1
- package/lib/e2e/speculos.js +31 -23
- package/lib/e2e/speculos.js.map +1 -1
- package/lib/exchange/providers/swap.js +2 -2
- package/lib/exchange/providers/swap.js.map +1 -1
- package/lib/families/celo/bridge.integration.test.js +1 -4
- package/lib/families/celo/bridge.integration.test.js.map +1 -1
- package/lib/families/cosmos/datasets/axelar.integration.test.js +1 -4
- package/lib/families/cosmos/datasets/axelar.integration.test.js.map +1 -1
- package/lib/families/cosmos/datasets/desmos.integration.test.js +1 -4
- package/lib/families/cosmos/datasets/desmos.integration.test.js.map +1 -1
- package/lib/families/cosmos/datasets/onomy.integration.test.js +1 -4
- package/lib/families/cosmos/datasets/onomy.integration.test.js.map +1 -1
- package/lib/families/filecoin/bridge.integration.test.js +1 -4
- package/lib/families/filecoin/bridge.integration.test.js.map +1 -1
- package/lib/families/kaspa/bridge.integration.test.js +1 -4
- package/lib/families/kaspa/bridge.integration.test.js.map +1 -1
- package/lib/families/mina/bridge.integration.test.js +1 -4
- package/lib/families/mina/bridge.integration.test.js.map +1 -1
- package/lib/families/multiversx/synchronisation.integration.test.js +1 -4
- package/lib/families/multiversx/synchronisation.integration.test.js.map +1 -1
- package/lib/families/ton/bridge.integration.test.js +1 -4
- package/lib/families/ton/bridge.integration.test.js.map +1 -1
- package/lib/featureFlags/defaultFeatures.d.ts.map +1 -1
- package/lib/featureFlags/defaultFeatures.js +0 -2
- package/lib/featureFlags/defaultFeatures.js.map +1 -1
- package/lib/featureFlags/useFeature.d.ts +1 -1
- package/lib/featureFlags/useFeature.d.ts.map +1 -1
- package/lib/modularDrawer/hooks/modules/useLeftApyModule.d.ts +0 -1
- package/lib/modularDrawer/hooks/modules/useLeftApyModule.d.ts.map +1 -1
- package/lib/modularDrawer/hooks/modules/useLeftMarketTrendModule.d.ts +0 -1
- package/lib/modularDrawer/hooks/modules/useLeftMarketTrendModule.d.ts.map +1 -1
- package/lib/modularDrawer/hooks/modules/useRightMarketTrendModule.d.ts +0 -1
- package/lib/modularDrawer/hooks/modules/useRightMarketTrendModule.d.ts.map +1 -1
- package/lib/modularDrawer/hooks/useRightBalanceAsset.d.ts +0 -1
- package/lib/modularDrawer/hooks/useRightBalanceAsset.d.ts.map +1 -1
- package/lib/modularDrawer/hooks/useRightBalanceNetwork.d.ts +0 -1
- package/lib/modularDrawer/hooks/useRightBalanceNetwork.d.ts.map +1 -1
- package/lib/notifications/ServiceStatusProvider/index.d.ts +1 -18
- package/lib/notifications/ServiceStatusProvider/index.d.ts.map +1 -1
- package/lib/notifications/ServiceStatusProvider/index.js +9 -47
- package/lib/notifications/ServiceStatusProvider/index.js.map +1 -1
- package/lib/notifications/ServiceStatusProvider/types.d.ts +1 -3
- package/lib/notifications/ServiceStatusProvider/types.d.ts.map +1 -1
- package/lib/wallet-api/react.d.ts +1 -1
- package/lib/wallet-api/react.d.ts.map +1 -1
- package/lib/wallet-api/react.js +1 -1
- package/lib/wallet-api/react.js.map +1 -1
- package/lib-es/bridge/react/BridgeSync.d.ts.map +1 -1
- package/lib-es/bridge/react/BridgeSync.js +4 -17
- package/lib-es/bridge/react/BridgeSync.js.map +1 -1
- package/lib-es/deposit/deposit.integration.test.js +1 -37
- package/lib-es/deposit/deposit.integration.test.js.map +1 -1
- package/lib-es/e2e/data/deviceLabelsData.js +2 -2
- package/lib-es/e2e/data/deviceLabelsData.js.map +1 -1
- package/lib-es/e2e/enum/Account.d.ts +0 -1
- package/lib-es/e2e/enum/Account.d.ts.map +1 -1
- package/lib-es/e2e/enum/Account.js +1 -2
- package/lib-es/e2e/enum/Account.js.map +1 -1
- package/lib-es/e2e/enum/DeviceLabels.d.ts +9 -3
- package/lib-es/e2e/enum/DeviceLabels.d.ts.map +1 -1
- package/lib-es/e2e/enum/DeviceLabels.js +8 -2
- package/lib-es/e2e/enum/DeviceLabels.js.map +1 -1
- package/lib-es/e2e/families/bitcoin.d.ts +0 -1
- package/lib-es/e2e/families/bitcoin.d.ts.map +1 -1
- package/lib-es/e2e/families/bitcoin.js +1 -27
- package/lib-es/e2e/families/bitcoin.js.map +1 -1
- package/lib-es/e2e/families/tezos.d.ts.map +1 -1
- package/lib-es/e2e/families/tezos.js +4 -6
- package/lib-es/e2e/families/tezos.js.map +1 -1
- package/lib-es/e2e/index.d.ts +0 -4
- package/lib-es/e2e/index.d.ts.map +1 -1
- package/lib-es/e2e/models/Swap.d.ts +0 -2
- package/lib-es/e2e/models/Swap.d.ts.map +1 -1
- package/lib-es/e2e/models/Swap.js +0 -6
- package/lib-es/e2e/models/Swap.js.map +1 -1
- package/lib-es/e2e/speculos.d.ts +0 -8
- package/lib-es/e2e/speculos.d.ts.map +1 -1
- package/lib-es/e2e/speculos.js +32 -23
- package/lib-es/e2e/speculos.js.map +1 -1
- package/lib-es/exchange/providers/swap.js +2 -2
- package/lib-es/exchange/providers/swap.js.map +1 -1
- package/lib-es/families/celo/bridge.integration.test.js +1 -4
- package/lib-es/families/celo/bridge.integration.test.js.map +1 -1
- package/lib-es/families/cosmos/datasets/axelar.integration.test.js +1 -4
- package/lib-es/families/cosmos/datasets/axelar.integration.test.js.map +1 -1
- package/lib-es/families/cosmos/datasets/desmos.integration.test.js +1 -4
- package/lib-es/families/cosmos/datasets/desmos.integration.test.js.map +1 -1
- package/lib-es/families/cosmos/datasets/onomy.integration.test.js +1 -4
- package/lib-es/families/cosmos/datasets/onomy.integration.test.js.map +1 -1
- package/lib-es/families/filecoin/bridge.integration.test.js +1 -4
- package/lib-es/families/filecoin/bridge.integration.test.js.map +1 -1
- package/lib-es/families/kaspa/bridge.integration.test.js +1 -4
- package/lib-es/families/kaspa/bridge.integration.test.js.map +1 -1
- package/lib-es/families/mina/bridge.integration.test.js +1 -4
- package/lib-es/families/mina/bridge.integration.test.js.map +1 -1
- package/lib-es/families/multiversx/synchronisation.integration.test.js +1 -4
- package/lib-es/families/multiversx/synchronisation.integration.test.js.map +1 -1
- package/lib-es/families/ton/bridge.integration.test.js +1 -4
- package/lib-es/families/ton/bridge.integration.test.js.map +1 -1
- package/lib-es/featureFlags/defaultFeatures.d.ts.map +1 -1
- package/lib-es/featureFlags/defaultFeatures.js +0 -2
- package/lib-es/featureFlags/defaultFeatures.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/modularDrawer/hooks/modules/useLeftApyModule.d.ts +0 -1
- package/lib-es/modularDrawer/hooks/modules/useLeftApyModule.d.ts.map +1 -1
- package/lib-es/modularDrawer/hooks/modules/useLeftMarketTrendModule.d.ts +0 -1
- package/lib-es/modularDrawer/hooks/modules/useLeftMarketTrendModule.d.ts.map +1 -1
- package/lib-es/modularDrawer/hooks/modules/useRightMarketTrendModule.d.ts +0 -1
- package/lib-es/modularDrawer/hooks/modules/useRightMarketTrendModule.d.ts.map +1 -1
- package/lib-es/modularDrawer/hooks/useRightBalanceAsset.d.ts +0 -1
- package/lib-es/modularDrawer/hooks/useRightBalanceAsset.d.ts.map +1 -1
- package/lib-es/modularDrawer/hooks/useRightBalanceNetwork.d.ts +0 -1
- package/lib-es/modularDrawer/hooks/useRightBalanceNetwork.d.ts.map +1 -1
- package/lib-es/notifications/ServiceStatusProvider/index.d.ts +1 -18
- package/lib-es/notifications/ServiceStatusProvider/index.d.ts.map +1 -1
- package/lib-es/notifications/ServiceStatusProvider/index.js +9 -47
- package/lib-es/notifications/ServiceStatusProvider/index.js.map +1 -1
- package/lib-es/notifications/ServiceStatusProvider/types.d.ts +1 -3
- package/lib-es/notifications/ServiceStatusProvider/types.d.ts.map +1 -1
- package/lib-es/wallet-api/react.d.ts +1 -1
- package/lib-es/wallet-api/react.d.ts.map +1 -1
- package/lib-es/wallet-api/react.js +1 -1
- package/lib-es/wallet-api/react.js.map +1 -1
- package/package.json +69 -69
- package/src/bridge/react/BridgeSync.tsx +3 -17
- package/src/deposit/deposit.integration.test.ts +2 -41
- package/src/e2e/data/deviceLabelsData.ts +2 -2
- package/src/e2e/enum/Account.ts +0 -7
- package/src/e2e/enum/DeviceLabels.ts +8 -2
- package/src/e2e/families/bitcoin.ts +1 -33
- package/src/e2e/families/tezos.ts +4 -13
- package/src/e2e/models/Swap.ts +0 -8
- package/src/e2e/speculos.ts +35 -26
- package/src/exchange/providers/swap.ts +2 -2
- package/src/families/celo/__snapshots__/bridge.integration.test.ts.snap +285 -0
- package/src/families/celo/bridge.integration.test.ts +1 -4
- package/src/families/cosmos/datasets/__snapshots__/axelar.integration.test.ts.snap +45 -0
- package/src/families/cosmos/datasets/__snapshots__/babylon.integration.test.ts.snap +2 -2
- package/src/families/cosmos/datasets/__snapshots__/cosmos.integration.test.ts.snap +4 -299
- package/src/families/cosmos/datasets/__snapshots__/cryptoOrg.integration.test.ts.snap +2 -2
- package/src/families/cosmos/datasets/__snapshots__/desmos.integration.test.ts.snap +45 -0
- 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__/onomy.integration.test.ts.snap +45 -0
- 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/cosmos/datasets/__snapshots__/xion.integration.test.ts.snap +2 -2
- package/src/families/cosmos/datasets/axelar.integration.test.ts +1 -4
- package/src/families/cosmos/datasets/desmos.integration.test.ts +1 -4
- package/src/families/cosmos/datasets/onomy.integration.test.ts +1 -4
- package/src/families/filecoin/__snapshots__/bridge.integration.test.ts.snap +242 -0
- package/src/families/filecoin/bridge.integration.test.ts +1 -4
- package/src/families/internet_computer/__snapshots__/bridge.integration.test.ts.snap +3 -60
- package/src/families/kaspa/__snapshots__/bridge.integration.test.ts.snap +66 -0
- package/src/families/kaspa/bridge.integration.test.ts +1 -4
- package/src/families/mina/__snapshots__/bridge.integration.test.ts.snap +169 -0
- package/src/families/mina/bridge.integration.test.ts +1 -4
- package/src/families/multiversx/synchronisation.integration.test.ts +1 -5
- package/src/families/polkadot/__snapshots__/bridge.integration.test.ts.snap +4 -50
- package/src/families/stacks/__snapshots__/bridge.integration.test.ts.snap +3 -23
- package/src/families/stellar/__snapshots__/bridge.integration.test.ts.snap +74 -1504
- package/src/families/ton/__snapshots__/bridge.integration.test.ts.snap +338 -0
- package/src/families/ton/bridge.integration.test.ts +1 -4
- package/src/featureFlags/defaultFeatures.ts +0 -2
- package/src/notifications/ServiceStatusProvider/index.tsx +13 -61
- package/src/notifications/ServiceStatusProvider/types.ts +1 -4
- package/src/wallet-api/react.ts +3 -3
- package/lib/bridge/syncSessionManager/index.d.ts +0 -18
- package/lib/bridge/syncSessionManager/index.d.ts.map +0 -1
- package/lib/bridge/syncSessionManager/index.js +0 -75
- package/lib/bridge/syncSessionManager/index.js.map +0 -1
- package/lib/bridge/syncSessionManager/index.test.d.ts +0 -2
- package/lib/bridge/syncSessionManager/index.test.d.ts.map +0 -1
- package/lib/bridge/syncSessionManager/index.test.js +0 -118
- package/lib/bridge/syncSessionManager/index.test.js.map +0 -1
- package/lib/notifications/ServiceStatusProvider/entry-points.d.ts +0 -3
- package/lib/notifications/ServiceStatusProvider/entry-points.d.ts.map +0 -1
- package/lib/notifications/ServiceStatusProvider/entry-points.js +0 -3
- package/lib/notifications/ServiceStatusProvider/entry-points.js.map +0 -1
- package/lib/notifications/ServiceStatusProvider/index.test.d.ts +0 -2
- package/lib/notifications/ServiceStatusProvider/index.test.d.ts.map +0 -1
- package/lib/notifications/ServiceStatusProvider/index.test.js +0 -88
- package/lib/notifications/ServiceStatusProvider/index.test.js.map +0 -1
- package/lib/notifications/ServiceStatusProvider/ledger-components.d.ts +0 -2
- package/lib/notifications/ServiceStatusProvider/ledger-components.d.ts.map +0 -1
- package/lib/notifications/ServiceStatusProvider/ledger-components.js +0 -17
- package/lib/notifications/ServiceStatusProvider/ledger-components.js.map +0 -1
- package/lib/notifications/ServiceStatusProvider/mocks/ledgerStatus.d.ts +0 -154
- package/lib/notifications/ServiceStatusProvider/mocks/ledgerStatus.d.ts.map +0 -1
- package/lib/notifications/ServiceStatusProvider/mocks/ledgerStatus.js +0 -1192
- package/lib/notifications/ServiceStatusProvider/mocks/ledgerStatus.js.map +0 -1
- package/lib-es/bridge/syncSessionManager/index.d.ts +0 -18
- package/lib-es/bridge/syncSessionManager/index.d.ts.map +0 -1
- package/lib-es/bridge/syncSessionManager/index.js +0 -68
- package/lib-es/bridge/syncSessionManager/index.js.map +0 -1
- package/lib-es/bridge/syncSessionManager/index.test.d.ts +0 -2
- package/lib-es/bridge/syncSessionManager/index.test.d.ts.map +0 -1
- package/lib-es/bridge/syncSessionManager/index.test.js +0 -116
- package/lib-es/bridge/syncSessionManager/index.test.js.map +0 -1
- package/lib-es/notifications/ServiceStatusProvider/entry-points.d.ts +0 -3
- package/lib-es/notifications/ServiceStatusProvider/entry-points.d.ts.map +0 -1
- package/lib-es/notifications/ServiceStatusProvider/entry-points.js +0 -2
- package/lib-es/notifications/ServiceStatusProvider/entry-points.js.map +0 -1
- package/lib-es/notifications/ServiceStatusProvider/index.test.d.ts +0 -2
- package/lib-es/notifications/ServiceStatusProvider/index.test.d.ts.map +0 -1
- package/lib-es/notifications/ServiceStatusProvider/index.test.js +0 -86
- package/lib-es/notifications/ServiceStatusProvider/index.test.js.map +0 -1
- package/lib-es/notifications/ServiceStatusProvider/ledger-components.d.ts +0 -2
- package/lib-es/notifications/ServiceStatusProvider/ledger-components.d.ts.map +0 -1
- package/lib-es/notifications/ServiceStatusProvider/ledger-components.js +0 -14
- package/lib-es/notifications/ServiceStatusProvider/ledger-components.js.map +0 -1
- package/lib-es/notifications/ServiceStatusProvider/mocks/ledgerStatus.d.ts +0 -154
- package/lib-es/notifications/ServiceStatusProvider/mocks/ledgerStatus.d.ts.map +0 -1
- package/lib-es/notifications/ServiceStatusProvider/mocks/ledgerStatus.js +0 -1189
- package/lib-es/notifications/ServiceStatusProvider/mocks/ledgerStatus.js.map +0 -1
- package/src/bridge/syncSessionManager/index.test.ts +0 -151
- package/src/bridge/syncSessionManager/index.ts +0 -93
- package/src/notifications/ServiceStatusProvider/entry-points.ts +0 -3
- package/src/notifications/ServiceStatusProvider/index.test.ts +0 -102
- package/src/notifications/ServiceStatusProvider/ledger-components.ts +0 -13
- package/src/notifications/ServiceStatusProvider/mocks/ledgerStatus.ts +0 -1188
@@ -0,0 +1,338 @@
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
2
|
+
|
3
|
+
exports[`ton currency bridge scanAccounts ton seed 1 1`] = `
|
4
|
+
[
|
5
|
+
{
|
6
|
+
"balance": "916991005",
|
7
|
+
"currencyId": "ton",
|
8
|
+
"derivationMode": "ton",
|
9
|
+
"freshAddress": "UQCOvQLYvTcbi5tL9MaDNzuVl3-J3vATimNm9yO5XPafLfV4",
|
10
|
+
"freshAddressPath": "44'/607'/0'/0'/0'/0'",
|
11
|
+
"id": "js:2:ton:86196cb40cd25e9e696bc808e3f2c074ce0b39f2a2a9d482a68eafef86e4a060:ton",
|
12
|
+
"index": 0,
|
13
|
+
"operationsCount": 9,
|
14
|
+
"pendingOperations": [],
|
15
|
+
"seedIdentifier": "86196cb40cd25e9e696bc808e3f2c074ce0b39f2a2a9d482a68eafef86e4a060",
|
16
|
+
"spendableBalance": "916991005",
|
17
|
+
"subAccounts": [],
|
18
|
+
"swapHistory": [],
|
19
|
+
"syncHash": undefined,
|
20
|
+
"used": true,
|
21
|
+
"xpub": "86196cb40cd25e9e696bc808e3f2c074ce0b39f2a2a9d482a68eafef86e4a060",
|
22
|
+
},
|
23
|
+
{
|
24
|
+
"balance": "35000000000",
|
25
|
+
"id": "js:2:ton:86196cb40cd25e9e696bc808e3f2c074ce0b39f2a2a9d482a68eafef86e4a060:ton+ton%2Fjetton%2Feqavlwfdxgf2lxm67y4yzc17wykd9a0guwpkms1gosm~!underscore!~~!underscore!~not",
|
26
|
+
"operationsCount": 2,
|
27
|
+
"parentId": "js:2:ton:86196cb40cd25e9e696bc808e3f2c074ce0b39f2a2a9d482a68eafef86e4a060:ton",
|
28
|
+
"pendingOperations": [],
|
29
|
+
"spendableBalance": "35000000000",
|
30
|
+
"swapHistory": [],
|
31
|
+
"tokenId": "ton/jetton/eqavlwfdxgf2lxm67y4yzc17wykd9a0guwpkms1gosm__not",
|
32
|
+
"type": "TokenAccountRaw",
|
33
|
+
},
|
34
|
+
{
|
35
|
+
"balance": "0",
|
36
|
+
"currencyId": "ton",
|
37
|
+
"derivationMode": "ton",
|
38
|
+
"freshAddress": "UQAui6M4jOYOezUGfmeONA22Ars9yjd34YIGdAR1Pcpp4sgR",
|
39
|
+
"freshAddressPath": "44'/607'/0'/0'/1'/0'",
|
40
|
+
"id": "js:2:ton:b5177c2b32f9d72fa8c673cc3d61acec6a9f68eb5e4945445fdbb48a45eb4887:ton",
|
41
|
+
"index": 1,
|
42
|
+
"operationsCount": 0,
|
43
|
+
"pendingOperations": [],
|
44
|
+
"seedIdentifier": "86196cb40cd25e9e696bc808e3f2c074ce0b39f2a2a9d482a68eafef86e4a060",
|
45
|
+
"spendableBalance": "0",
|
46
|
+
"subAccounts": [],
|
47
|
+
"swapHistory": [],
|
48
|
+
"syncHash": undefined,
|
49
|
+
"used": false,
|
50
|
+
"xpub": "b5177c2b32f9d72fa8c673cc3d61acec6a9f68eb5e4945445fdbb48a45eb4887",
|
51
|
+
},
|
52
|
+
]
|
53
|
+
`;
|
54
|
+
|
55
|
+
exports[`ton currency bridge scanAccounts ton seed 1 2`] = `
|
56
|
+
[
|
57
|
+
[
|
58
|
+
{
|
59
|
+
"accountId": "js:2:ton:86196cb40cd25e9e696bc808e3f2c074ce0b39f2a2a9d482a68eafef86e4a060:ton",
|
60
|
+
"blockHash": null,
|
61
|
+
"blockHeight": 40170315,
|
62
|
+
"extra": {
|
63
|
+
"comment": {
|
64
|
+
"isEncrypted": false,
|
65
|
+
"text": "",
|
66
|
+
},
|
67
|
+
"explorerHash": "xPDVakqj5a0mcix8dsTNyr4oKD0HWhk0nglfOULUFmQ=",
|
68
|
+
"lt": "48954541000001",
|
69
|
+
},
|
70
|
+
"fee": "2600565",
|
71
|
+
"hasFailed": false,
|
72
|
+
"hash": "8XFt8ApfGhsr/1B6YxFZLpVmWsTttIR4rvtkBusmQvQ=",
|
73
|
+
"id": "js:2:ton:86196cb40cd25e9e696bc808e3f2c074ce0b39f2a2a9d482a68eafef86e4a060:ton-0J2ClZ4ywxSMQRevw1X0edMaUB874he0oVVmTsN4I7Y=-OUT",
|
74
|
+
"recipients": [
|
75
|
+
"EQDoD37lf61T2vSL1LpF9ws3SCbcvT53_5nuVd7dGHIdxgH6",
|
76
|
+
],
|
77
|
+
"senders": [
|
78
|
+
"UQCOvQLYvTcbi5tL9MaDNzuVl3-J3vATimNm9yO5XPafLfV4",
|
79
|
+
],
|
80
|
+
"type": "OUT",
|
81
|
+
"value": "100000000",
|
82
|
+
},
|
83
|
+
{
|
84
|
+
"accountId": "js:2:ton:86196cb40cd25e9e696bc808e3f2c074ce0b39f2a2a9d482a68eafef86e4a060:ton",
|
85
|
+
"blockHash": null,
|
86
|
+
"blockHeight": 37795019,
|
87
|
+
"extra": {
|
88
|
+
"comment": {
|
89
|
+
"isEncrypted": false,
|
90
|
+
"text": "",
|
91
|
+
},
|
92
|
+
"explorerHash": "bUaQn1mpH065e6GMtJAIGJ5YZiJ4g66oHKctDSmwqH4=",
|
93
|
+
"lt": "46398660000001",
|
94
|
+
},
|
95
|
+
"fee": "5547465",
|
96
|
+
"hasFailed": false,
|
97
|
+
"hash": "7ZIKj4q+KCfZ04dD7m7wI3Q/nVG6VoFujq61UtMQE3E=",
|
98
|
+
"id": "js:2:ton:86196cb40cd25e9e696bc808e3f2c074ce0b39f2a2a9d482a68eafef86e4a060:ton-1KI+JhVbOM2sgDpvUILr6sEmQ6+Iz4twNIOG7lR2eg4=-OUT",
|
99
|
+
"recipients": [
|
100
|
+
"EQAG2WGLWM7dnTdopd2wQlbhsbJck3bOr1xtwzqZ6ldQwgSS",
|
101
|
+
],
|
102
|
+
"senders": [
|
103
|
+
"UQCOvQLYvTcbi5tL9MaDNzuVl3-J3vATimNm9yO5XPafLfV4",
|
104
|
+
],
|
105
|
+
"type": "OUT",
|
106
|
+
"value": "50000000",
|
107
|
+
},
|
108
|
+
{
|
109
|
+
"accountId": "js:2:ton:86196cb40cd25e9e696bc808e3f2c074ce0b39f2a2a9d482a68eafef86e4a060:ton",
|
110
|
+
"blockHash": null,
|
111
|
+
"blockHeight": 37795026,
|
112
|
+
"extra": {
|
113
|
+
"comment": {
|
114
|
+
"isEncrypted": false,
|
115
|
+
"text": "",
|
116
|
+
},
|
117
|
+
"explorerHash": "zlj5W9f4F4rHDFHzdC3gSa+nKcgobho4MV8JzZWkzoE=",
|
118
|
+
"lt": "46398669000001",
|
119
|
+
},
|
120
|
+
"fee": "396411",
|
121
|
+
"hasFailed": false,
|
122
|
+
"hash": "4dDNdHb5JwpES6VYZS6ZyKSDnNNk0i37CLF6sYqD7oc=",
|
123
|
+
"id": "js:2:ton:86196cb40cd25e9e696bc808e3f2c074ce0b39f2a2a9d482a68eafef86e4a060:ton-4dDNdHb5JwpES6VYZS6ZyKSDnNNk0i37CLF6sYqD7oc=-IN",
|
124
|
+
"recipients": [
|
125
|
+
"UQCOvQLYvTcbi5tL9MaDNzuVl3-J3vATimNm9yO5XPafLfV4",
|
126
|
+
],
|
127
|
+
"senders": [
|
128
|
+
"EQAnDEE6JghjaRCaY5qWTeV2AalOgyU9ohZ37pmUl-t0toX7",
|
129
|
+
],
|
130
|
+
"type": "IN",
|
131
|
+
"value": "21509565",
|
132
|
+
},
|
133
|
+
{
|
134
|
+
"accountId": "js:2:ton:86196cb40cd25e9e696bc808e3f2c074ce0b39f2a2a9d482a68eafef86e4a060:ton",
|
135
|
+
"blockHash": null,
|
136
|
+
"blockHeight": 40170280,
|
137
|
+
"extra": {
|
138
|
+
"comment": {
|
139
|
+
"isEncrypted": false,
|
140
|
+
"text": "",
|
141
|
+
},
|
142
|
+
"explorerHash": "l1j2L+JrLu9MCpAJorHUbp8UtA9aMyQKrQ4zLKO7o8A=",
|
143
|
+
"lt": "48954505000001",
|
144
|
+
},
|
145
|
+
"fee": "2617007",
|
146
|
+
"hasFailed": false,
|
147
|
+
"hash": "a5ldjLyYtquGurSNnSF9Zmp3dEN4vnlermBnmvCxgd4=",
|
148
|
+
"id": "js:2:ton:86196cb40cd25e9e696bc808e3f2c074ce0b39f2a2a9d482a68eafef86e4a060:ton-a5ldjLyYtquGurSNnSF9Zmp3dEN4vnlermBnmvCxgd4=-IN",
|
149
|
+
"recipients": [
|
150
|
+
"UQCOvQLYvTcbi5tL9MaDNzuVl3-J3vATimNm9yO5XPafLfV4",
|
151
|
+
],
|
152
|
+
"senders": [
|
153
|
+
"EQDoD37lf61T2vSL1LpF9ws3SCbcvT53_5nuVd7dGHIdxgH6",
|
154
|
+
],
|
155
|
+
"type": "IN",
|
156
|
+
"value": "1",
|
157
|
+
},
|
158
|
+
{
|
159
|
+
"accountId": "js:2:ton:86196cb40cd25e9e696bc808e3f2c074ce0b39f2a2a9d482a68eafef86e4a060:ton",
|
160
|
+
"blockHash": null,
|
161
|
+
"blockHeight": 37795081,
|
162
|
+
"extra": {
|
163
|
+
"comment": {
|
164
|
+
"isEncrypted": false,
|
165
|
+
"text": "",
|
166
|
+
},
|
167
|
+
"explorerHash": "NqRiKhgFkHGL4z75j1M70KryRr/M5JosW2Zw2pxrciU=",
|
168
|
+
"lt": "46398735000001",
|
169
|
+
},
|
170
|
+
"fee": "2474733",
|
171
|
+
"hasFailed": false,
|
172
|
+
"hash": "URAvSSvE38mTydf61TAZSVO8b2F5RRwgL61gjX77YT4=",
|
173
|
+
"id": "js:2:ton:86196cb40cd25e9e696bc808e3f2c074ce0b39f2a2a9d482a68eafef86e4a060:ton-cva3yUb4cC+AfML9eidygO1PeYVYqLYpcprXEiw3Nj0=-OUT",
|
174
|
+
"recipients": [
|
175
|
+
"EQAG2WGLWM7dnTdopd2wQlbhsbJck3bOr1xtwzqZ6ldQwgSS",
|
176
|
+
],
|
177
|
+
"senders": [
|
178
|
+
"UQCOvQLYvTcbi5tL9MaDNzuVl3-J3vATimNm9yO5XPafLfV4",
|
179
|
+
],
|
180
|
+
"type": "OUT",
|
181
|
+
"value": "50000000",
|
182
|
+
},
|
183
|
+
{
|
184
|
+
"accountId": "js:2:ton:86196cb40cd25e9e696bc808e3f2c074ce0b39f2a2a9d482a68eafef86e4a060:ton",
|
185
|
+
"blockHash": null,
|
186
|
+
"blockHeight": 37795087,
|
187
|
+
"extra": {
|
188
|
+
"comment": {
|
189
|
+
"isEncrypted": false,
|
190
|
+
"text": "",
|
191
|
+
},
|
192
|
+
"explorerHash": "3QMpehQMIEz1L9i2RR8NlQ8MEhtIW8OlN9DBmm5PtyM=",
|
193
|
+
"lt": "46398745000001",
|
194
|
+
},
|
195
|
+
"fee": "396410",
|
196
|
+
"hasFailed": false,
|
197
|
+
"hash": "ExoMI/oYFVbPvh+Q52cf2Pyq0aL4jSpuwen8nmOvGBo=",
|
198
|
+
"id": "js:2:ton:86196cb40cd25e9e696bc808e3f2c074ce0b39f2a2a9d482a68eafef86e4a060:ton-ExoMI/oYFVbPvh+Q52cf2Pyq0aL4jSpuwen8nmOvGBo=-IN",
|
199
|
+
"recipients": [
|
200
|
+
"UQCOvQLYvTcbi5tL9MaDNzuVl3-J3vATimNm9yO5XPafLfV4",
|
201
|
+
],
|
202
|
+
"senders": [
|
203
|
+
"EQAnDEE6JghjaRCaY5qWTeV2AalOgyU9ohZ37pmUl-t0toX7",
|
204
|
+
],
|
205
|
+
"type": "IN",
|
206
|
+
"value": "21509565",
|
207
|
+
},
|
208
|
+
{
|
209
|
+
"accountId": "js:2:ton:86196cb40cd25e9e696bc808e3f2c074ce0b39f2a2a9d482a68eafef86e4a060:ton",
|
210
|
+
"blockHash": null,
|
211
|
+
"blockHeight": 37794992,
|
212
|
+
"extra": {
|
213
|
+
"comment": {
|
214
|
+
"isEncrypted": false,
|
215
|
+
"text": "",
|
216
|
+
},
|
217
|
+
"explorerHash": "XxJMiFGk4BHIwNWy1w4ZdenPc0Bh2No+tpUEIi6sycs=",
|
218
|
+
"lt": "46398628000001",
|
219
|
+
},
|
220
|
+
"fee": "84142",
|
221
|
+
"hasFailed": false,
|
222
|
+
"hash": "f73qoft8iF7ANKH32Mq0cRGO9STLYlhuOFVXPQE1jI0=",
|
223
|
+
"id": "js:2:ton:86196cb40cd25e9e696bc808e3f2c074ce0b39f2a2a9d482a68eafef86e4a060:ton-f73qoft8iF7ANKH32Mq0cRGO9STLYlhuOFVXPQE1jI0=-IN",
|
224
|
+
"recipients": [
|
225
|
+
"UQCOvQLYvTcbi5tL9MaDNzuVl3-J3vATimNm9yO5XPafLfV4",
|
226
|
+
],
|
227
|
+
"senders": [
|
228
|
+
"EQAG2WGLWM7dnTdopd2wQlbhsbJck3bOr1xtwzqZ6ldQwgSS",
|
229
|
+
],
|
230
|
+
"type": "IN",
|
231
|
+
"value": "1",
|
232
|
+
},
|
233
|
+
{
|
234
|
+
"accountId": "js:2:ton:86196cb40cd25e9e696bc808e3f2c074ce0b39f2a2a9d482a68eafef86e4a060:ton",
|
235
|
+
"blockHash": null,
|
236
|
+
"blockHeight": 40170325,
|
237
|
+
"extra": {
|
238
|
+
"comment": {
|
239
|
+
"isEncrypted": false,
|
240
|
+
"text": "",
|
241
|
+
},
|
242
|
+
"explorerHash": "t9vXEYLHjR3b40v4hPJQJCZRJDXhdhWiWuhzeKIIY9Y=",
|
243
|
+
"lt": "48954552000001",
|
244
|
+
},
|
245
|
+
"fee": "396410",
|
246
|
+
"hasFailed": false,
|
247
|
+
"hash": "OJbEyEj9+B9yyqkALjMDPHMj2TActki/I5nXxyb0DW4=",
|
248
|
+
"id": "js:2:ton:86196cb40cd25e9e696bc808e3f2c074ce0b39f2a2a9d482a68eafef86e4a060:ton-OJbEyEj9+B9yyqkALjMDPHMj2TActki/I5nXxyb0DW4=-IN",
|
249
|
+
"recipients": [
|
250
|
+
"UQCOvQLYvTcbi5tL9MaDNzuVl3-J3vATimNm9yO5XPafLfV4",
|
251
|
+
],
|
252
|
+
"senders": [
|
253
|
+
"EQCGL01uOV1AxfE_-pXqID2wT_dVrZcdGxsUy6GXULR73o_X",
|
254
|
+
],
|
255
|
+
"type": "IN",
|
256
|
+
"value": "89965561",
|
257
|
+
},
|
258
|
+
{
|
259
|
+
"accountId": "js:2:ton:86196cb40cd25e9e696bc808e3f2c074ce0b39f2a2a9d482a68eafef86e4a060:ton",
|
260
|
+
"blockHash": null,
|
261
|
+
"blockHeight": 35650189,
|
262
|
+
"extra": {
|
263
|
+
"comment": {
|
264
|
+
"isEncrypted": false,
|
265
|
+
"text": "",
|
266
|
+
},
|
267
|
+
"explorerHash": "mzCqNBjsEDmpgq5VMfNfNqnslW64f/B1seatUCej9TY=",
|
268
|
+
"lt": "44161792000003",
|
269
|
+
},
|
270
|
+
"fee": "0",
|
271
|
+
"hasFailed": false,
|
272
|
+
"hash": "V0y/lJDCYzAgmzNVA+dapRQemNP+AJpVhCxBhs7eNfQ=",
|
273
|
+
"id": "js:2:ton:86196cb40cd25e9e696bc808e3f2c074ce0b39f2a2a9d482a68eafef86e4a060:ton-V0y/lJDCYzAgmzNVA+dapRQemNP+AJpVhCxBhs7eNfQ=-IN",
|
274
|
+
"recipients": [
|
275
|
+
"UQCOvQLYvTcbi5tL9MaDNzuVl3-J3vATimNm9yO5XPafLfV4",
|
276
|
+
],
|
277
|
+
"senders": [
|
278
|
+
"UQDzd8aeBOU-jqYw_ZSuZjceI5p-F4b7HMprAsUJAtRPbMol",
|
279
|
+
],
|
280
|
+
"type": "IN",
|
281
|
+
"value": "1000000000",
|
282
|
+
},
|
283
|
+
],
|
284
|
+
[
|
285
|
+
{
|
286
|
+
"accountId": "js:2:ton:86196cb40cd25e9e696bc808e3f2c074ce0b39f2a2a9d482a68eafef86e4a060:ton+ton%2Fjetton%2Feqavlwfdxgf2lxm67y4yzc17wykd9a0guwpkms1gosm~!underscore!~~!underscore!~not",
|
287
|
+
"blockHash": null,
|
288
|
+
"blockHeight": 1,
|
289
|
+
"extra": {
|
290
|
+
"comment": {
|
291
|
+
"isEncrypted": false,
|
292
|
+
"text": "Sending NOT",
|
293
|
+
},
|
294
|
+
"explorerHash": "I3buHLzERZd6whX8lFxllLqTzMWC3WMgFJHrWHffKfI=",
|
295
|
+
"lt": "48954545000001",
|
296
|
+
},
|
297
|
+
"fee": "0",
|
298
|
+
"hasFailed": false,
|
299
|
+
"hash": "I3buHLzERZd6whX8lFxllLqTzMWC3WMgFJHrWHffKfI=",
|
300
|
+
"id": "js:2:ton:86196cb40cd25e9e696bc808e3f2c074ce0b39f2a2a9d482a68eafef86e4a060:ton+ton%2Fjetton%2Feqavlwfdxgf2lxm67y4yzc17wykd9a0guwpkms1gosm~!underscore!~~!underscore!~not-I3buHLzERZd6whX8lFxllLqTzMWC3WMgFJHrWHffKfI=-OUT",
|
301
|
+
"recipients": [
|
302
|
+
"EQB0Y6BtnRS9rIJXpsTHFzhEF83Xa4e5yBDOrPEOah66rJs_",
|
303
|
+
],
|
304
|
+
"senders": [
|
305
|
+
"UQCOvQLYvTcbi5tL9MaDNzuVl3-J3vATimNm9yO5XPafLfV4",
|
306
|
+
],
|
307
|
+
"type": "OUT",
|
308
|
+
"value": "5000000000",
|
309
|
+
},
|
310
|
+
{
|
311
|
+
"accountId": "js:2:ton:86196cb40cd25e9e696bc808e3f2c074ce0b39f2a2a9d482a68eafef86e4a060:ton+ton%2Fjetton%2Feqavlwfdxgf2lxm67y4yzc17wykd9a0guwpkms1gosm~!underscore!~~!underscore!~not",
|
312
|
+
"blockHash": null,
|
313
|
+
"blockHeight": 1,
|
314
|
+
"extra": {
|
315
|
+
"comment": {
|
316
|
+
"isEncrypted": false,
|
317
|
+
"text": "",
|
318
|
+
},
|
319
|
+
"explorerHash": "XgQwQjYWAOd2o+4chBrfLnjlAf4wVjnnTPcDrmBKAaM=",
|
320
|
+
"lt": "48954497000001",
|
321
|
+
},
|
322
|
+
"fee": "0",
|
323
|
+
"hasFailed": false,
|
324
|
+
"hash": "XgQwQjYWAOd2o+4chBrfLnjlAf4wVjnnTPcDrmBKAaM=",
|
325
|
+
"id": "js:2:ton:86196cb40cd25e9e696bc808e3f2c074ce0b39f2a2a9d482a68eafef86e4a060:ton+ton%2Fjetton%2Feqavlwfdxgf2lxm67y4yzc17wykd9a0guwpkms1gosm~!underscore!~~!underscore!~not-XgQwQjYWAOd2o+4chBrfLnjlAf4wVjnnTPcDrmBKAaM=-IN",
|
326
|
+
"recipients": [
|
327
|
+
"UQCOvQLYvTcbi5tL9MaDNzuVl3-J3vATimNm9yO5XPafLfV4",
|
328
|
+
],
|
329
|
+
"senders": [
|
330
|
+
"EQB0Y6BtnRS9rIJXpsTHFzhEF83Xa4e5yBDOrPEOah66rJs_",
|
331
|
+
],
|
332
|
+
"type": "IN",
|
333
|
+
"value": "40000000000",
|
334
|
+
},
|
335
|
+
],
|
336
|
+
[],
|
337
|
+
]
|
338
|
+
`;
|
@@ -2,7 +2,4 @@ import { dataset } from "@ledgerhq/coin-ton/__tests__/integration/bridge.integra
|
|
2
2
|
import { testBridge } from "../../__tests__/test-helpers/bridge";
|
3
3
|
import "../../__tests__/test-helpers/setup";
|
4
4
|
|
5
|
-
|
6
|
-
describe.skip("ton integration", () => {
|
7
|
-
testBridge(dataset);
|
8
|
-
});
|
5
|
+
testBridge(dataset);
|
@@ -111,7 +111,6 @@ export const DEFAULT_FEATURES: Features = {
|
|
111
111
|
ptxServiceCtaExchangeDrawer: DEFAULT_FEATURE,
|
112
112
|
ptxServiceCtaScreens: DEFAULT_FEATURE,
|
113
113
|
ptxSwapReceiveTRC20WithoutTrx: DEFAULT_FEATURE,
|
114
|
-
ptxSwapconfirmSwapOnDevice: DEFAULT_FEATURE,
|
115
114
|
disableNftLedgerMarket: DEFAULT_FEATURE,
|
116
115
|
disableNftRaribleOpensea: DEFAULT_FEATURE,
|
117
116
|
disableNftSend: DEFAULT_FEATURE,
|
@@ -670,7 +669,6 @@ export const DEFAULT_FEATURES: Features = {
|
|
670
669
|
},
|
671
670
|
supportDeviceApex: DEFAULT_FEATURE,
|
672
671
|
llmSyncOnboardingIncr1: DEFAULT_FEATURE,
|
673
|
-
noah: DEFAULT_FEATURE,
|
674
672
|
};
|
675
673
|
|
676
674
|
// Firebase SDK treat JSON values as strings
|
@@ -4,9 +4,6 @@ import defaultNetworkApi from "./api";
|
|
4
4
|
import { fromPromise } from "xstate";
|
5
5
|
import { useMachine } from "@xstate/react";
|
6
6
|
import { serviceStatusMachine } from "./machine";
|
7
|
-
import { LEDGER_COMPONENTS } from "./ledger-components";
|
8
|
-
import { EntryPoint } from "./entry-points";
|
9
|
-
|
10
7
|
type Props = {
|
11
8
|
children: React.ReactNode;
|
12
9
|
autoUpdateDelay: number;
|
@@ -36,61 +33,21 @@ function escapeRegExp(string) {
|
|
36
33
|
return string.replace(/[.*+?^${}()[\]\\]/g, "\\$&"); // $& means the whole matched string
|
37
34
|
}
|
38
35
|
|
39
|
-
function sanitizeName(name: string): string {
|
40
|
-
return name.toLowerCase().trim().replace(/\s+/g, " "); // collapse multiple spaces
|
41
|
-
}
|
42
|
-
|
43
|
-
/**
|
44
|
-
* Filters service status incidents based on related tickers or Ledger components.
|
45
|
-
*
|
46
|
-
* ## Behavior:
|
47
|
-
* - If there are no `tickers` or no `incidents`, returns an empty list.
|
48
|
-
* - For each incident:
|
49
|
-
* 1. ✅ If the incident has no components → keep it (always relevant).
|
50
|
-
* 2. ✅ If at least one component name matches a known **Ledger component** → keep it.
|
51
|
-
* 3. ✅ If at least one component name contains a **currency ticker** → keep it.
|
52
|
-
* 4. ❌ Otherwise, the incident is discarded.
|
53
|
-
*
|
54
|
-
* @param {Incident[]} [incidents=[]] - List of incidents to filter.
|
55
|
-
* @param {string[]} [tickers=[]] - List of currency tickers to match against incident components.
|
56
|
-
* @param {EntryPoint} [entryPoint] - Entry point where the incidents are displayed (specifically for Ledger components)
|
57
|
-
* @returns {Incident[]} The list of incidents relevant to the provided tickers or Ledger components.
|
58
|
-
*/
|
59
|
-
|
60
36
|
export function filterServiceStatusIncidents(
|
61
37
|
incidents: Incident[],
|
62
38
|
tickers: string[] = [],
|
63
|
-
entryPoint?: EntryPoint,
|
64
39
|
): Incident[] {
|
65
|
-
if (!incidents.length)
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
if (!components?.length) return true;
|
77
|
-
|
78
|
-
return components.some(({ name }) => {
|
79
|
-
const sanitizedName = sanitizeName(name);
|
80
|
-
|
81
|
-
// Show Ledger components only for Notification Center
|
82
|
-
if (entryPoint === "notifications" && ledgerComponentsSet.has(sanitizedName)) {
|
83
|
-
return true;
|
84
|
-
}
|
85
|
-
|
86
|
-
// Show coin/ticker-specific components for flows
|
87
|
-
if (tickerRegex && tickerRegex.test(sanitizedName)) {
|
88
|
-
return true;
|
89
|
-
}
|
90
|
-
|
91
|
-
return false;
|
92
|
-
});
|
93
|
-
});
|
40
|
+
if (!tickers || tickers.length === 0 || !incidents || incidents.length === 0) {
|
41
|
+
return [];
|
42
|
+
}
|
43
|
+
|
44
|
+
const tickersRegex = new RegExp(escapeRegExp(tickers.join("|")), "i");
|
45
|
+
return incidents.filter(
|
46
|
+
({ components }) =>
|
47
|
+
!components || // dont filter out if no components
|
48
|
+
components.length === 0 ||
|
49
|
+
components.some(({ name }) => tickersRegex.test(name)), // component name should hold currency ticker
|
50
|
+
);
|
94
51
|
}
|
95
52
|
|
96
53
|
// filter out service status incidents by given currencies or fallback on context currencies
|
@@ -98,12 +55,8 @@ export function useFilteredServiceStatus(filters?: ServiceStatusUserSettings): S
|
|
98
55
|
const stateData = useContext(ServiceStatusContext);
|
99
56
|
const { incidents, context } = stateData;
|
100
57
|
const filteredIncidents = useMemo(() => {
|
101
|
-
return filterServiceStatusIncidents(
|
102
|
-
|
103
|
-
filters?.tickers || context?.tickers,
|
104
|
-
filters?.entryPoint,
|
105
|
-
);
|
106
|
-
}, [incidents, filters?.tickers, context?.tickers, filters?.entryPoint]);
|
58
|
+
return filterServiceStatusIncidents(incidents, filters?.tickers || context?.tickers);
|
59
|
+
}, [incidents, context, filters?.tickers]);
|
107
60
|
|
108
61
|
return { ...stateData, incidents: filteredIncidents };
|
109
62
|
}
|
@@ -116,7 +69,6 @@ export const ServiceStatusProvider = ({
|
|
116
69
|
}: Props): ReactElement => {
|
117
70
|
const fetchData = useCallback(async () => {
|
118
71
|
const serviceStatusSummary = await networkApi.fetchStatusSummary();
|
119
|
-
|
120
72
|
return {
|
121
73
|
incidents: serviceStatusSummary.incidents,
|
122
74
|
updateTime: Date.now(),
|
@@ -1,5 +1,3 @@
|
|
1
|
-
import { EntryPoint } from "./entry-points";
|
2
|
-
|
3
1
|
type Component = {
|
4
2
|
id: string;
|
5
3
|
name: string;
|
@@ -44,6 +42,5 @@ export type ServiceStatusApi = {
|
|
44
42
|
};
|
45
43
|
|
46
44
|
export type ServiceStatusUserSettings = {
|
47
|
-
tickers
|
48
|
-
entryPoint?: EntryPoint;
|
45
|
+
tickers: string[];
|
49
46
|
};
|
package/src/wallet-api/react.ts
CHANGED
@@ -1010,11 +1010,11 @@ export interface RecentlyUsed {
|
|
1010
1010
|
|
1011
1011
|
export type RecentlyUsedManifest = AppManifest & { usedAt: UsedAt };
|
1012
1012
|
export type UsedAt = {
|
1013
|
-
unit
|
1013
|
+
unit: Intl.RelativeTimeFormatUnit;
|
1014
1014
|
diff: number;
|
1015
1015
|
};
|
1016
1016
|
|
1017
|
-
function calculateTimeDiff(usedAt: string)
|
1017
|
+
function calculateTimeDiff(usedAt: string) {
|
1018
1018
|
const start = new Date();
|
1019
1019
|
const end = new Date(usedAt);
|
1020
1020
|
const interval = intervalToDuration({ start, end });
|
@@ -1027,7 +1027,7 @@ function calculateTimeDiff(usedAt: string): UsedAt {
|
|
1027
1027
|
"minutes",
|
1028
1028
|
"seconds",
|
1029
1029
|
];
|
1030
|
-
let timeDiff
|
1030
|
+
let timeDiff = { unit: units[-1], diff: 0 };
|
1031
1031
|
|
1032
1032
|
for (const unit of units) {
|
1033
1033
|
if (interval[unit] > 0) {
|
@@ -1,18 +0,0 @@
|
|
1
|
-
import { Account } from "@ledgerhq/types-live";
|
2
|
-
import { Props } from "../react/BridgeSync";
|
3
|
-
type Session = {
|
4
|
-
reason: string;
|
5
|
-
startTime: number;
|
6
|
-
accountIds: string[];
|
7
|
-
remaining: Set<string>;
|
8
|
-
errorsCount: number;
|
9
|
-
};
|
10
|
-
export declare function createSyncSessionManager(trackAnalytics: Props["trackAnalytics"]): {
|
11
|
-
readonly start: (ids: string[], reason: string) => void;
|
12
|
-
readonly onAccountSyncDone: (accountId: string, accounts: Account[], hadError?: boolean) => void;
|
13
|
-
};
|
14
|
-
export declare function getTotalOperations(accounts: Account[]): number;
|
15
|
-
export declare function getUniqueChains(accounts: Account[]): string[];
|
16
|
-
export declare function trackSessionAnalytics(trackAnalytics: Props["trackAnalytics"], session: Session, accounts: Account[]): void;
|
17
|
-
export {};
|
18
|
-
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/bridge/syncSessionManager/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAE5C,KAAK,OAAO,GAAG;IACb,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,SAAS,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAGF,wBAAgB,wBAAwB,CAAC,cAAc,EAAE,KAAK,CAAC,gBAAgB,CAAC;0BAK1D,MAAM,EAAE,UAAU,MAAM;4CAmBN,MAAM,YAAY,OAAO,EAAE;EAmBlE;AAED,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,OAAO,EAAE,GAAG,MAAM,CAE9D;AAED,wBAAgB,eAAe,CAAC,QAAQ,EAAE,OAAO,EAAE,GAAG,MAAM,EAAE,CAE7D;AAED,wBAAgB,qBAAqB,CACnC,cAAc,EAAE,KAAK,CAAC,gBAAgB,CAAC,EACvC,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,OAAO,EAAE,QAgBpB"}
|
@@ -1,75 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.trackSessionAnalytics = exports.getUniqueChains = exports.getTotalOperations = exports.createSyncSessionManager = void 0;
|
4
|
-
const logs_1 = require("@ledgerhq/logs");
|
5
|
-
// Session manager factory to track global sync sessions (Accounts)
|
6
|
-
function createSyncSessionManager(trackAnalytics) {
|
7
|
-
let current = null;
|
8
|
-
let hasTrackedInitial = false;
|
9
|
-
const start = (ids, reason) => {
|
10
|
-
if (reason === "initial" && hasTrackedInitial)
|
11
|
-
return;
|
12
|
-
current = {
|
13
|
-
reason,
|
14
|
-
startTime: Date.now(),
|
15
|
-
accountIds: ids,
|
16
|
-
remaining: new Set(ids),
|
17
|
-
errorsCount: 0,
|
18
|
-
};
|
19
|
-
logSyncSession("started", { reason, accounts: ids.length });
|
20
|
-
};
|
21
|
-
/**
|
22
|
-
*
|
23
|
-
* @param accountId - the account id that has completed sync
|
24
|
-
* @param accounts - the accounts that will be synced
|
25
|
-
* @param hadError - whether the account sync had an error
|
26
|
-
*
|
27
|
-
*/
|
28
|
-
const onAccountSyncDone = (accountId, accounts, hadError = false) => {
|
29
|
-
if (!current)
|
30
|
-
return;
|
31
|
-
current.remaining.delete(accountId);
|
32
|
-
if (hadError) {
|
33
|
-
current.errorsCount += 1;
|
34
|
-
}
|
35
|
-
if (current.remaining.size === 0) {
|
36
|
-
trackSessionAnalytics(trackAnalytics, current, accounts);
|
37
|
-
if (current.reason === "initial") {
|
38
|
-
hasTrackedInitial = true;
|
39
|
-
}
|
40
|
-
current = null;
|
41
|
-
}
|
42
|
-
};
|
43
|
-
return { start, onAccountSyncDone };
|
44
|
-
}
|
45
|
-
exports.createSyncSessionManager = createSyncSessionManager;
|
46
|
-
function getTotalOperations(accounts) {
|
47
|
-
return accounts.reduce((sum, acc) => sum + acc.operationsCount, 0);
|
48
|
-
}
|
49
|
-
exports.getTotalOperations = getTotalOperations;
|
50
|
-
function getUniqueChains(accounts) {
|
51
|
-
return [...new Set(accounts.map(acc => acc.currency.name))];
|
52
|
-
}
|
53
|
-
exports.getUniqueChains = getUniqueChains;
|
54
|
-
function trackSessionAnalytics(trackAnalytics, session, accounts) {
|
55
|
-
const duration = (Date.now() - session.startTime) / 1000;
|
56
|
-
const totalOps = getTotalOperations(accounts);
|
57
|
-
const chains = getUniqueChains(accounts);
|
58
|
-
trackAnalytics("SyncSuccessAllAccounts", {
|
59
|
-
duration,
|
60
|
-
accountsCount: accounts.length,
|
61
|
-
operationsCount: totalOps,
|
62
|
-
chains,
|
63
|
-
reason: session.reason,
|
64
|
-
syncWithErrors: session.errorsCount,
|
65
|
-
});
|
66
|
-
logSyncSession("finished", { reason: session.reason, duration: `${duration}s` });
|
67
|
-
}
|
68
|
-
exports.trackSessionAnalytics = trackSessionAnalytics;
|
69
|
-
function logSyncSession(event, data) {
|
70
|
-
const serialized = Object.entries(data)
|
71
|
-
.map(([key, value]) => `${key}=${value}`)
|
72
|
-
.join(", ");
|
73
|
-
(0, logs_1.log)("bridge", `SyncSession ${event} ${serialized}`);
|
74
|
-
}
|
75
|
-
//# sourceMappingURL=index.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/bridge/syncSessionManager/index.ts"],"names":[],"mappings":"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"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.test.d.ts","sourceRoot":"","sources":["../../../src/bridge/syncSessionManager/index.test.ts"],"names":[],"mappings":""}
|