@ledgerhq/coin-evm 5.3.1 → 5.3.3
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/.oxlintrc.json +3 -13
- package/CHANGELOG.md +13 -0
- package/lib/adapters/blockOperations.d.ts +2 -2
- package/lib/adapters/blockOperations.d.ts.map +1 -1
- package/lib/adapters/blockOperations.js.map +1 -1
- package/lib/api/index.d.ts +1 -1
- package/lib/api/index.d.ts.map +1 -1
- package/lib/config.d.ts +1 -1
- package/lib/config.d.ts.map +1 -1
- package/lib/logic/combine.d.ts +2 -1
- package/lib/logic/combine.d.ts.map +1 -1
- package/lib/logic/combine.js.map +1 -1
- package/lib/logic/common.d.ts +2 -1
- package/lib/logic/common.d.ts.map +1 -1
- package/lib/logic/common.js.map +1 -1
- package/lib/logic/craftTransaction.d.ts +1 -1
- package/lib/logic/craftTransaction.d.ts.map +1 -1
- package/lib/logic/craftTransaction.js.map +1 -1
- package/lib/logic/craftTransactionData.d.ts +1 -1
- package/lib/logic/craftTransactionData.d.ts.map +1 -1
- package/lib/logic/estimateFees.d.ts +1 -1
- package/lib/logic/estimateFees.d.ts.map +1 -1
- package/lib/logic/estimateFees.js.map +1 -1
- package/lib/logic/getBalance.d.ts +1 -1
- package/lib/logic/getBalance.d.ts.map +1 -1
- package/lib/logic/getBalance.js.map +1 -1
- package/lib/logic/getBlock.d.ts +1 -1
- package/lib/logic/getBlock.d.ts.map +1 -1
- package/lib/logic/getBlock.js.map +1 -1
- package/lib/logic/getStakes.d.ts +1 -1
- package/lib/logic/getStakes.d.ts.map +1 -1
- package/lib/logic/internalTransactionsFetcher.d.ts +1 -1
- package/lib/logic/internalTransactionsFetcher.d.ts.map +1 -1
- package/lib/logic/internalTransactionsFetcher.js.map +1 -1
- package/lib/logic/validateIntent.d.ts +1 -1
- package/lib/logic/validateIntent.d.ts.map +1 -1
- package/lib/logic/validateIntent.js.map +1 -1
- package/lib/logic.d.ts +1 -1
- package/lib/logic.d.ts.map +1 -1
- package/lib/network/explorer/etherscan.d.ts +4 -4
- package/lib/network/explorer/etherscan.d.ts.map +1 -1
- package/lib/network/explorer/etherscan.js.map +1 -1
- package/lib/network/explorer/index.d.ts +2 -2
- package/lib/network/explorer/index.d.ts.map +1 -1
- package/lib/network/explorer/index.js.map +1 -1
- package/lib/network/explorer/ledger.d.ts +2 -2
- package/lib/network/explorer/ledger.d.ts.map +1 -1
- package/lib/network/explorer/ledger.js.map +1 -1
- package/lib/network/explorer/none.d.ts +1 -1
- package/lib/network/explorer/none.d.ts.map +1 -1
- package/lib/network/explorer/none.js.map +1 -1
- package/lib/network/explorer/types.d.ts +1 -1
- package/lib/network/explorer/types.d.ts.map +1 -1
- package/lib/network/gasTracker/index.d.ts +2 -2
- package/lib/network/gasTracker/index.d.ts.map +1 -1
- package/lib/network/gasTracker/index.js.map +1 -1
- package/lib/network/gasTracker/ledger.d.ts +3 -3
- package/lib/network/gasTracker/ledger.d.ts.map +1 -1
- package/lib/network/gasTracker/ledger.js.map +1 -1
- package/lib/network/gasTracker/types.d.ts +2 -2
- package/lib/network/gasTracker/types.d.ts.map +1 -1
- package/lib/network/node/ledger.d.ts +2 -2
- package/lib/network/node/ledger.d.ts.map +1 -1
- package/lib/network/node/ledger.js.map +1 -1
- package/lib/network/node/rpc.common.d.ts +1 -1
- package/lib/network/node/rpc.common.d.ts.map +1 -1
- package/lib/network/node/rpc.common.js.map +1 -1
- package/lib/network/node/types.d.ts +3 -3
- package/lib/network/node/types.d.ts.map +1 -1
- package/lib/staking/validators/monad.d.ts +2 -1
- package/lib/staking/validators/monad.d.ts.map +1 -1
- package/lib/staking/validators/monad.js.map +1 -1
- package/lib/staking/validators/monadResolver.d.ts +2 -1
- package/lib/staking/validators/monadResolver.d.ts.map +1 -1
- package/lib/staking/validators/monadResolver.js.map +1 -1
- package/lib/staking/validators/somnia.d.ts.map +1 -1
- package/lib/staking/validators/somnia.js.map +1 -1
- package/lib/staking/validators/zero_gravity.d.ts.map +1 -1
- package/lib/staking/validators/zero_gravity.js.map +1 -1
- package/lib/types/assets.d.ts +1 -1
- package/lib/types/assets.d.ts.map +1 -1
- package/lib/types/transaction.d.ts +1 -1
- package/lib/types/transaction.d.ts.map +1 -1
- package/lib-es/adapters/blockOperations.d.ts +2 -2
- package/lib-es/adapters/blockOperations.d.ts.map +1 -1
- package/lib-es/adapters/blockOperations.js.map +1 -1
- package/lib-es/api/index.d.ts +1 -1
- package/lib-es/api/index.d.ts.map +1 -1
- package/lib-es/config.d.ts +1 -1
- package/lib-es/config.d.ts.map +1 -1
- package/lib-es/logic/combine.d.ts +2 -1
- package/lib-es/logic/combine.d.ts.map +1 -1
- package/lib-es/logic/combine.js.map +1 -1
- package/lib-es/logic/common.d.ts +2 -1
- package/lib-es/logic/common.d.ts.map +1 -1
- package/lib-es/logic/common.js +1 -1
- package/lib-es/logic/common.js.map +1 -1
- package/lib-es/logic/craftTransaction.d.ts +1 -1
- package/lib-es/logic/craftTransaction.d.ts.map +1 -1
- package/lib-es/logic/craftTransaction.js.map +1 -1
- package/lib-es/logic/craftTransactionData.d.ts +1 -1
- package/lib-es/logic/craftTransactionData.d.ts.map +1 -1
- package/lib-es/logic/estimateFees.d.ts +1 -1
- package/lib-es/logic/estimateFees.d.ts.map +1 -1
- package/lib-es/logic/estimateFees.js.map +1 -1
- package/lib-es/logic/getBalance.d.ts +1 -1
- package/lib-es/logic/getBalance.d.ts.map +1 -1
- package/lib-es/logic/getBalance.js.map +1 -1
- package/lib-es/logic/getBlock.d.ts +1 -1
- package/lib-es/logic/getBlock.d.ts.map +1 -1
- package/lib-es/logic/getBlock.js.map +1 -1
- package/lib-es/logic/getStakes.d.ts +1 -1
- package/lib-es/logic/getStakes.d.ts.map +1 -1
- package/lib-es/logic/internalTransactionsFetcher.d.ts +1 -1
- package/lib-es/logic/internalTransactionsFetcher.d.ts.map +1 -1
- package/lib-es/logic/internalTransactionsFetcher.js.map +1 -1
- package/lib-es/logic/validateIntent.d.ts +1 -1
- package/lib-es/logic/validateIntent.d.ts.map +1 -1
- package/lib-es/logic/validateIntent.js.map +1 -1
- package/lib-es/logic.d.ts +1 -1
- package/lib-es/logic.d.ts.map +1 -1
- package/lib-es/network/explorer/etherscan.d.ts +4 -4
- package/lib-es/network/explorer/etherscan.d.ts.map +1 -1
- package/lib-es/network/explorer/etherscan.js.map +1 -1
- package/lib-es/network/explorer/index.d.ts +2 -2
- package/lib-es/network/explorer/index.d.ts.map +1 -1
- package/lib-es/network/explorer/index.js.map +1 -1
- package/lib-es/network/explorer/ledger.d.ts +2 -2
- package/lib-es/network/explorer/ledger.d.ts.map +1 -1
- package/lib-es/network/explorer/ledger.js.map +1 -1
- package/lib-es/network/explorer/none.d.ts +1 -1
- package/lib-es/network/explorer/none.d.ts.map +1 -1
- package/lib-es/network/explorer/none.js.map +1 -1
- package/lib-es/network/explorer/types.d.ts +1 -1
- package/lib-es/network/explorer/types.d.ts.map +1 -1
- package/lib-es/network/gasTracker/index.d.ts +2 -2
- package/lib-es/network/gasTracker/index.d.ts.map +1 -1
- package/lib-es/network/gasTracker/index.js.map +1 -1
- package/lib-es/network/gasTracker/ledger.d.ts +3 -3
- package/lib-es/network/gasTracker/ledger.d.ts.map +1 -1
- package/lib-es/network/gasTracker/ledger.js +1 -1
- package/lib-es/network/gasTracker/ledger.js.map +1 -1
- package/lib-es/network/gasTracker/types.d.ts +2 -2
- package/lib-es/network/gasTracker/types.d.ts.map +1 -1
- package/lib-es/network/node/ledger.d.ts +2 -2
- package/lib-es/network/node/ledger.d.ts.map +1 -1
- package/lib-es/network/node/ledger.js.map +1 -1
- package/lib-es/network/node/rpc.common.d.ts +1 -1
- package/lib-es/network/node/rpc.common.d.ts.map +1 -1
- package/lib-es/network/node/rpc.common.js +1 -1
- package/lib-es/network/node/rpc.common.js.map +1 -1
- package/lib-es/network/node/types.d.ts +3 -3
- package/lib-es/network/node/types.d.ts.map +1 -1
- package/lib-es/staking/validators/monad.d.ts +2 -1
- package/lib-es/staking/validators/monad.d.ts.map +1 -1
- package/lib-es/staking/validators/monad.js.map +1 -1
- package/lib-es/staking/validators/monadResolver.d.ts +2 -1
- package/lib-es/staking/validators/monadResolver.d.ts.map +1 -1
- package/lib-es/staking/validators/monadResolver.js.map +1 -1
- package/lib-es/staking/validators/somnia.d.ts.map +1 -1
- package/lib-es/staking/validators/somnia.js.map +1 -1
- package/lib-es/staking/validators/zero_gravity.d.ts.map +1 -1
- package/lib-es/staking/validators/zero_gravity.js.map +1 -1
- package/lib-es/types/assets.d.ts +1 -1
- package/lib-es/types/assets.d.ts.map +1 -1
- package/lib-es/types/transaction.d.ts +1 -1
- package/lib-es/types/transaction.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/adapters/blockOperations.test.ts +29 -31
- package/src/adapters/blockOperations.ts +3 -2
- package/src/adapters/etherscan.test.ts +7 -7
- package/src/adapters/ledger.test.ts +2 -2
- package/src/api/getBlock.integ.test.ts +1 -1
- package/src/api/index.fantom.integ.test.ts +1 -1
- package/src/api/index.flare.integ.test.ts +2 -14
- package/src/api/index.integ.test.ts +330 -246
- package/src/api/index.linea.integ.test.ts +1 -1
- package/src/api/index.optimism.integ.test.ts +1 -1
- package/src/api/index.shape.integ.test.ts +1 -1
- package/src/api/index.ts +1 -1
- package/src/config.ts +1 -1
- package/src/fixtures/context.fixtures.ts +79 -1
- package/src/fixtures/ethers.fixtures.ts +26 -0
- package/src/fixtures/ledger.fixtures.ts +1 -1
- package/src/internalTxSources.test.ts +3 -6
- package/src/logic/broadcast.integ.test.ts +6 -18
- package/src/logic/broadcast.test.ts +19 -31
- package/src/logic/broadcastSource.test.ts +6 -7
- package/src/logic/combine.test.ts +2 -2
- package/src/logic/combine.ts +2 -1
- package/src/logic/common.test.ts +120 -112
- package/src/logic/common.ts +2 -7
- package/src/logic/craftTransaction.test.ts +163 -200
- package/src/logic/craftTransaction.ts +3 -2
- package/src/logic/craftTransactionData.test.ts +6 -6
- package/src/logic/craftTransactionData.ts +1 -1
- package/src/logic/estimateFees.test.ts +19 -15
- package/src/logic/estimateFees.ts +6 -3
- package/src/logic/getBalance.test.ts +16 -15
- package/src/logic/getBalance.ts +4 -3
- package/src/logic/getBlock.test.ts +379 -388
- package/src/logic/getBlock.ts +3 -2
- package/src/logic/getBlockInfo.test.ts +7 -9
- package/src/logic/getNextSequence.test.ts +5 -5
- package/src/logic/getStakes.test.ts +35 -35
- package/src/logic/getStakes.ts +1 -1
- package/src/logic/internalTransactionsFetcher.test.ts +26 -24
- package/src/logic/internalTransactionsFetcher.ts +1 -1
- package/src/logic/lastBlock.test.ts +29 -20
- package/src/logic/listOperations.test.ts +44 -40
- package/src/logic/validateIntent.test.ts +152 -101
- package/src/logic/validateIntent.ts +4 -2
- package/src/logic.test.ts +13 -18
- package/src/logic.ts +1 -1
- package/src/network/explorer/etherscan.test.ts +6 -6
- package/src/network/explorer/etherscan.ts +12 -10
- package/src/network/explorer/index.test.ts +52 -22
- package/src/network/explorer/index.ts +2 -2
- package/src/network/explorer/ledger.test.ts +17 -5
- package/src/network/explorer/ledger.ts +3 -2
- package/src/network/explorer/none.ts +2 -1
- package/src/network/explorer/types.ts +1 -1
- package/src/network/gasTracker/index.test.ts +14 -8
- package/src/network/gasTracker/index.ts +2 -2
- package/src/network/gasTracker/ledger.test.ts +34 -29
- package/src/network/gasTracker/ledger.ts +5 -7
- package/src/network/gasTracker/types.ts +2 -2
- package/src/network/node/index.memoization.test.ts +25 -31
- package/src/network/node/index.test.ts +14 -25
- package/src/network/node/ledger.test.ts +45 -60
- package/src/network/node/ledger.ts +6 -5
- package/src/network/node/node.fixtures.ts +0 -2
- package/src/network/node/rpc.common.ts +14 -14
- package/src/network/node/rpc.test.ts +153 -184
- package/src/network/node/types.ts +3 -3
- package/src/staking/detectOperationType.test.ts +1 -1
- package/src/staking/encoder.test.ts +14 -22
- package/src/staking/logic.test.ts +20 -14
- package/src/staking/operations/index.test.ts +29 -29
- package/src/staking/prepareIntents.test.ts +26 -20
- package/src/staking/redelegations.test.ts +50 -33
- package/src/staking/rewards.test.ts +29 -17
- package/src/staking/rewardsFromReceipt.test.ts +20 -21
- package/src/staking/transactionData.test.ts +23 -23
- package/src/staking/validators/monad.test.ts +65 -24
- package/src/staking/validators/monad.ts +2 -1
- package/src/staking/validators/monadResolver.ts +2 -1
- package/src/staking/validators/somnia.test.ts +21 -13
- package/src/staking/validators/somnia.ts +2 -1
- package/src/staking/validators/zero_gravity.test.ts +118 -48
- package/src/staking/validators/zero_gravity.ts +2 -1
- package/src/staking/validators.integ.test.ts +13 -25
- package/src/staking/validators.test.ts +7 -2
- package/src/types/assets.ts +1 -1
- package/src/types/transaction.ts +1 -1
|
@@ -1,29 +1,61 @@
|
|
|
1
1
|
// SPDX-FileCopyrightText: © 2026 LEDGER SAS
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
|
+
import type { EvmConfigInfo } from '../../config'
|
|
4
5
|
import { AssertionError, fail } from 'assert'
|
|
5
|
-
import { EvmConfigInfo } from '../../config'
|
|
6
6
|
import { UnknownExplorer } from '../../errors'
|
|
7
|
+
import {
|
|
8
|
+
createMockEvmConfigInfo,
|
|
9
|
+
mkEtherscanExplorer,
|
|
10
|
+
mkExternalNode,
|
|
11
|
+
mkLedgerExplorer,
|
|
12
|
+
} from '../../fixtures/context.fixtures'
|
|
7
13
|
import etherscanLikeApi from './etherscan'
|
|
8
14
|
import ledgerExplorerApi from './ledger'
|
|
9
15
|
import { getExplorerApi } from './index'
|
|
10
16
|
|
|
11
17
|
const configFor = (currencyId: string): EvmConfigInfo => {
|
|
18
|
+
const node = mkExternalNode()
|
|
12
19
|
switch (currencyId) {
|
|
13
20
|
case 'anything-coin':
|
|
14
|
-
return {
|
|
21
|
+
return createMockEvmConfigInfo({
|
|
22
|
+
chainId: 1,
|
|
23
|
+
node,
|
|
24
|
+
// @ts-expect-error — intentional invalid explorer type to test UnknownExplorer error path
|
|
25
|
+
explorer: { type: 'anything', uri: 'notworking' },
|
|
26
|
+
})
|
|
15
27
|
case 'etherscan-coin':
|
|
16
|
-
return {
|
|
28
|
+
return createMockEvmConfigInfo({
|
|
29
|
+
chainId: 1,
|
|
30
|
+
node,
|
|
31
|
+
explorer: mkEtherscanExplorer({ uri: 'working' }),
|
|
32
|
+
})
|
|
17
33
|
case 'blockscout-coin':
|
|
18
|
-
return {
|
|
34
|
+
return createMockEvmConfigInfo({
|
|
35
|
+
chainId: 1,
|
|
36
|
+
node,
|
|
37
|
+
explorer: { type: 'blockscout', uri: 'working' },
|
|
38
|
+
})
|
|
19
39
|
case 'etherscan-coin-no-cache':
|
|
20
|
-
return {
|
|
40
|
+
return createMockEvmConfigInfo({
|
|
41
|
+
chainId: 1,
|
|
42
|
+
node,
|
|
43
|
+
explorer: mkEtherscanExplorer({ uri: 'working', noCache: true }),
|
|
44
|
+
})
|
|
21
45
|
case 'blockscout-coin-no-cache':
|
|
22
|
-
return {
|
|
46
|
+
return createMockEvmConfigInfo({
|
|
47
|
+
chainId: 1,
|
|
48
|
+
node,
|
|
49
|
+
explorer: { type: 'blockscout', uri: 'working', noCache: true },
|
|
50
|
+
})
|
|
23
51
|
case 'ledger-coin':
|
|
24
|
-
return {
|
|
52
|
+
return createMockEvmConfigInfo({
|
|
53
|
+
chainId: 1,
|
|
54
|
+
node,
|
|
55
|
+
explorer: mkLedgerExplorer({ explorerId: 'eth' }),
|
|
56
|
+
})
|
|
25
57
|
default:
|
|
26
|
-
return {
|
|
58
|
+
return createMockEvmConfigInfo({ chainId: 1, node })
|
|
27
59
|
}
|
|
28
60
|
}
|
|
29
61
|
|
|
@@ -32,7 +64,7 @@ describe('EVM Family', () => {
|
|
|
32
64
|
describe('getExplorerApi', () => {
|
|
33
65
|
it('should throw when requesting a non existing explorer', () => {
|
|
34
66
|
try {
|
|
35
|
-
getExplorerApi(configFor('anything-coin'),
|
|
67
|
+
getExplorerApi(configFor('anything-coin'), 'anything-coin')
|
|
36
68
|
fail('Promise should have been rejected')
|
|
37
69
|
} catch (e) {
|
|
38
70
|
if (e instanceof AssertionError) {
|
|
@@ -43,31 +75,29 @@ describe('EVM Family', () => {
|
|
|
43
75
|
})
|
|
44
76
|
|
|
45
77
|
it('should return the etherscan api', () => {
|
|
46
|
-
const explorerA = getExplorerApi(configFor('etherscan-coin'),
|
|
47
|
-
|
|
48
|
-
} as any)
|
|
49
|
-
const explorerB = getExplorerApi(configFor('blockscout-coin'), {
|
|
50
|
-
id: 'blockscout-coin',
|
|
51
|
-
} as any)
|
|
78
|
+
const explorerA = getExplorerApi(configFor('etherscan-coin'), 'etherscan-coin')
|
|
79
|
+
const explorerB = getExplorerApi(configFor('blockscout-coin'), 'blockscout-coin')
|
|
52
80
|
|
|
53
81
|
expect(explorerA).toBe(etherscanLikeApi.explorerApi)
|
|
54
82
|
expect(explorerB).toBe(etherscanLikeApi.explorerApi)
|
|
55
83
|
})
|
|
56
84
|
|
|
57
85
|
it('should return the no cache etherscan api', () => {
|
|
58
|
-
const explorerA = getExplorerApi(
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
86
|
+
const explorerA = getExplorerApi(
|
|
87
|
+
configFor('etherscan-coin-no-cache'),
|
|
88
|
+
'etherscan-coin-no-cache'
|
|
89
|
+
)
|
|
90
|
+
const explorerB = getExplorerApi(
|
|
91
|
+
configFor('blockscout-coin-no-cache'),
|
|
92
|
+
'blockscout-coin-no-cache'
|
|
93
|
+
)
|
|
64
94
|
|
|
65
95
|
expect(explorerA).toBe(etherscanLikeApi.explorerApiNoCache)
|
|
66
96
|
expect(explorerB).toBe(etherscanLikeApi.explorerApiNoCache)
|
|
67
97
|
})
|
|
68
98
|
|
|
69
99
|
it('should return the ledger api', () => {
|
|
70
|
-
const explorerA = getExplorerApi(configFor('ledger-coin'),
|
|
100
|
+
const explorerA = getExplorerApi(configFor('ledger-coin'), 'ledger-coin')
|
|
71
101
|
|
|
72
102
|
expect(explorerA).toBe(ledgerExplorerApi)
|
|
73
103
|
})
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
// SPDX-FileCopyrightText: © 2026 LEDGER SAS
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
|
-
import { EvmConfigInfo } from '../../config'
|
|
4
|
+
import type { EvmConfigInfo } from '../../config'
|
|
5
|
+
import type { ExplorerApi } from './types'
|
|
5
6
|
import { UnknownExplorer } from '../../errors'
|
|
6
7
|
import etherscanLikeApi from './etherscan'
|
|
7
8
|
import ledgerExplorerApi from './ledger'
|
|
8
9
|
import noExplorerAPI from './none'
|
|
9
|
-
import { ExplorerApi } from './types'
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Switch to select one of the compatible explorer
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
// SPDX-FileCopyrightText: © 2026 LEDGER SAS
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
|
+
import type { NftStandard } from '../../config'
|
|
4
5
|
import { AssertionError, fail } from 'assert'
|
|
5
6
|
import { delay } from '@ledgerhq/coin-module-framework/promises'
|
|
6
7
|
import axios from 'axios'
|
|
7
8
|
import eip55 from 'eip55'
|
|
8
|
-
import { DEFAULT_LEDGER_EXPLORER_URI, getCoinConfig
|
|
9
|
+
import { DEFAULT_LEDGER_EXPLORER_URI, getCoinConfig } from '../../config'
|
|
9
10
|
import { LedgerExplorerUsedIncorrectly } from '../../errors'
|
|
10
11
|
import {
|
|
11
12
|
coinOperation1,
|
|
@@ -17,7 +18,7 @@ import * as LEDGER_API from './ledger'
|
|
|
17
18
|
|
|
18
19
|
jest.mock('axios')
|
|
19
20
|
jest.mock('@ledgerhq/coin-module-framework/promises')
|
|
20
|
-
|
|
21
|
+
jest.mocked(delay).mockImplementation(
|
|
21
22
|
() => new Promise((resolve) => setTimeout(resolve, 1)) // mocking the delay supposed to happen after each try
|
|
22
23
|
)
|
|
23
24
|
|
|
@@ -54,7 +55,12 @@ describe('EVM Family', () => {
|
|
|
54
55
|
}
|
|
55
56
|
return { data: { data: [] } }
|
|
56
57
|
})
|
|
57
|
-
const response = await LEDGER_API.fetchPaginatedOpsWithRetries(
|
|
58
|
+
const response = await LEDGER_API.fetchPaginatedOpsWithRetries(
|
|
59
|
+
{ explorerId: 'test', address: '0x', fromBlock: 0, batchSize: 10 },
|
|
60
|
+
null,
|
|
61
|
+
[],
|
|
62
|
+
retries
|
|
63
|
+
)
|
|
58
64
|
|
|
59
65
|
expect(response).toEqual([])
|
|
60
66
|
// it should fail 2 times and succeed on the next try
|
|
@@ -73,7 +79,10 @@ describe('EVM Family', () => {
|
|
|
73
79
|
return { data: { data: [] } }
|
|
74
80
|
})
|
|
75
81
|
try {
|
|
76
|
-
await LEDGER_API.fetchPaginatedOpsWithRetries(
|
|
82
|
+
await LEDGER_API.fetchPaginatedOpsWithRetries(
|
|
83
|
+
{ explorerId: 'test', address: '0x', fromBlock: 0, batchSize: 10 },
|
|
84
|
+
null
|
|
85
|
+
)
|
|
77
86
|
fail('Promise should have been rejected')
|
|
78
87
|
} catch (e) {
|
|
79
88
|
if (e instanceof AssertionError) {
|
|
@@ -112,7 +121,10 @@ describe('EVM Family', () => {
|
|
|
112
121
|
}
|
|
113
122
|
})
|
|
114
123
|
|
|
115
|
-
const response = await LEDGER_API.fetchPaginatedOpsWithRetries(
|
|
124
|
+
const response = await LEDGER_API.fetchPaginatedOpsWithRetries(
|
|
125
|
+
{ explorerId: 'test', address: '0x', fromBlock: 0, batchSize: 10 },
|
|
126
|
+
null
|
|
127
|
+
)
|
|
116
128
|
|
|
117
129
|
expect(response).toEqual([coinOperation1, coinOperation2, coinOperation3])
|
|
118
130
|
})
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
// SPDX-FileCopyrightText: © 2026 LEDGER SAS
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
|
+
import type { LedgerExplorerOperation } from '../../types'
|
|
5
|
+
import type { ExplorerApi } from './types'
|
|
4
6
|
import type { MemoNotSupported, Operation } from '@ledgerhq/coin-module-framework/api/types'
|
|
5
7
|
import { delay } from '@ledgerhq/coin-module-framework/promises'
|
|
6
8
|
import axios from 'axios'
|
|
@@ -13,9 +15,8 @@ import {
|
|
|
13
15
|
} from '../../adapters/index'
|
|
14
16
|
import { DEFAULT_LEDGER_EXPLORER_URI } from '../../config'
|
|
15
17
|
import { LedgerExplorerUsedIncorrectly } from '../../errors'
|
|
16
|
-
import { LedgerExplorerOperation } from '../../types'
|
|
17
18
|
import { nftEnabled } from '../../utils'
|
|
18
|
-
import {
|
|
19
|
+
import { isLedgerExplorerConfig, NO_TOKEN } from './types'
|
|
19
20
|
|
|
20
21
|
export const DEFAULT_BATCH_SIZE = 10_000
|
|
21
22
|
export const LEDGER_TIMEOUT = 200 // 200ms between 2 calls
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
// SPDX-FileCopyrightText: © 2026 LEDGER SAS
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
|
-
import { ExplorerApi
|
|
4
|
+
import type { ExplorerApi } from './types'
|
|
5
|
+
import { NO_TOKEN } from './types'
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* Returns all operation types from an address
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// SPDX-FileCopyrightText: © 2026 LEDGER SAS
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
|
+
import type { EvmConfigInfo } from '../../config'
|
|
4
5
|
import type { MemoNotSupported, Operation } from '@ledgerhq/coin-module-framework/api/types'
|
|
5
|
-
import { EvmConfigInfo } from '../../config'
|
|
6
6
|
|
|
7
7
|
/** Constant representing no pagination token (end of pagination or first page) */
|
|
8
8
|
export const NO_TOKEN = ''
|
|
@@ -1,18 +1,24 @@
|
|
|
1
1
|
// SPDX-FileCopyrightText: © 2026 LEDGER SAS
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
createMockEvmConfigInfo,
|
|
6
|
+
mkLedgerGasTracker,
|
|
7
|
+
mkLedgerNode,
|
|
8
|
+
} from '../../fixtures/context.fixtures'
|
|
5
9
|
import { getGasOptions as ledgerGetGasOptions } from './ledger'
|
|
6
10
|
import { getGasTracker } from './index'
|
|
7
11
|
|
|
8
|
-
const configWithGasTracker = {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
+
const configWithGasTracker = createMockEvmConfigInfo({
|
|
13
|
+
chainId: 1,
|
|
14
|
+
node: mkLedgerNode({ explorerId: 'eth' }),
|
|
15
|
+
gasTracker: mkLedgerGasTracker({ explorerId: 'eth' }),
|
|
16
|
+
})
|
|
12
17
|
|
|
13
|
-
const configWithoutGasTracker = {
|
|
14
|
-
|
|
15
|
-
|
|
18
|
+
const configWithoutGasTracker = createMockEvmConfigInfo({
|
|
19
|
+
chainId: 1,
|
|
20
|
+
node: mkLedgerNode({ explorerId: 'eth' }),
|
|
21
|
+
})
|
|
16
22
|
|
|
17
23
|
describe('EVM Family', () => {
|
|
18
24
|
describe('network/gasTracker/index.ts', () => {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// SPDX-FileCopyrightText: © 2026 LEDGER SAS
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
|
-
import { EvmConfigInfo } from '../../config'
|
|
4
|
+
import type { EvmConfigInfo } from '../../config'
|
|
5
|
+
import type { GasTrackerApi } from './types'
|
|
5
6
|
import ledgerGasTracker from './ledger'
|
|
6
|
-
import { GasTrackerApi } from './types'
|
|
7
7
|
|
|
8
8
|
export const getGasTracker = (config: EvmConfigInfo): GasTrackerApi | null => {
|
|
9
9
|
switch (config?.gasTracker?.type) {
|
|
@@ -1,24 +1,28 @@
|
|
|
1
1
|
// SPDX-FileCopyrightText: © 2026 LEDGER SAS
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
|
+
import type { GasOptions } from '../../types'
|
|
4
5
|
import { AssertionError } from 'assert'
|
|
5
6
|
import network from '@ledgerhq/live-network/network'
|
|
6
7
|
import BigNumber from 'bignumber.js'
|
|
7
|
-
import { EvmConfigInfo } from '../../config'
|
|
8
8
|
import { LedgerGasTrackerUsedIncorrectly, NoGasTrackerFound } from '../../errors'
|
|
9
|
-
import {
|
|
9
|
+
import {
|
|
10
|
+
createMockEvmConfigInfo,
|
|
11
|
+
mkExternalNode,
|
|
12
|
+
mkLedgerGasTracker,
|
|
13
|
+
mkLedgerNode,
|
|
14
|
+
} from '../../fixtures/context.fixtures'
|
|
10
15
|
import { getGasOptions } from './ledger'
|
|
11
16
|
|
|
12
17
|
jest.mock('@ledgerhq/live-network/network')
|
|
13
18
|
const mockedNetwork = jest.mocked(network)
|
|
14
19
|
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
} as unknown as EvmConfigInfo
|
|
20
|
+
const ledgerGasTrackerConfig = createMockEvmConfigInfo({
|
|
21
|
+
chainId: 1,
|
|
22
|
+
node: mkLedgerNode({ explorerId: 'eth' }),
|
|
23
|
+
gasTracker: mkLedgerGasTracker({ explorerId: 'eth' }),
|
|
24
|
+
eip1559BaseFeeMultiplier: 2,
|
|
25
|
+
})
|
|
22
26
|
|
|
23
27
|
describe('EVM Family', () => {
|
|
24
28
|
describe('network/gasTracker/index.ts', () => {
|
|
@@ -96,12 +100,10 @@ describe('EVM Family', () => {
|
|
|
96
100
|
},
|
|
97
101
|
})
|
|
98
102
|
|
|
99
|
-
Object.
|
|
103
|
+
Object.values(gasOptions).forEach((value) => {
|
|
100
104
|
const { maxFeePerGas } = value
|
|
101
105
|
|
|
102
|
-
expect(maxFeePerGas?.isInteger()
|
|
103
|
-
true
|
|
104
|
-
)
|
|
106
|
+
expect(maxFeePerGas?.isInteger()).toBe(true)
|
|
105
107
|
})
|
|
106
108
|
})
|
|
107
109
|
|
|
@@ -129,24 +131,19 @@ describe('EVM Family', () => {
|
|
|
129
131
|
},
|
|
130
132
|
})
|
|
131
133
|
|
|
132
|
-
Object.
|
|
134
|
+
Object.values(gasOptions).forEach((value) => {
|
|
133
135
|
const { maxFeePerGas, maxPriorityFeePerGas, nextBaseFee } = value
|
|
134
136
|
|
|
135
|
-
expect(maxFeePerGas?.isInteger()
|
|
136
|
-
|
|
137
|
-
)
|
|
138
|
-
expect(
|
|
139
|
-
maxPriorityFeePerGas?.isInteger(),
|
|
140
|
-
`${key}:maxPriorityFeePerGas - got ${maxPriorityFeePerGas}`
|
|
141
|
-
).toBe(true)
|
|
142
|
-
expect(nextBaseFee?.isInteger(), `${key}:nextBaseFee - got ${nextBaseFee}`).toBe(true)
|
|
137
|
+
expect(maxFeePerGas?.isInteger()).toBe(true)
|
|
138
|
+
expect(maxPriorityFeePerGas?.isInteger()).toBe(true)
|
|
139
|
+
expect(nextBaseFee?.isInteger()).toBe(true)
|
|
143
140
|
})
|
|
144
141
|
})
|
|
145
142
|
|
|
146
143
|
it('should use overrideGasTracker', async () => {
|
|
147
144
|
await getGasOptions({
|
|
148
145
|
currencyId: 'ethereum',
|
|
149
|
-
config: {
|
|
146
|
+
config: createMockEvmConfigInfo({ chainId: 1, node: mkExternalNode() }),
|
|
150
147
|
options: {
|
|
151
148
|
useEIP1559: true,
|
|
152
149
|
overrideGasTracker: { type: 'ledger', explorerId: 'eth_sepolia' },
|
|
@@ -197,7 +194,11 @@ describe('EVM Family', () => {
|
|
|
197
194
|
it('should return legacy gas options when EIP-1559 not supported by gas tracker', async () => {
|
|
198
195
|
const gasOptions: GasOptions = await getGasOptions({
|
|
199
196
|
currencyId: 'ethereum_classic',
|
|
200
|
-
config: {
|
|
197
|
+
config: createMockEvmConfigInfo({
|
|
198
|
+
chainId: 1,
|
|
199
|
+
node: mkExternalNode(),
|
|
200
|
+
gasTracker: mkLedgerGasTracker({ explorerId: 'etc' }),
|
|
201
|
+
}),
|
|
201
202
|
options: { useEIP1559: true },
|
|
202
203
|
})
|
|
203
204
|
|
|
@@ -249,17 +250,17 @@ describe('EVM Family', () => {
|
|
|
249
250
|
},
|
|
250
251
|
})
|
|
251
252
|
|
|
252
|
-
Object.
|
|
253
|
+
Object.values(gasOptions).forEach((value) => {
|
|
253
254
|
const { gasPrice } = value
|
|
254
255
|
|
|
255
|
-
expect(gasPrice?.isInteger()
|
|
256
|
+
expect(gasPrice?.isInteger()).toBe(true)
|
|
256
257
|
})
|
|
257
258
|
})
|
|
258
259
|
|
|
259
260
|
it('should use overrideGasTracker', async () => {
|
|
260
261
|
await getGasOptions({
|
|
261
262
|
currencyId: 'ethereum',
|
|
262
|
-
config: {
|
|
263
|
+
config: createMockEvmConfigInfo({ chainId: 1, node: mkExternalNode() }),
|
|
263
264
|
options: {
|
|
264
265
|
useEIP1559: false,
|
|
265
266
|
overrideGasTracker: { type: 'ledger', explorerId: 'eth_sepolia' },
|
|
@@ -277,7 +278,7 @@ describe('EVM Family', () => {
|
|
|
277
278
|
try {
|
|
278
279
|
await getGasOptions({
|
|
279
280
|
currencyId: 'ethereum',
|
|
280
|
-
config: {
|
|
281
|
+
config: createMockEvmConfigInfo({ chainId: 1, node: mkExternalNode() }),
|
|
281
282
|
})
|
|
282
283
|
fail('Promise should have been rejected')
|
|
283
284
|
} catch (e) {
|
|
@@ -292,7 +293,11 @@ describe('EVM Family', () => {
|
|
|
292
293
|
try {
|
|
293
294
|
await getGasOptions({
|
|
294
295
|
currencyId: 'ethereum',
|
|
295
|
-
config: {
|
|
296
|
+
config: createMockEvmConfigInfo({
|
|
297
|
+
chainId: 1,
|
|
298
|
+
node: mkExternalNode(),
|
|
299
|
+
gasTracker: mkLedgerGasTracker({ explorerId: 'anything' }),
|
|
300
|
+
}),
|
|
296
301
|
})
|
|
297
302
|
fail('Promise should have been rejected')
|
|
298
303
|
} catch (e) {
|
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
// SPDX-FileCopyrightText: © 2026 LEDGER SAS
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
|
+
import type { EvmConfigInfo } from '../../config'
|
|
5
|
+
import type { GasOptions } from '../../types'
|
|
6
|
+
import type { GasTrackerApi } from './types'
|
|
4
7
|
import network from '@ledgerhq/live-network/network'
|
|
5
8
|
import { BigNumber } from 'bignumber.js'
|
|
6
|
-
import {
|
|
7
|
-
DEFAULT_EIP1559_BASE_FEE_MULTIPLIER,
|
|
8
|
-
DEFAULT_LEDGER_EXPLORER_URI,
|
|
9
|
-
EvmConfigInfo,
|
|
10
|
-
} from '../../config'
|
|
9
|
+
import { DEFAULT_EIP1559_BASE_FEE_MULTIPLIER, DEFAULT_LEDGER_EXPLORER_URI } from '../../config'
|
|
11
10
|
import { LedgerGasTrackerUsedIncorrectly, NoGasTrackerFound } from '../../errors'
|
|
12
|
-
import {
|
|
13
|
-
import { GasTrackerApi, isLedgerGasTracker } from './types'
|
|
11
|
+
import { isLedgerGasTracker } from './types'
|
|
14
12
|
|
|
15
13
|
type GasTracker = {
|
|
16
14
|
compatibilty: {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// SPDX-FileCopyrightText: © 2026 LEDGER SAS
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
|
-
import { EvmConfigInfo } from '../../config'
|
|
5
|
-
import { GasOptions } from '../../types'
|
|
4
|
+
import type { EvmConfigInfo } from '../../config'
|
|
5
|
+
import type { GasOptions } from '../../types'
|
|
6
6
|
|
|
7
7
|
export type GasTrackerApi = {
|
|
8
8
|
getGasOptions: ({
|
|
@@ -1,57 +1,51 @@
|
|
|
1
1
|
// SPDX-FileCopyrightText: © 2026 LEDGER SAS
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
|
-
import {
|
|
4
|
+
import { createMockEvmConfigInfo, mkExternalNode } from '../../fixtures/context.fixtures'
|
|
5
5
|
import { getNodeApi } from './index'
|
|
6
6
|
|
|
7
|
-
const externalNodeConfig = (): EvmConfigInfo =>
|
|
8
|
-
({ node: { type: 'external', uri: 'working' } }) as unknown as EvmConfigInfo
|
|
9
|
-
|
|
10
7
|
describe('getNodeApi memoization', () => {
|
|
11
8
|
it('should return the same NodeApi instance for same currency and retries (memoization)', () => {
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
expect(node1).toBe(node2)
|
|
9
|
+
const config = createMockEvmConfigInfo({ chainId: 1, node: mkExternalNode() })
|
|
10
|
+
expect(getNodeApi(config, 'ethereum')).toBe(getNodeApi(config, 'ethereum'))
|
|
16
11
|
})
|
|
17
12
|
|
|
18
13
|
it('should return cached NodeApi on subsequent calls (createNodeApi called once)', () => {
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
-
const third = getNodeApi(externalNodeConfig(), 'cached_value_test')
|
|
14
|
+
const config = createMockEvmConfigInfo({ chainId: 1, node: mkExternalNode() })
|
|
15
|
+
const cachedInstance = getNodeApi(config, 'cached_value_test')
|
|
22
16
|
|
|
23
|
-
expect(
|
|
24
|
-
expect(
|
|
17
|
+
expect(getNodeApi(config, 'cached_value_test')).toBe(cachedInstance)
|
|
18
|
+
expect(getNodeApi(config, 'cached_value_test')).toBe(cachedInstance)
|
|
25
19
|
})
|
|
26
20
|
|
|
27
|
-
function generateConfig(node: { type: string; uri: string; retries: number }): EvmConfigInfo {
|
|
28
|
-
return { node } as unknown as EvmConfigInfo
|
|
29
|
-
}
|
|
30
21
|
it('should return different NodeApi instances for different retries', () => {
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
const node2 = getNodeApi(
|
|
22
|
+
const node1 = getNodeApi(
|
|
23
|
+
createMockEvmConfigInfo({ chainId: 1, node: mkExternalNode({ uri: 'u', retries: 2 }) }),
|
|
24
|
+
'ethereum'
|
|
25
|
+
)
|
|
26
|
+
const node2 = getNodeApi(
|
|
27
|
+
createMockEvmConfigInfo({ chainId: 1, node: mkExternalNode({ uri: 'u', retries: 5 }) }),
|
|
28
|
+
'ethereum'
|
|
29
|
+
)
|
|
36
30
|
expect(node1).not.toBe(node2)
|
|
37
31
|
})
|
|
38
32
|
|
|
39
33
|
it('should return different NodeApi instances for different uris', () => {
|
|
40
|
-
const
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
const node2 = getNodeApi(
|
|
34
|
+
const node1 = getNodeApi(
|
|
35
|
+
createMockEvmConfigInfo({ chainId: 1, node: mkExternalNode({ uri: 'u1' }) }),
|
|
36
|
+
'ethereum'
|
|
37
|
+
)
|
|
38
|
+
const node2 = getNodeApi(
|
|
39
|
+
createMockEvmConfigInfo({ chainId: 1, node: mkExternalNode({ uri: 'u2' }) }),
|
|
40
|
+
'ethereum'
|
|
41
|
+
)
|
|
45
42
|
|
|
46
43
|
expect(node1).not.toBe(node2)
|
|
47
44
|
})
|
|
48
45
|
|
|
49
46
|
it('should return different NodeApi instances for different currencies', () => {
|
|
50
|
-
const conf =
|
|
51
|
-
|
|
52
|
-
const node1 = getNodeApi(conf, 'ethereum1')
|
|
53
|
-
const node2 = getNodeApi(conf, 'ethereum2')
|
|
47
|
+
const conf = createMockEvmConfigInfo({ chainId: 1, node: mkExternalNode({ uri: 'u1' }) })
|
|
54
48
|
|
|
55
|
-
expect(
|
|
49
|
+
expect(getNodeApi(conf, 'ethereum1')).not.toBe(getNodeApi(conf, 'ethereum2'))
|
|
56
50
|
})
|
|
57
51
|
})
|
|
@@ -1,36 +1,27 @@
|
|
|
1
1
|
// SPDX-FileCopyrightText: © 2026 LEDGER SAS
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
|
-
import { AssertionError, fail } from 'assert'
|
|
5
4
|
import { UnknownNode } from '../../errors'
|
|
5
|
+
import {
|
|
6
|
+
createMockEvmConfigInfo,
|
|
7
|
+
mkExternalNode,
|
|
8
|
+
mkLedgerNode,
|
|
9
|
+
} from '../../fixtures/context.fixtures'
|
|
6
10
|
import { getNodeApi } from './index'
|
|
7
11
|
|
|
8
12
|
describe('EVM Family', () => {
|
|
9
13
|
describe('network/node/index.ts', () => {
|
|
10
14
|
describe('getNodeApi', () => {
|
|
11
|
-
it('should throw when requesting a non existing node type',
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
node: { type: 'anything', uri: 'notworking' },
|
|
16
|
-
} as any,
|
|
17
|
-
{ id: 'not-existing' } as any
|
|
18
|
-
)
|
|
19
|
-
fail('Promise should have been rejected')
|
|
20
|
-
} catch (e) {
|
|
21
|
-
if (e instanceof AssertionError) {
|
|
22
|
-
throw e
|
|
23
|
-
}
|
|
24
|
-
expect(e).toBeInstanceOf(UnknownNode)
|
|
25
|
-
}
|
|
15
|
+
it('should throw when requesting a non existing node type', () => {
|
|
16
|
+
const config = createMockEvmConfigInfo({ chainId: 1, node: mkExternalNode() })
|
|
17
|
+
Object.assign(config, { node: { type: 'anything', uri: 'notworking' } })
|
|
18
|
+
expect(() => getNodeApi(config, 'not-existing')).toThrow(UnknownNode)
|
|
26
19
|
})
|
|
27
20
|
|
|
28
|
-
it('should return the rpc api',
|
|
21
|
+
it('should return the rpc api', () => {
|
|
29
22
|
const node = getNodeApi(
|
|
30
|
-
{
|
|
31
|
-
|
|
32
|
-
} as any,
|
|
33
|
-
{ id: 'external' } as any
|
|
23
|
+
createMockEvmConfigInfo({ chainId: 1, node: mkExternalNode({ uri: 'working' }) }),
|
|
24
|
+
'external'
|
|
34
25
|
)
|
|
35
26
|
|
|
36
27
|
expect(node).toEqual(
|
|
@@ -50,10 +41,8 @@ describe('EVM Family', () => {
|
|
|
50
41
|
|
|
51
42
|
it('should return the ledger api', () => {
|
|
52
43
|
const node = getNodeApi(
|
|
53
|
-
{
|
|
54
|
-
|
|
55
|
-
} as any,
|
|
56
|
-
{ id: 'ledger-supported' } as any
|
|
44
|
+
createMockEvmConfigInfo({ chainId: 1, node: mkLedgerNode({ explorerId: 'eth' }) }),
|
|
45
|
+
'ledger-supported'
|
|
57
46
|
)
|
|
58
47
|
|
|
59
48
|
expect(node).toEqual(
|