@ledgerhq/coin-evm 2.28.0-nightly.3 → 2.28.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/.eslintrc.js +0 -1
- package/.turbo/turbo-build.log +1 -1
- package/CHANGELOG.md +20 -32
- package/{lib-es/__fixtures__/ethereum-erc20-weth.json → lib/__fixtures__/ethereum-erc20-usd_tether__erc20_.json} +8 -8
- package/lib/__fixtures__/{optimism-erc20-usd_coin.json → scroll_sepolia-erc20-new_token_mock.json} +20 -21
- package/lib/__tests__/fixtures/accounts.fixtures.d.ts +1 -1
- package/lib/__tests__/fixtures/accounts.fixtures.d.ts.map +1 -1
- package/lib/__tests__/fixtures/accounts.fixtures.js +19 -2
- package/lib/__tests__/fixtures/accounts.fixtures.js.map +1 -1
- package/lib/__tests__/fixtures/common.fixtures.d.ts +0 -1
- package/lib/__tests__/fixtures/common.fixtures.d.ts.map +1 -1
- package/lib/__tests__/fixtures/common.fixtures.js +0 -1
- package/lib/__tests__/fixtures/common.fixtures.js.map +1 -1
- package/lib/__tests__/fixtures/prepareTransaction.fixtures.d.ts.map +1 -1
- package/lib/__tests__/fixtures/prepareTransaction.fixtures.js +2 -3
- package/lib/__tests__/fixtures/prepareTransaction.fixtures.js.map +1 -1
- package/lib/__tests__/fixtures/synchronization.fixtures.d.ts +1 -1
- package/lib/__tests__/fixtures/synchronization.fixtures.d.ts.map +1 -1
- package/lib/__tests__/fixtures/synchronization.fixtures.js +18 -3
- package/lib/__tests__/fixtures/synchronization.fixtures.js.map +1 -1
- package/lib/__tests__/fixtures/transaction.fixtures.d.ts +2 -2
- package/lib/__tests__/fixtures/transaction.fixtures.d.ts.map +1 -1
- package/lib/__tests__/fixtures/transaction.fixtures.js +2 -3
- package/lib/__tests__/fixtures/transaction.fixtures.js.map +1 -1
- package/lib/__tests__/unit/accounts.unit.test.js +27 -0
- package/lib/__tests__/unit/accounts.unit.test.js.map +1 -1
- package/lib/__tests__/unit/adapters/etherscan.unit.test.js +7 -72
- package/lib/__tests__/unit/adapters/etherscan.unit.test.js.map +1 -1
- package/lib/__tests__/unit/adapters/ledger.unit.test.js +2 -15
- package/lib/__tests__/unit/adapters/ledger.unit.test.js.map +1 -1
- package/lib/__tests__/unit/api/explorer/etherscan.unit.test.js +0 -8
- package/lib/__tests__/unit/api/explorer/etherscan.unit.test.js.map +1 -1
- package/lib/__tests__/unit/api/explorer/ledger.unit.test.js +0 -12
- package/lib/__tests__/unit/api/explorer/ledger.unit.test.js.map +1 -1
- package/lib/__tests__/unit/broadcast.unit.test.js +1 -3
- package/lib/__tests__/unit/broadcast.unit.test.js.map +1 -1
- package/lib/__tests__/unit/buildOptimisticOperation.unit.test.js +1 -3
- package/lib/__tests__/unit/buildOptimisticOperation.unit.test.js.map +1 -1
- package/lib/__tests__/unit/deviceTransactionConfig.unit.test.d.ts +1 -1
- package/lib/__tests__/unit/deviceTransactionConfig.unit.test.d.ts.map +1 -1
- package/lib/__tests__/unit/deviceTransactionConfig.unit.test.js +0 -1
- package/lib/__tests__/unit/deviceTransactionConfig.unit.test.js.map +1 -1
- package/lib/__tests__/unit/estimateMaxSpendable.unit.test.js +1 -3
- package/lib/__tests__/unit/estimateMaxSpendable.unit.test.js.map +1 -1
- package/lib/__tests__/unit/getTransactionStatus.unit.test.js +1 -3
- package/lib/__tests__/unit/getTransactionStatus.unit.test.js.map +1 -1
- package/lib/__tests__/unit/logic.unit.test.js +18 -22
- package/lib/__tests__/unit/logic.unit.test.js.map +1 -1
- package/lib/__tests__/unit/operation.test.js +2 -6
- package/lib/__tests__/unit/operation.test.js.map +1 -1
- package/lib/__tests__/unit/prepareTransaction.unit.test.js +17 -4
- package/lib/__tests__/unit/prepareTransaction.unit.test.js.map +1 -1
- package/lib/adapters/etherscan.d.ts.map +1 -1
- package/lib/adapters/etherscan.js +2 -2
- package/lib/adapters/etherscan.js.map +1 -1
- package/lib/adapters/ledger.d.ts.map +1 -1
- package/lib/adapters/ledger.js +2 -2
- package/lib/adapters/ledger.js.map +1 -1
- package/lib/api/index.d.ts.map +1 -1
- package/lib/api/index.js +4 -2
- package/lib/api/index.js.map +1 -1
- package/lib/bridge/js.d.ts +1 -2
- package/lib/bridge/js.d.ts.map +1 -1
- package/lib/bridge/js.js +1 -3
- package/lib/bridge/js.js.map +1 -1
- package/lib/bridge/preload.d.ts +0 -1
- package/lib/bridge/preload.d.ts.map +1 -1
- package/lib/bridge/preload.js +1 -10
- package/lib/bridge/preload.js.map +1 -1
- package/lib/deviceTransactionConfig.d.ts.map +1 -1
- package/lib/deviceTransactionConfig.js +2 -2
- package/lib/deviceTransactionConfig.js.map +1 -1
- package/lib/logic/common.d.ts +0 -18
- package/lib/logic/common.d.ts.map +1 -1
- package/lib/logic/common.js +1 -35
- package/lib/logic/common.js.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 +12 -25
- package/lib/logic/estimateFees.js.map +1 -1
- package/lib/logic/estimateFees.test.js +41 -93
- package/lib/logic/estimateFees.test.js.map +1 -1
- package/lib/logic/index.d.ts +0 -1
- package/lib/logic/index.d.ts.map +1 -1
- package/lib/logic/index.js +0 -1
- package/lib/logic/index.js.map +1 -1
- package/lib/types/transaction.d.ts +0 -9
- package/lib/types/transaction.d.ts.map +1 -1
- package/{lib/__fixtures__/ethereum-erc20-weth.json → lib-es/__fixtures__/ethereum-erc20-usd_tether__erc20_.json} +8 -8
- package/lib-es/__fixtures__/{optimism-erc20-usd_coin.json → scroll_sepolia-erc20-new_token_mock.json} +20 -21
- package/lib-es/__tests__/fixtures/accounts.fixtures.d.ts +1 -1
- package/lib-es/__tests__/fixtures/accounts.fixtures.d.ts.map +1 -1
- package/lib-es/__tests__/fixtures/accounts.fixtures.js +18 -1
- package/lib-es/__tests__/fixtures/accounts.fixtures.js.map +1 -1
- package/lib-es/__tests__/fixtures/common.fixtures.d.ts +0 -1
- package/lib-es/__tests__/fixtures/common.fixtures.d.ts.map +1 -1
- package/lib-es/__tests__/fixtures/common.fixtures.js +0 -1
- package/lib-es/__tests__/fixtures/common.fixtures.js.map +1 -1
- package/lib-es/__tests__/fixtures/prepareTransaction.fixtures.d.ts.map +1 -1
- package/lib-es/__tests__/fixtures/prepareTransaction.fixtures.js +2 -3
- package/lib-es/__tests__/fixtures/prepareTransaction.fixtures.js.map +1 -1
- package/lib-es/__tests__/fixtures/synchronization.fixtures.d.ts +1 -1
- package/lib-es/__tests__/fixtures/synchronization.fixtures.d.ts.map +1 -1
- package/lib-es/__tests__/fixtures/synchronization.fixtures.js +18 -3
- package/lib-es/__tests__/fixtures/synchronization.fixtures.js.map +1 -1
- package/lib-es/__tests__/fixtures/transaction.fixtures.d.ts +2 -2
- package/lib-es/__tests__/fixtures/transaction.fixtures.d.ts.map +1 -1
- package/lib-es/__tests__/fixtures/transaction.fixtures.js +2 -3
- package/lib-es/__tests__/fixtures/transaction.fixtures.js.map +1 -1
- package/lib-es/__tests__/unit/accounts.unit.test.js +27 -0
- package/lib-es/__tests__/unit/accounts.unit.test.js.map +1 -1
- package/lib-es/__tests__/unit/adapters/etherscan.unit.test.js +7 -72
- package/lib-es/__tests__/unit/adapters/etherscan.unit.test.js.map +1 -1
- package/lib-es/__tests__/unit/adapters/ledger.unit.test.js +2 -15
- package/lib-es/__tests__/unit/adapters/ledger.unit.test.js.map +1 -1
- package/lib-es/__tests__/unit/api/explorer/etherscan.unit.test.js +0 -8
- package/lib-es/__tests__/unit/api/explorer/etherscan.unit.test.js.map +1 -1
- package/lib-es/__tests__/unit/api/explorer/ledger.unit.test.js +0 -12
- package/lib-es/__tests__/unit/api/explorer/ledger.unit.test.js.map +1 -1
- package/lib-es/__tests__/unit/broadcast.unit.test.js +2 -4
- package/lib-es/__tests__/unit/broadcast.unit.test.js.map +1 -1
- package/lib-es/__tests__/unit/buildOptimisticOperation.unit.test.js +2 -4
- package/lib-es/__tests__/unit/buildOptimisticOperation.unit.test.js.map +1 -1
- package/lib-es/__tests__/unit/deviceTransactionConfig.unit.test.d.ts +1 -1
- package/lib-es/__tests__/unit/deviceTransactionConfig.unit.test.d.ts.map +1 -1
- package/lib-es/__tests__/unit/deviceTransactionConfig.unit.test.js +0 -1
- package/lib-es/__tests__/unit/deviceTransactionConfig.unit.test.js.map +1 -1
- package/lib-es/__tests__/unit/estimateMaxSpendable.unit.test.js +2 -4
- package/lib-es/__tests__/unit/estimateMaxSpendable.unit.test.js.map +1 -1
- package/lib-es/__tests__/unit/getTransactionStatus.unit.test.js +2 -4
- package/lib-es/__tests__/unit/getTransactionStatus.unit.test.js.map +1 -1
- package/lib-es/__tests__/unit/logic.unit.test.js +19 -23
- package/lib-es/__tests__/unit/logic.unit.test.js.map +1 -1
- package/lib-es/__tests__/unit/operation.test.js +3 -7
- package/lib-es/__tests__/unit/operation.test.js.map +1 -1
- package/lib-es/__tests__/unit/prepareTransaction.unit.test.js +17 -4
- package/lib-es/__tests__/unit/prepareTransaction.unit.test.js.map +1 -1
- package/lib-es/adapters/etherscan.d.ts.map +1 -1
- package/lib-es/adapters/etherscan.js +2 -2
- package/lib-es/adapters/etherscan.js.map +1 -1
- package/lib-es/adapters/ledger.d.ts.map +1 -1
- package/lib-es/adapters/ledger.js +2 -2
- package/lib-es/adapters/ledger.js.map +1 -1
- package/lib-es/api/index.d.ts.map +1 -1
- package/lib-es/api/index.js +5 -3
- package/lib-es/api/index.js.map +1 -1
- package/lib-es/bridge/js.d.ts +1 -2
- package/lib-es/bridge/js.d.ts.map +1 -1
- package/lib-es/bridge/js.js +1 -3
- package/lib-es/bridge/js.js.map +1 -1
- package/lib-es/bridge/preload.d.ts +0 -1
- package/lib-es/bridge/preload.d.ts.map +1 -1
- package/lib-es/bridge/preload.js +0 -8
- package/lib-es/bridge/preload.js.map +1 -1
- package/lib-es/deviceTransactionConfig.d.ts.map +1 -1
- package/lib-es/deviceTransactionConfig.js +2 -2
- package/lib-es/deviceTransactionConfig.js.map +1 -1
- package/lib-es/logic/common.d.ts +0 -18
- package/lib-es/logic/common.d.ts.map +1 -1
- package/lib-es/logic/common.js +0 -30
- package/lib-es/logic/common.js.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 +12 -25
- package/lib-es/logic/estimateFees.js.map +1 -1
- package/lib-es/logic/estimateFees.test.js +41 -93
- package/lib-es/logic/estimateFees.test.js.map +1 -1
- package/lib-es/logic/index.d.ts +0 -1
- package/lib-es/logic/index.d.ts.map +1 -1
- package/lib-es/logic/index.js +0 -1
- package/lib-es/logic/index.js.map +1 -1
- package/lib-es/types/transaction.d.ts +0 -9
- package/lib-es/types/transaction.d.ts.map +1 -1
- package/package.json +13 -13
- package/src/__tests__/fixtures/accounts.fixtures.ts +23 -1
- package/src/__tests__/fixtures/common.fixtures.ts +0 -1
- package/src/__tests__/fixtures/prepareTransaction.fixtures.ts +4 -4
- package/src/__tests__/fixtures/synchronization.fixtures.ts +20 -3
- package/src/__tests__/fixtures/transaction.fixtures.ts +3 -4
- package/src/__tests__/unit/accounts.unit.test.ts +36 -0
- package/src/__tests__/unit/adapters/etherscan.unit.test.ts +7 -87
- package/src/__tests__/unit/adapters/ledger.unit.test.ts +2 -20
- package/src/__tests__/unit/api/explorer/etherscan.unit.test.ts +0 -12
- package/src/__tests__/unit/api/explorer/ledger.unit.test.ts +0 -16
- package/src/__tests__/unit/broadcast.unit.test.ts +3 -5
- package/src/__tests__/unit/buildOptimisticOperation.unit.test.ts +2 -5
- package/src/__tests__/unit/deviceTransactionConfig.unit.test.ts +0 -1
- package/src/__tests__/unit/estimateMaxSpendable.unit.test.ts +3 -5
- package/src/__tests__/unit/getTransactionStatus.unit.test.ts +2 -5
- package/src/__tests__/unit/logic.unit.test.ts +29 -41
- package/src/__tests__/unit/operation.test.ts +5 -9
- package/src/__tests__/unit/prepareTransaction.unit.test.ts +18 -4
- package/src/adapters/etherscan.ts +2 -5
- package/src/adapters/ledger.ts +2 -5
- package/src/api/index.ts +5 -4
- package/src/bridge/js.ts +0 -4
- package/src/bridge/preload.ts +0 -8
- package/src/deviceTransactionConfig.ts +2 -3
- package/src/logic/common.ts +0 -52
- package/src/logic/estimateFees.test.ts +57 -98
- package/src/logic/estimateFees.ts +18 -28
- package/src/logic/index.ts +0 -1
- package/src/types/transaction.ts +0 -12
- package/lib/__fixtures__/cardano-native-8654e8b350e298c80d2451beb5ed80fc9eee9f38ce6b039fb8706bc34c4f4253544552.json +0 -52
- package/lib/__fixtures__/ethereum-erc20-usd__coin-0x02b972f304dc24c9bc362e6435c4ad654241f9af916689a4790145c9bcbdf4cf-IN-i0.json +0 -20
- package/lib/__fixtures__/ethereum-erc20-usd__coin-0x02b972f304dc24c9bc362e6435c4ad654241f9af916689a4790145c9bcbdf4cf-OUT-i0.json +0 -19
- package/lib/__tests__/fixtures/cryptoAssetsStore.fixtures.d.ts +0 -2
- package/lib/__tests__/fixtures/cryptoAssetsStore.fixtures.d.ts.map +0 -1
- package/lib/__tests__/fixtures/cryptoAssetsStore.fixtures.js +0 -44
- package/lib/__tests__/fixtures/cryptoAssetsStore.fixtures.js.map +0 -1
- package/lib/cryptoAssetsStore.d.ts +0 -5
- package/lib/cryptoAssetsStore.d.ts.map +0 -1
- package/lib/cryptoAssetsStore.js +0 -17
- package/lib/cryptoAssetsStore.js.map +0 -1
- package/lib/cryptoAssetsStore.test.d.ts +0 -2
- package/lib/cryptoAssetsStore.test.d.ts.map +0 -1
- package/lib/cryptoAssetsStore.test.js +0 -15
- package/lib/cryptoAssetsStore.test.js.map +0 -1
- package/lib/logic/validateIntent.d.ts +0 -4
- package/lib/logic/validateIntent.d.ts.map +0 -1
- package/lib/logic/validateIntent.js +0 -192
- package/lib/logic/validateIntent.js.map +0 -1
- package/lib/logic/validateIntent.test.d.ts +0 -2
- package/lib/logic/validateIntent.test.d.ts.map +0 -1
- package/lib/logic/validateIntent.test.js +0 -485
- package/lib/logic/validateIntent.test.js.map +0 -1
- package/lib-es/__fixtures__/cardano-native-8654e8b350e298c80d2451beb5ed80fc9eee9f38ce6b039fb8706bc34c4f4253544552.json +0 -52
- package/lib-es/__fixtures__/ethereum-erc20-usd__coin-0x02b972f304dc24c9bc362e6435c4ad654241f9af916689a4790145c9bcbdf4cf-IN-i0.json +0 -20
- package/lib-es/__fixtures__/ethereum-erc20-usd__coin-0x02b972f304dc24c9bc362e6435c4ad654241f9af916689a4790145c9bcbdf4cf-OUT-i0.json +0 -19
- package/lib-es/__tests__/fixtures/cryptoAssetsStore.fixtures.d.ts +0 -2
- package/lib-es/__tests__/fixtures/cryptoAssetsStore.fixtures.d.ts.map +0 -1
- package/lib-es/__tests__/fixtures/cryptoAssetsStore.fixtures.js +0 -19
- package/lib-es/__tests__/fixtures/cryptoAssetsStore.fixtures.js.map +0 -1
- package/lib-es/cryptoAssetsStore.d.ts +0 -5
- package/lib-es/cryptoAssetsStore.d.ts.map +0 -1
- package/lib-es/cryptoAssetsStore.js +0 -12
- package/lib-es/cryptoAssetsStore.js.map +0 -1
- package/lib-es/cryptoAssetsStore.test.d.ts +0 -2
- package/lib-es/cryptoAssetsStore.test.d.ts.map +0 -1
- package/lib-es/cryptoAssetsStore.test.js +0 -13
- package/lib-es/cryptoAssetsStore.test.js.map +0 -1
- package/lib-es/logic/validateIntent.d.ts +0 -4
- package/lib-es/logic/validateIntent.d.ts.map +0 -1
- package/lib-es/logic/validateIntent.js +0 -185
- package/lib-es/logic/validateIntent.js.map +0 -1
- package/lib-es/logic/validateIntent.test.d.ts +0 -2
- package/lib-es/logic/validateIntent.test.d.ts.map +0 -1
- package/lib-es/logic/validateIntent.test.js +0 -480
- package/lib-es/logic/validateIntent.test.js.map +0 -1
- package/src/__fixtures__/cardano-native-8654e8b350e298c80d2451beb5ed80fc9eee9f38ce6b039fb8706bc34c4f4253544552.json +0 -52
- package/src/__fixtures__/ethereum-erc20-usd__coin-0x02b972f304dc24c9bc362e6435c4ad654241f9af916689a4790145c9bcbdf4cf-IN-i0.json +0 -20
- package/src/__fixtures__/ethereum-erc20-usd__coin-0x02b972f304dc24c9bc362e6435c4ad654241f9af916689a4790145c9bcbdf4cf-OUT-i0.json +0 -19
- package/src/__fixtures__/ethereum-erc20-usd__coin-0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48.json +0 -73
- package/src/__fixtures__/ethereum-erc20-weth.json +0 -73
- package/src/__fixtures__/optimism-erc20-usd_coin.json +0 -69
- package/src/__tests__/fixtures/cryptoAssetsStore.fixtures.ts +0 -24
- package/src/cryptoAssetsStore.test.ts +0 -19
- package/src/cryptoAssetsStore.ts +0 -16
- package/src/logic/validateIntent.test.ts +0 -659
- package/src/logic/validateIntent.ts +0 -274
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"estimateFees.d.ts","sourceRoot":"","sources":["../../src/logic/estimateFees.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,KAAK,EACV,aAAa,EACb,gBAAgB,EAChB,iBAAiB,EAClB,MAAM,oCAAoC,CAAC;
|
|
1
|
+
{"version":3,"file":"estimateFees.d.ts","sourceRoot":"","sources":["../../src/logic/estimateFees.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,KAAK,EACV,aAAa,EACb,gBAAgB,EAChB,iBAAiB,EAClB,MAAM,oCAAoC,CAAC;AAM5C,wBAAsB,YAAY,CAChC,QAAQ,EAAE,cAAc,EACxB,iBAAiB,EAAE,iBAAiB,CAAC,gBAAgB,CAAC,EACtD,UAAU,CAAC,EAAE,aAAa,GACzB,OAAO,CAAC,aAAa,CAAC,CAyCxB;AAED,eAAe,YAAY,CAAC"}
|
|
@@ -8,28 +8,18 @@ const bignumber_js_1 = __importDefault(require("bignumber.js"));
|
|
|
8
8
|
const utils_1 = require("ethers/lib/utils");
|
|
9
9
|
const node_1 = require("../network/node");
|
|
10
10
|
const types_1 = require("../types");
|
|
11
|
-
const gasTracker_1 = require("../network/gasTracker");
|
|
12
11
|
const common_1 = require("./common");
|
|
13
|
-
function
|
|
14
|
-
return {
|
|
15
|
-
gasPrice: feeData.gasPrice && BigInt(feeData.gasPrice.toFixed()),
|
|
16
|
-
maxFeePerGas: feeData.maxFeePerGas && BigInt(feeData.maxFeePerGas.toFixed()),
|
|
17
|
-
maxPriorityFeePerGas: feeData.maxPriorityFeePerGas && BigInt(feeData.maxPriorityFeePerGas.toFixed()),
|
|
18
|
-
nextBaseFee: feeData.nextBaseFee && BigInt(feeData.nextBaseFee.toFixed()),
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
function toApiGasOptions(options) {
|
|
22
|
-
return {
|
|
23
|
-
fast: toApiFeeData(options.fast),
|
|
24
|
-
medium: toApiFeeData(options.medium),
|
|
25
|
-
slow: toApiFeeData(options.slow),
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
async function estimateFees(currency, transactionIntent) {
|
|
12
|
+
async function estimateFees(currency, transactionIntent, customFees) {
|
|
29
13
|
const { amount, asset, recipient, sender, type } = transactionIntent;
|
|
30
14
|
const transactionType = (0, common_1.getTransactionType)(type);
|
|
15
|
+
if ((transactionType === utils_1.TransactionTypes.legacy &&
|
|
16
|
+
typeof customFees?.parameters?.gasPrice === "bigint") ||
|
|
17
|
+
(transactionType === utils_1.TransactionTypes.eip1559 &&
|
|
18
|
+
typeof customFees?.parameters?.maxFeePerGas === "bigint" &&
|
|
19
|
+
typeof customFees?.parameters?.maxPriorityFeePerGas === "bigint")) {
|
|
20
|
+
return customFees;
|
|
21
|
+
}
|
|
31
22
|
const node = (0, node_1.getNodeApi)(currency);
|
|
32
|
-
const gasTracker = (0, gasTracker_1.getGasTracker)(currency);
|
|
33
23
|
const to = (0, types_1.isNative)(asset) ? recipient : asset.assetReference;
|
|
34
24
|
const data = (0, types_1.isNative)(asset) ? Buffer.from([]) : (0, common_1.getErc20Data)(recipient, amount);
|
|
35
25
|
const value = (0, types_1.isNative)(asset) ? amount : 0n;
|
|
@@ -38,18 +28,15 @@ async function estimateFees(currency, transactionIntent) {
|
|
|
38
28
|
type: transactionType,
|
|
39
29
|
feesStrategy: transactionIntent.feesStrategy,
|
|
40
30
|
});
|
|
41
|
-
const gasOptions = await gasTracker?.getGasOptions({
|
|
42
|
-
currency,
|
|
43
|
-
options: { useEIP1559: transactionType === utils_1.TransactionTypes.eip1559 },
|
|
44
|
-
});
|
|
45
31
|
const gasPrice = transactionType === utils_1.TransactionTypes.legacy ? feeData.gasPrice : feeData.maxFeePerGas;
|
|
46
32
|
const fee = gasPrice?.multipliedBy(gasLimit) || new bignumber_js_1.default(0);
|
|
47
33
|
return {
|
|
48
34
|
value: BigInt(fee.toString()),
|
|
49
35
|
parameters: {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
36
|
+
gasPrice: feeData.gasPrice && BigInt(feeData.gasPrice.toFixed()),
|
|
37
|
+
maxFeePerGas: feeData.maxFeePerGas && BigInt(feeData.maxFeePerGas.toFixed()),
|
|
38
|
+
maxPriorityFeePerGas: feeData.maxPriorityFeePerGas && BigInt(feeData.maxPriorityFeePerGas.toFixed()),
|
|
39
|
+
nextBaseFee: feeData.nextBaseFee && BigInt(feeData.nextBaseFee.toFixed()),
|
|
53
40
|
},
|
|
54
41
|
};
|
|
55
42
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"estimateFees.js","sourceRoot":"","sources":["../../src/logic/estimateFees.ts"],"names":[],"mappings":";;;;;;AAAA,gEAAqC;AAOrC,4CAAoD;AACpD,0CAA6C;AAC7C,
|
|
1
|
+
{"version":3,"file":"estimateFees.js","sourceRoot":"","sources":["../../src/logic/estimateFees.ts"],"names":[],"mappings":";;;;;;AAAA,gEAAqC;AAOrC,4CAAoD;AACpD,0CAA6C;AAC7C,oCAAoC;AACpC,qCAA4D;AAErD,KAAK,UAAU,YAAY,CAChC,QAAwB,EACxB,iBAAsD,EACtD,U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IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE;QAC9C,IAAI,EAAE,eAAe;QACrB,YAAY,EAAE,iBAAiB,CAAC,YAAY;KAC7C,CAAC,CAAC;IACH,MAAM,QAAQ,GACZ,eAAe,KAAK,wBAAgB,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC;IACxF,MAAM,GAAG,GAAG,QAAQ,EAAE,YAAY,CAAC,QAAQ,CAAC,IAAI,IAAI,sBAAS,CAAC,CAAC,CAAC,CAAC;IAEjE,OAAO;QACL,KAAK,EAAE,MAAM,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;QAC7B,UAAU,EAAE;YACV,QAAQ,EAAE,OAAO,CAAC,QAAQ,IAAI,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC;YAChE,YAAY,EAAE,OAAO,CAAC,YAAY,IAAI,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,OAAO,EAAE,CAAC;YAC5E,oBAAoB,EAClB,OAAO,CAAC,oBAAoB,IAAI,MAAM,CAAC,OAAO,CAAC,oBAAoB,CAAC,OAAO,EAAE,CAAC;YAChF,WAAW,EAAE,OAAO,CAAC,WAAW,IAAI,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC;SAC1E;KACF,CAAC;AACJ,CAAC;AA7CD,oCA6CC;AAED,kBAAe,YAAY,CAAC"}
|
|
@@ -5,8 +5,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const bignumber_js_1 = __importDefault(require("bignumber.js"));
|
|
7
7
|
const node_1 = require("../network/node");
|
|
8
|
-
const ledger_1 = __importDefault(require("../network/gasTracker/ledger"));
|
|
9
|
-
const config_1 = require("../config");
|
|
10
8
|
const estimateFees_1 = require("./estimateFees");
|
|
11
9
|
jest.mock("../network/node", () => ({ getNodeApi: jest.fn() }));
|
|
12
10
|
describe("estimateFees", () => {
|
|
@@ -41,66 +39,20 @@ describe("estimateFees", () => {
|
|
|
41
39
|
mockNodeApi.getGasEstimation.mockResolvedValue(mockGasLimit);
|
|
42
40
|
mockNodeApi.getFeeData.mockResolvedValue(mockFeeData);
|
|
43
41
|
jest.mocked(node_1.getNodeApi).mockReturnValue(mockNodeApi);
|
|
44
|
-
(0, config_1.setCoinConfig)(() => ({
|
|
45
|
-
info: {
|
|
46
|
-
gasTracker: { type: "ledger", explorerId: "eth" },
|
|
47
|
-
},
|
|
48
|
-
}));
|
|
49
42
|
});
|
|
50
43
|
it("should estimate fees for native asset", async () => {
|
|
51
|
-
jest.spyOn(ledger_1.default, "getGasOptions").mockResolvedValue({
|
|
52
|
-
fast: {
|
|
53
|
-
maxFeePerGas: new bignumber_js_1.default("30000000000"),
|
|
54
|
-
maxPriorityFeePerGas: new bignumber_js_1.default("3000000000"),
|
|
55
|
-
gasPrice: new bignumber_js_1.default("30000000000"),
|
|
56
|
-
nextBaseFee: null,
|
|
57
|
-
},
|
|
58
|
-
medium: {
|
|
59
|
-
maxFeePerGas: new bignumber_js_1.default("20000000000"),
|
|
60
|
-
maxPriorityFeePerGas: new bignumber_js_1.default("2000000000"),
|
|
61
|
-
gasPrice: new bignumber_js_1.default("20000000000"),
|
|
62
|
-
nextBaseFee: null,
|
|
63
|
-
},
|
|
64
|
-
slow: {
|
|
65
|
-
maxFeePerGas: new bignumber_js_1.default("10000000000"),
|
|
66
|
-
maxPriorityFeePerGas: new bignumber_js_1.default("1000000000"),
|
|
67
|
-
gasPrice: new bignumber_js_1.default("10000000000"),
|
|
68
|
-
nextBaseFee: null,
|
|
69
|
-
},
|
|
70
|
-
});
|
|
71
44
|
const result = await (0, estimateFees_1.estimateFees)(mockCurrency, mockIntent);
|
|
72
45
|
expect(mockNodeApi.getFeeData).toHaveBeenCalledWith(mockCurrency, {
|
|
73
46
|
feesStrategy: "fast",
|
|
74
47
|
type: 0,
|
|
75
48
|
});
|
|
76
49
|
expect(result).toEqual({
|
|
77
|
-
value:
|
|
50
|
+
value: BigInt(mockGasLimit.multipliedBy(mockFeeData.gasPrice).toFixed()),
|
|
78
51
|
parameters: {
|
|
79
52
|
gasPrice: 20000000000n,
|
|
80
53
|
maxFeePerGas: 20000000000n,
|
|
81
54
|
maxPriorityFeePerGas: 2000000000n,
|
|
82
55
|
nextBaseFee: null,
|
|
83
|
-
gasLimit: 21000n,
|
|
84
|
-
gasOptions: {
|
|
85
|
-
fast: {
|
|
86
|
-
maxFeePerGas: 30000000000n,
|
|
87
|
-
maxPriorityFeePerGas: 3000000000n,
|
|
88
|
-
gasPrice: 30000000000n,
|
|
89
|
-
nextBaseFee: null,
|
|
90
|
-
},
|
|
91
|
-
medium: {
|
|
92
|
-
gasPrice: 20000000000n,
|
|
93
|
-
maxFeePerGas: 20000000000n,
|
|
94
|
-
maxPriorityFeePerGas: 2000000000n,
|
|
95
|
-
nextBaseFee: null,
|
|
96
|
-
},
|
|
97
|
-
slow: {
|
|
98
|
-
gasPrice: 10000000000n,
|
|
99
|
-
maxFeePerGas: 10000000000n,
|
|
100
|
-
maxPriorityFeePerGas: 1000000000n,
|
|
101
|
-
nextBaseFee: null,
|
|
102
|
-
},
|
|
103
|
-
},
|
|
104
56
|
},
|
|
105
57
|
});
|
|
106
58
|
});
|
|
@@ -112,33 +64,12 @@ describe("estimateFees", () => {
|
|
|
112
64
|
type: 0,
|
|
113
65
|
});
|
|
114
66
|
expect(result).toEqual({
|
|
115
|
-
value:
|
|
67
|
+
value: BigInt(mockGasLimit.multipliedBy(mockFeeData.gasPrice).toFixed()),
|
|
116
68
|
parameters: {
|
|
117
69
|
gasPrice: 20000000000n,
|
|
118
70
|
maxFeePerGas: 20000000000n,
|
|
119
71
|
maxPriorityFeePerGas: 2000000000n,
|
|
120
72
|
nextBaseFee: null,
|
|
121
|
-
gasLimit: 21000n,
|
|
122
|
-
gasOptions: {
|
|
123
|
-
fast: {
|
|
124
|
-
maxFeePerGas: 30000000000n,
|
|
125
|
-
maxPriorityFeePerGas: 3000000000n,
|
|
126
|
-
gasPrice: 30000000000n,
|
|
127
|
-
nextBaseFee: null,
|
|
128
|
-
},
|
|
129
|
-
medium: {
|
|
130
|
-
gasPrice: 20000000000n,
|
|
131
|
-
maxFeePerGas: 20000000000n,
|
|
132
|
-
maxPriorityFeePerGas: 2000000000n,
|
|
133
|
-
nextBaseFee: null,
|
|
134
|
-
},
|
|
135
|
-
slow: {
|
|
136
|
-
gasPrice: 10000000000n,
|
|
137
|
-
maxFeePerGas: 10000000000n,
|
|
138
|
-
maxPriorityFeePerGas: 1000000000n,
|
|
139
|
-
nextBaseFee: null,
|
|
140
|
-
},
|
|
141
|
-
},
|
|
142
73
|
},
|
|
143
74
|
});
|
|
144
75
|
});
|
|
@@ -146,35 +77,52 @@ describe("estimateFees", () => {
|
|
|
146
77
|
mockNodeApi.getFeeData.mockResolvedValue({ ...mockFeeData, gasPrice: null });
|
|
147
78
|
const result = await (0, estimateFees_1.estimateFees)(mockCurrency, mockIntent);
|
|
148
79
|
expect(result).toEqual({
|
|
149
|
-
value:
|
|
80
|
+
value: BigInt(0),
|
|
150
81
|
parameters: {
|
|
151
82
|
gasPrice: null,
|
|
152
83
|
maxFeePerGas: 20000000000n,
|
|
153
84
|
maxPriorityFeePerGas: 2000000000n,
|
|
154
85
|
nextBaseFee: null,
|
|
155
|
-
gasLimit: 21000n,
|
|
156
|
-
gasOptions: {
|
|
157
|
-
fast: {
|
|
158
|
-
maxFeePerGas: 30000000000n,
|
|
159
|
-
maxPriorityFeePerGas: 3000000000n,
|
|
160
|
-
gasPrice: 30000000000n,
|
|
161
|
-
nextBaseFee: null,
|
|
162
|
-
},
|
|
163
|
-
medium: {
|
|
164
|
-
gasPrice: 20000000000n,
|
|
165
|
-
maxFeePerGas: 20000000000n,
|
|
166
|
-
maxPriorityFeePerGas: 2000000000n,
|
|
167
|
-
nextBaseFee: null,
|
|
168
|
-
},
|
|
169
|
-
slow: {
|
|
170
|
-
gasPrice: 10000000000n,
|
|
171
|
-
maxFeePerGas: 10000000000n,
|
|
172
|
-
maxPriorityFeePerGas: 1000000000n,
|
|
173
|
-
nextBaseFee: null,
|
|
174
|
-
},
|
|
175
|
-
},
|
|
176
86
|
},
|
|
177
87
|
});
|
|
178
88
|
});
|
|
89
|
+
it.each([
|
|
90
|
+
[
|
|
91
|
+
"legacy",
|
|
92
|
+
{
|
|
93
|
+
value: 8n,
|
|
94
|
+
parameters: {
|
|
95
|
+
gasPrice: 5n,
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
],
|
|
99
|
+
[
|
|
100
|
+
"eip1559",
|
|
101
|
+
{
|
|
102
|
+
value: 8n,
|
|
103
|
+
parameters: {
|
|
104
|
+
maxFeePerGas: 2n,
|
|
105
|
+
maxPriorityFeePerGas: 3n,
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
],
|
|
109
|
+
])("uses the given fees for a %s transaction type", async (type, customFees) => {
|
|
110
|
+
const getFeeData = jest.spyOn(mockNodeApi, "getFeeData");
|
|
111
|
+
const getGasEstimation = jest.spyOn(mockNodeApi, "getGasEstimation");
|
|
112
|
+
expect(await (0, estimateFees_1.estimateFees)({}, { type: `send-${type}` }, customFees)).toEqual(customFees);
|
|
113
|
+
expect(getFeeData).not.toHaveBeenCalled();
|
|
114
|
+
expect(getGasEstimation).not.toHaveBeenCalled();
|
|
115
|
+
});
|
|
116
|
+
it("ignores malformed or irrelevant custom fees", async () => {
|
|
117
|
+
const getFeeData = jest.spyOn(mockNodeApi, "getFeeData");
|
|
118
|
+
const getGasEstimation = jest.spyOn(mockNodeApi, "getGasEstimation");
|
|
119
|
+
expect(await (0, estimateFees_1.estimateFees)({}, {
|
|
120
|
+
type: "send-eip1559",
|
|
121
|
+
amount: 3n,
|
|
122
|
+
asset: { type: "native" },
|
|
123
|
+
}, { value: 8n, parameters: { gasPrice: 5n } })).not.toEqual({ value: 8n, parameters: { gasPrice: 5n } });
|
|
124
|
+
expect(getFeeData).toHaveBeenCalled();
|
|
125
|
+
expect(getGasEstimation).toHaveBeenCalled();
|
|
126
|
+
});
|
|
179
127
|
});
|
|
180
128
|
//# sourceMappingURL=estimateFees.test.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"estimateFees.test.js","sourceRoot":"","sources":["../../src/logic/estimateFees.test.ts"],"names":[],"mappings":";;;;;AAAA,gEAAqC;AAOrC,0CAA6C;AAE7C,
|
|
1
|
+
{"version":3,"file":"estimateFees.test.js","sourceRoot":"","sources":["../../src/logic/estimateFees.test.ts"],"names":[],"mappings":";;;;;AAAA,gEAAqC;AAOrC,0CAA6C;AAE7C,iDAA8C;AAE9C,IAAI,CAAC,IAAI,CAAC,iBAAiB,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,UAAU,EAAE,IAAI,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC;AAEhE,QAAQ,CAAC,cAAc,EAAE,GAAG,EAAE;IAC5B,MAAM,YAAY,GAAG;QACnB,EAAE,EAAE,UAAU;QACd,MAAM,EAAE,KAAK;QACb,gBAAgB,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE;KACf,CAAC;IACpB,MAAM,eAAe,GAAc,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;IACtD,MAAM,cAAc,GAAc,EAAE,IAAI,EAAE,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,CAAC;IAC9E,MAAM,UAAU,GAAwC;QACtD,IAAI,EAAE,aAAa;QACnB,MAAM,EAAE,MAAM,CAAC,qBAAqB,CAAC;QACrC,KAAK,EAAE,eAAe;QACtB,SAAS,EAAE,4CAA4C;QACvD,MAAM,EAAE,UAAU;QAClB,YAAY,EAAE,MAAM;KACrB,CAAC;IAEF,MAAM,YAAY,GAAG,IAAI,sBAAS,CAAC,OAAO,CAAC,CAAC;IAC5C,MAAM,WAAW,GAAY;QAC3B,YAAY,EAAE,IAAI,sBA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AC,GAAG,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;QAC3D,MAAM,CAAC,UAAU,CAAC,CAAC,gBAAgB,EAAE,CAAC;QACtC,MAAM,CAAC,gBAAgB,CAAC,CAAC,gBAAgB,EAAE,CAAC;IAC9C,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/lib/logic/index.d.ts
CHANGED
package/lib/logic/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/logic/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/logic/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC"}
|
package/lib/logic/index.js
CHANGED
|
@@ -22,5 +22,4 @@ __exportStar(require("./estimateFees"), exports);
|
|
|
22
22
|
__exportStar(require("./listOperations"), exports);
|
|
23
23
|
__exportStar(require("./craftTransaction"), exports);
|
|
24
24
|
__exportStar(require("./getSequence"), exports);
|
|
25
|
-
__exportStar(require("./validateIntent"), exports);
|
|
26
25
|
//# sourceMappingURL=index.js.map
|
package/lib/logic/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/logic/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,8CAA4B;AAC5B,4CAA0B;AAC1B,+CAA6B;AAC7B,iDAA+B;AAC/B,mDAAiC;AACjC,qDAAmC;AACnC,gDAA8B
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/logic/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,8CAA4B;AAC5B,4CAA0B;AAC1B,+CAA6B;AAC7B,iDAA+B;AAC/B,mDAAiC;AACjC,qDAAmC;AACnC,gDAA8B"}
|
|
@@ -85,12 +85,6 @@ export type FeeHistory = {
|
|
|
85
85
|
oldestBlock: string;
|
|
86
86
|
reward: string[][];
|
|
87
87
|
};
|
|
88
|
-
export type ApiFeeData = {
|
|
89
|
-
maxFeePerGas: bigint | null;
|
|
90
|
-
maxPriorityFeePerGas: bigint | null;
|
|
91
|
-
gasPrice: bigint | null;
|
|
92
|
-
nextBaseFee: bigint | null;
|
|
93
|
-
};
|
|
94
88
|
export type FeeData = {
|
|
95
89
|
maxFeePerGas: BigNumber | null;
|
|
96
90
|
maxPriorityFeePerGas: BigNumber | null;
|
|
@@ -104,9 +98,6 @@ export type FeeDataRaw = {
|
|
|
104
98
|
nextBaseFee: string | null;
|
|
105
99
|
};
|
|
106
100
|
export type Strategy = "slow" | "medium" | "fast";
|
|
107
|
-
export type ApiGasOptions = {
|
|
108
|
-
[key in Strategy]: ApiFeeData;
|
|
109
|
-
};
|
|
110
101
|
export type GasOptions = {
|
|
111
102
|
[key in Strategy]: FeeData;
|
|
112
103
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transaction.d.ts","sourceRoot":"","sources":["../../src/types/transaction.ts"],"names":[],"mappings":";;AAAA,OAAO,SAAS,MAAM,cAAc,CAAC;AACrC,OAAO,EACL,QAAQ,EACR,WAAW,EACX,iBAAi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 -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "TokenCurrency",
|
|
3
|
-
"id": "ethereum/erc20/
|
|
4
|
-
"ledgerSignature": "
|
|
5
|
-
"contractAddress": "
|
|
3
|
+
"id": "ethereum/erc20/usd_tether__erc20_",
|
|
4
|
+
"ledgerSignature": "3044022078c66ccea3e4dedb15a24ec3c783d7b582cd260daf62fd36afe9a8212a344aed0220160ba8c1c4b6a8aa6565bed20632a091aeeeb7bfdac67fc6589a6031acbf511c",
|
|
5
|
+
"contractAddress": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
|
|
6
6
|
"parentCurrency": {
|
|
7
7
|
"type": "CryptoCurrency",
|
|
8
8
|
"id": "ethereum",
|
|
@@ -59,15 +59,15 @@
|
|
|
59
59
|
"explorerId": "eth"
|
|
60
60
|
},
|
|
61
61
|
"tokenType": "erc20",
|
|
62
|
-
"name": "
|
|
63
|
-
"ticker": "
|
|
62
|
+
"name": "Tether USD",
|
|
63
|
+
"ticker": "USDT",
|
|
64
64
|
"delisted": false,
|
|
65
65
|
"disableCountervalue": false,
|
|
66
66
|
"units": [
|
|
67
67
|
{
|
|
68
|
-
"name": "
|
|
69
|
-
"code": "
|
|
70
|
-
"magnitude":
|
|
68
|
+
"name": "Tether USD",
|
|
69
|
+
"code": "USDT",
|
|
70
|
+
"magnitude": 6
|
|
71
71
|
}
|
|
72
72
|
]
|
|
73
73
|
}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "TokenCurrency",
|
|
3
|
-
"id": "
|
|
4
|
-
"ledgerSignature": "
|
|
5
|
-
"contractAddress": "
|
|
3
|
+
"id": "scroll_sepolia/erc20/new_token_mock",
|
|
4
|
+
"ledgerSignature": "dadcoffee",
|
|
5
|
+
"contractAddress": "0xdeadbeef",
|
|
6
6
|
"parentCurrency": {
|
|
7
7
|
"type": "CryptoCurrency",
|
|
8
|
-
"id": "
|
|
8
|
+
"id": "scroll_sepolia",
|
|
9
9
|
"coinType": 60,
|
|
10
|
-
"name": "
|
|
10
|
+
"name": "Scroll Sepolia",
|
|
11
11
|
"managerAppName": "Ethereum",
|
|
12
12
|
"ticker": "ETH",
|
|
13
|
-
"scheme": "
|
|
14
|
-
"color": "#
|
|
13
|
+
"scheme": "scroll_sepolia",
|
|
14
|
+
"color": "#ff0000",
|
|
15
15
|
"family": "evm",
|
|
16
16
|
"units": [
|
|
17
17
|
{
|
|
18
|
-
"name": "
|
|
18
|
+
"name": "ETH",
|
|
19
19
|
"code": "ETH",
|
|
20
20
|
"magnitude": 18
|
|
21
21
|
},
|
|
@@ -40,30 +40,29 @@
|
|
|
40
40
|
"magnitude": 0
|
|
41
41
|
}
|
|
42
42
|
],
|
|
43
|
+
"disableCountervalue": false,
|
|
44
|
+
"isTestnetFor": "scroll",
|
|
43
45
|
"ethereumLikeInfo": {
|
|
44
|
-
"chainId":
|
|
46
|
+
"chainId": 534351
|
|
45
47
|
},
|
|
46
48
|
"explorerViews": [
|
|
47
49
|
{
|
|
48
|
-
"tx": "https://
|
|
49
|
-
"address": "https://
|
|
50
|
-
"token": "https://
|
|
50
|
+
"tx": "https://scroll-sepolia.blockscout.com/tx/$hash",
|
|
51
|
+
"address": "https://scroll-sepolia.blockscout.com/address/$address",
|
|
52
|
+
"token": "https://scroll-sepolia.blockscout.com/address/$address?tab=token_transfer&token=$contractAddress"
|
|
51
53
|
}
|
|
52
|
-
],
|
|
53
|
-
"keywords": [
|
|
54
|
-
"optimism"
|
|
55
54
|
]
|
|
56
55
|
},
|
|
57
56
|
"tokenType": "erc20",
|
|
58
|
-
"name": "
|
|
59
|
-
"ticker": "
|
|
57
|
+
"name": "Awesome Fake Token",
|
|
58
|
+
"ticker": "NTM",
|
|
60
59
|
"delisted": false,
|
|
61
|
-
"disableCountervalue":
|
|
60
|
+
"disableCountervalue": true,
|
|
62
61
|
"units": [
|
|
63
62
|
{
|
|
64
|
-
"name": "
|
|
65
|
-
"code": "
|
|
66
|
-
"magnitude":
|
|
63
|
+
"name": "Awesome Fake Token",
|
|
64
|
+
"code": "NTM",
|
|
65
|
+
"magnitude": 18
|
|
67
66
|
}
|
|
68
67
|
]
|
|
69
68
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ERC20Token } from "@ledgerhq/cryptoassets/types";
|
|
2
2
|
import { AccountShapeInfo } from "@ledgerhq/coin-framework/bridge/jsHelpers";
|
|
3
|
-
import "./cryptoAssetsStore.fixtures";
|
|
4
3
|
export declare const currency: import("@ledgerhq/types-cryptoassets").CryptoCurrency;
|
|
5
4
|
export declare const fakeToken: ERC20Token;
|
|
5
|
+
export declare const localCALHash: string;
|
|
6
6
|
export declare const getAccountShapeParameters: AccountShapeInfo;
|
|
7
7
|
export declare const TMUSDTTransaction: import("@ledgerhq/types-live").Operation;
|
|
8
8
|
export declare const NTMTransaction: import("@ledgerhq/types-live").Operation;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accounts.fixtures.d.ts","sourceRoot":"","sources":["../../../src/__tests__/fixtures/accounts.fixtures.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"accounts.fixtures.d.ts","sourceRoot":"","sources":["../../../src/__tests__/fixtures/accounts.fixtures.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAE1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAO7E,eAAO,MAAM,QAAQ,uDAA0C,CAAC;AAChE,eAAO,MAAM,SAAS,EAAE,UAUvB,CAAC;AAEF,eAAO,MAAM,YAAY,QAGtB,CAAC;AACJ,eAAO,MAAM,yBAAyB,EAAE,gBAMvC,CAAC;AAgBF,eAAO,MAAM,iBAAiB,0CAa5B,CAAC;AACH,eAAO,MAAM,cAAc,0CAazB,CAAC"}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import BigNumber from "bignumber.js";
|
|
2
|
+
import { hashes as localTokensHashesByChainId } from "@ledgerhq/cryptoassets/data/evm/index";
|
|
2
3
|
import { getCryptoCurrencyById } from "@ledgerhq/cryptoassets/currencies";
|
|
4
|
+
import { setCryptoAssetsStore } from "@ledgerhq/coin-framework/crypto-assets/index";
|
|
5
|
+
import usdtTokenData from "../../__fixtures__/scroll_sepolia-erc20-mock_usdt.json";
|
|
6
|
+
import newTokenData from "../../__fixtures__/scroll_sepolia-erc20-new_token_mock.json";
|
|
3
7
|
import { makeOperation } from "./common.fixtures";
|
|
4
|
-
import "./cryptoAssetsStore.fixtures";
|
|
5
8
|
export const currency = getCryptoCurrencyById("scroll_sepolia");
|
|
6
9
|
export const fakeToken = [
|
|
7
10
|
currency.id, // parent currency id
|
|
@@ -14,6 +17,7 @@ export const fakeToken = [
|
|
|
14
17
|
false, // [deprecated] disabled counter values
|
|
15
18
|
false, // delisted
|
|
16
19
|
];
|
|
20
|
+
export const localCALHash = localTokensHashesByChainId[currency.ethereumLikeInfo.chainId];
|
|
17
21
|
export const getAccountShapeParameters = {
|
|
18
22
|
address: "0xkvn",
|
|
19
23
|
currency,
|
|
@@ -21,6 +25,19 @@ export const getAccountShapeParameters = {
|
|
|
21
25
|
derivationPath: "44'/60'/0'/0/0",
|
|
22
26
|
index: 0,
|
|
23
27
|
};
|
|
28
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
|
|
29
|
+
setCryptoAssetsStore({
|
|
30
|
+
findTokenById: (id) => {
|
|
31
|
+
if (id === "scroll_sepolia/erc20/mock_usdt") {
|
|
32
|
+
return usdtTokenData;
|
|
33
|
+
}
|
|
34
|
+
else if (id === "scroll_sepolia/erc20/new_token_mock") {
|
|
35
|
+
return newTokenData;
|
|
36
|
+
}
|
|
37
|
+
return undefined;
|
|
38
|
+
},
|
|
39
|
+
findTokenByAddressInCurrency: (_address, _currencyId) => undefined,
|
|
40
|
+
});
|
|
24
41
|
export const TMUSDTTransaction = makeOperation({
|
|
25
42
|
hash: "anyHash",
|
|
26
43
|
accountId: "js:2:scroll_sepolia:0xkvn:+scroll~!underscore!~sepolia%2Ferc20%2Fmock~!underscore!~usdt",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accounts.fixtures.js","sourceRoot":"","sources":["../../../src/__tests__/fixtures/accounts.fixtures.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"accounts.fixtures.js","sourceRoot":"","sources":["../../../src/__tests__/fixtures/accounts.fixtures.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,cAAc,CAAC;AACrC,OAAO,EAAE,MAAM,IAAI,0BAA0B,EAAE,MAAM,uCAAuC,CAAC;AAE7F,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAG1E,OAAO,EAAE,oBAAoB,EAAE,MAAM,8CAA8C,CAAC;AACpF,OAAO,aAAa,MAAM,wDAAwD,CAAC;AACnF,OAAO,YAAY,MAAM,6DAA6D,CAAC;AACvF,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,MAAM,CAAC,MAAM,QAAQ,GAAG,qBAAqB,CAAC,gBAAgB,CAAC,CAAC;AAChE,MAAM,CAAC,MAAM,SAAS,GAAe;IACnC,QAAQ,CAAC,EAAE,EAAE,qBAAqB;IAClC,gBAAgB,EAAE,WAAW;IAC7B,KAAK,EAAE,SAAS;IAChB,EAAE,EAAE,YAAY;IAChB,oBAAoB,EAAE,OAAO;IAC7B,WAAW,EAAE,kBAAkB;IAC/B,YAAY,EAAE,mBAAmB;IACjC,KAAK,EAAE,uCAAuC;IAC9C,KAAK,EAAE,WAAW;CACnB,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GACvB,0BAA0B,CACxB,QAAQ,CAAC,gBAAiB,CAAC,OAAkD,CAC9E,CAAC;AACJ,MAAM,CAAC,MAAM,yBAAyB,GAAqB;IACzD,OAAO,EAAE,OAAO;IAChB,QAAQ;IACR,cAAc,EAAE,EAAE;IAClB,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K;IACX,IAAI,EAAE,IAAI,IAAI,EAAE;IAChB,WAAW,EAAE,EAAE;CAChB,CAAC,CAAC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { CryptoCurrency, TokenCurrency } from "@ledgerhq/types-cryptoassets";
|
|
2
2
|
import { Account, Operation, ProtoNFT, TokenAccount } from "@ledgerhq/types-live";
|
|
3
|
-
import "./cryptoAssetsStore.fixtures";
|
|
4
3
|
export declare const makeAccount: (address: string, currency: CryptoCurrency, subAccounts?: TokenAccount[]) => Account;
|
|
5
4
|
export declare const makeTokenAccount: (address: string, tokenCurrency: TokenCurrency) => TokenAccount;
|
|
6
5
|
export declare const makeOperation: (partialOp?: Partial<Operation>) => Operation;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.fixtures.d.ts","sourceRoot":"","sources":["../../../src/__tests__/fixtures/common.fixtures.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7E,OAAO,EAAE,OAAO,EAAkB,SAAS,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"common.fixtures.d.ts","sourceRoot":"","sources":["../../../src/__tests__/fixtures/common.fixtures.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7E,OAAO,EAAE,OAAO,EAAkB,SAAS,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAElG,eAAO,MAAM,WAAW,YACb,MAAM,YACL,cAAc,gBACX,YAAY,EAAE,KAC1B,OAqDF,CAAC;AAEF,eAAO,MAAM,gBAAgB,YAAa,MAAM,iBAAiB,aAAa,KAAG,YAiChF,CAAC;AAEF,eAAO,MAAM,aAAa,eAAgB,QAAQ,SAAS,CAAC,KAAG,SA2B9D,CAAC;AAEF,eAAO,MAAM,gBAAgB,eACf,QAAQ,SAAS,CAAC,mBACb,MAAM,KACtB,SA+BF,CAAC;AAEF,eAAO,MAAM,OAAO,gBAAiB,QAAQ,QAAQ,CAAC,KAAG,QASrD,CAAC;AAEL,eAAO,MAAM,UAAU,WAAY,CAAC,KAAG,SAAS,CAAC,CAOhD,CAAC"}
|
|
@@ -5,7 +5,6 @@ import { decodeAccountId, decodeTokenAccountId, encodeTokenAccountId, } from "@l
|
|
|
5
5
|
import { encodeERC1155OperationId, encodeERC721OperationId, } from "@ledgerhq/coin-framework/nft/nftOperationId";
|
|
6
6
|
import { encodeNftId } from "@ledgerhq/coin-framework/nft/nftId";
|
|
7
7
|
import { encodeOperationId } from "@ledgerhq/coin-framework/operation";
|
|
8
|
-
import "./cryptoAssetsStore.fixtures";
|
|
9
8
|
export const makeAccount = (address, currency, subAccounts = []) => {
|
|
10
9
|
const id = `js:2:${currency.id}:${address}:`;
|
|
11
10
|
const { derivationMode, xpubOrAddress } = decodeAccountId(id);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.fixtures.js","sourceRoot":"","sources":["../../../src/__tests__/fixtures/common.fixtures.ts"],"names":[],"mappings":"AAAA,gDAAgD;AAEhD,OAAO,SAAS,MAAM,cAAc,CAAC;AACrC,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAC/F,OAAO,EACL,eAAe,EACf,oBAAoB,EACpB,oBAAoB,GACrB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EACL,wBAAwB,EACxB,uBAAuB,GACxB,MAAM,6CAA6C,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;
|
|
1
|
+
{"version":3,"file":"common.fixtures.js","sourceRoot":"","sources":["../../../src/__tests__/fixtures/common.fixtures.ts"],"names":[],"mappings":"AAAA,gDAAgD;AAEhD,OAAO,SAAS,MAAM,cAAc,CAAC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EAAE;QAChB,KAAK,EAAE,EAAE;QACT,GAAG,SAAS;KACb,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,UAA8B,EAAY,EAAE,CAClE,MAAM,CAAC,MAAM,CAAC;IACZ,EAAE,EAAE,QAAQ;IACZ,OAAO,EAAE,GAAG;IACZ,MAAM,EAAE,IAAI,SAAS,CAAC,CAAC,CAAC;IACxB,QAAQ,EAAE,eAAe;IACzB,QAAQ,EAAE,QAAQ;IAClB,UAAU,EAAE,UAAU;IACtB,GAAG,UAAU;CACd,CAAC,CAAC;AAEL,MAAM,CAAC,MAAM,UAAU,GAAG,CAAI,GAAM,EAAe,EAAE;IACnD,IAAI,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;QAC5D,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QACnB,MAAM,SAAS,GAAG,MAAM,CAAC,mBAAmB,CAAC,GAAG,CAAmB,CAAC;QACpE,SAAS,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IAC3D,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prepareTransaction.fixtures.d.ts","sourceRoot":"","sources":["../../../src/__tests__/fixtures/prepareTransaction.fixtures.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"prepareTransaction.fixtures.d.ts","sourceRoot":"","sources":["../../../src/__tests__/fixtures/prepareTransaction.fixtures.ts"],"names":[],"mappings":";;AAKA,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAE/C,OAAO,EAAE,iBAAiB,EAAE,WAAW,IAAI,cAAc,EAAE,MAAM,aAAa,CAAC;AAc/E,eAAO,MAAM,YAAY,6CAAsE,CAAC;AAChG,eAAO,MAAM,OAAO,SAElB,CAAC;AAEH,eAAO,MAAM,WAAW,EAAE,cAYxB,CAAC;AAEH,eAAO,MAAM,gBAAgB,EAAE,cAG7B,CAAC;AAEH,eAAO,MAAM,cAAc,EAAE,cAAc,GAAG,iBAS5C,CAAC;AAEH,eAAO,MAAM,YAAY,YACd,OAAO,eACH,cAAc,QACrB,OAAO,GAAG,QAAQ,GAAG,SAAS,KACnC,MAAM,GAAG,SAmCX,CAAC"}
|