@ledgerhq/live-common 34.32.0-nightly.0 → 34.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/__tests__/test-helpers/environment.js +1 -0
- package/lib/__tests__/test-helpers/environment.js.map +1 -1
- package/lib/account/helpers.d.ts.map +1 -1
- package/lib/account/helpers.js +1 -0
- package/lib/account/helpers.js.map +1 -1
- package/lib/currencies/mock.d.ts.map +1 -1
- package/lib/currencies/mock.js +30 -0
- package/lib/currencies/mock.js.map +1 -1
- package/lib/currencies/sortByMarketcap.test.js +1 -0
- package/lib/currencies/sortByMarketcap.test.js.map +1 -1
- package/lib/e2e/index.d.ts +3 -0
- package/lib/e2e/index.d.ts.map +1 -1
- package/lib/env.react.d.ts +1 -1
- package/lib/env.react.d.ts.map +1 -1
- package/lib/families/cosmos/datasets/babylon.d.ts +5 -0
- package/lib/families/cosmos/datasets/babylon.d.ts.map +1 -0
- package/lib/families/cosmos/datasets/babylon.integration.test.d.ts +2 -0
- package/lib/families/cosmos/datasets/babylon.integration.test.d.ts.map +1 -0
- package/lib/families/cosmos/datasets/babylon.integration.test.js +16 -0
- package/lib/families/cosmos/datasets/babylon.integration.test.js.map +1 -0
- package/lib/families/cosmos/datasets/babylon.js +72 -0
- package/lib/families/cosmos/datasets/babylon.js.map +1 -0
- package/lib/families/evm/config.d.ts.map +1 -1
- package/lib/families/evm/config.js +1 -0
- package/lib/families/evm/config.js.map +1 -1
- package/lib/featureFlags/defaultFeatures.d.ts +1 -0
- package/lib/featureFlags/defaultFeatures.d.ts.map +1 -1
- package/lib/featureFlags/defaultFeatures.js +1 -0
- package/lib/featureFlags/defaultFeatures.js.map +1 -1
- package/lib/generated/specs.d.ts +33 -0
- package/lib/generated/specs.d.ts.map +1 -1
- package/lib-es/__tests__/test-helpers/environment.js +1 -0
- package/lib-es/__tests__/test-helpers/environment.js.map +1 -1
- package/lib-es/account/helpers.d.ts.map +1 -1
- package/lib-es/account/helpers.js +1 -0
- package/lib-es/account/helpers.js.map +1 -1
- package/lib-es/currencies/mock.d.ts.map +1 -1
- package/lib-es/currencies/mock.js +30 -0
- package/lib-es/currencies/mock.js.map +1 -1
- package/lib-es/currencies/sortByMarketcap.test.js +1 -0
- package/lib-es/currencies/sortByMarketcap.test.js.map +1 -1
- package/lib-es/e2e/index.d.ts +3 -0
- package/lib-es/e2e/index.d.ts.map +1 -1
- package/lib-es/env.react.d.ts +1 -1
- package/lib-es/env.react.d.ts.map +1 -1
- package/lib-es/families/cosmos/datasets/babylon.d.ts +5 -0
- package/lib-es/families/cosmos/datasets/babylon.d.ts.map +1 -0
- package/lib-es/families/cosmos/datasets/babylon.integration.test.d.ts +2 -0
- package/lib-es/families/cosmos/datasets/babylon.integration.test.d.ts.map +1 -0
- package/lib-es/families/cosmos/datasets/babylon.integration.test.js +11 -0
- package/lib-es/families/cosmos/datasets/babylon.integration.test.js.map +1 -0
- package/lib-es/families/cosmos/datasets/babylon.js +70 -0
- package/lib-es/families/cosmos/datasets/babylon.js.map +1 -0
- package/lib-es/families/evm/config.d.ts.map +1 -1
- package/lib-es/families/evm/config.js +1 -0
- package/lib-es/families/evm/config.js.map +1 -1
- package/lib-es/featureFlags/defaultFeatures.d.ts +1 -0
- package/lib-es/featureFlags/defaultFeatures.d.ts.map +1 -1
- package/lib-es/featureFlags/defaultFeatures.js +1 -0
- package/lib-es/featureFlags/defaultFeatures.js.map +1 -1
- package/lib-es/generated/specs.d.ts +33 -0
- package/lib-es/generated/specs.d.ts.map +1 -1
- package/package.json +55 -55
- package/src/__tests__/test-helpers/environment.ts +1 -0
- package/src/account/helpers.ts +1 -0
- package/src/currencies/mock.ts +30 -0
- package/src/currencies/sortByMarketcap.test.ts +1 -0
- package/src/families/cosmos/datasets/__snapshots__/babylon.integration.test.ts.snap +146 -0
- package/src/families/cosmos/datasets/__snapshots__/cosmos.integration.test.ts.snap +151 -4
- package/src/families/cosmos/datasets/__snapshots__/cryptoOrg.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/babylon.integration.test.ts +14 -0
- package/src/families/cosmos/datasets/babylon.ts +73 -0
- package/src/families/evm/config.ts +1 -0
- package/src/featureFlags/defaultFeatures.ts +1 -0
@@ -0,0 +1,14 @@
|
|
1
|
+
import { DatasetTest } from "@ledgerhq/types-live";
|
2
|
+
import { testBridge } from "../../../__tests__/test-helpers/bridge";
|
3
|
+
import "../../../__tests__/test-helpers/setup";
|
4
|
+
import babylon from "./babylon";
|
5
|
+
import type { Transaction } from "../types";
|
6
|
+
|
7
|
+
const dataset: DatasetTest<Transaction> = {
|
8
|
+
implementations: ["js"],
|
9
|
+
currencies: {
|
10
|
+
babylon,
|
11
|
+
},
|
12
|
+
};
|
13
|
+
|
14
|
+
testBridge(dataset);
|
@@ -0,0 +1,73 @@
|
|
1
|
+
import { CurrenciesData } from "@ledgerhq/types-live";
|
2
|
+
import type { Transaction } from "../types";
|
3
|
+
import { fromTransactionRaw } from "@ledgerhq/coin-cosmos/transaction";
|
4
|
+
import { BigNumber } from "bignumber.js";
|
5
|
+
|
6
|
+
const dataset: CurrenciesData<Transaction> = {
|
7
|
+
FIXME_ignoreAccountFields: ["cosmosResources", "operationsCount", "operations"],
|
8
|
+
FIXME_ignorePreloadFields: ["validators"], // the APY of validators changes over time
|
9
|
+
scanAccounts: [
|
10
|
+
{
|
11
|
+
name: "babylon seed 1",
|
12
|
+
apdus: `
|
13
|
+
=> 55040000180362626e2c00008076000080000000800000000000000000
|
14
|
+
<= 0388459b2653519948b12492f1a0b464720110c147a8155d23d423a5cc3c21d89a62626e316738343933346a70753376356465357971756b6b6b68786d6376737733753261396361736a789000
|
15
|
+
=> 55040000180362626e2c00008076000080000000800000000000000000
|
16
|
+
<= 0388459b2653519948b12492f1a0b464720110c147a8155d23d423a5cc3c21d89a62626e316738343933346a70753376356465357971756b6b6b68786d6376737733753261396361736a789000
|
17
|
+
=> 55040000180362626e2c00008076000080010000800000000000000000
|
18
|
+
<= 02624ac83690d5ef627927104767d679aef73d3d3c9544abe4206b1d0c463c94ff62626e31303875793571396a743539677775677135797264686b7a6364396a7279736c6d6b78703666649000
|
19
|
+
=> 55040000180362626e2c00008076000080020000800000000000000000
|
20
|
+
<= 038ff98278402aa3e46ccfd020561dc9724ab63d7179ca507c8154b5257c7d520062626e3163676336393661793270673664346763656a656b3279386c6136366a37653579787830386d689000
|
21
|
+
`,
|
22
|
+
},
|
23
|
+
],
|
24
|
+
accounts: [
|
25
|
+
{
|
26
|
+
FIXME_tests: ["balance is sum of ops", "pendingOperations are cleaned up"],
|
27
|
+
raw: {
|
28
|
+
id: "js:2:babylon:bbn1g84934jpu3v5de5yqukkkhxmcvsw3u2a9casjx:",
|
29
|
+
seedIdentifier: "0388459b2653519948b12492f1a0b464720110c147a8155d23d423a5cc3c21d89a",
|
30
|
+
xpub: "bbn1g84934jpu3v5de5yqukkkhxmcvsw3u2a9casjx",
|
31
|
+
derivationMode: "",
|
32
|
+
index: 0,
|
33
|
+
freshAddress: "bbn1g84934jpu3v5de5yqukkkhxmcvsw3u2a9casjx",
|
34
|
+
freshAddressPath: "44'/118'/0'/0/0",
|
35
|
+
name: "Babylon 1 - Nano X",
|
36
|
+
blockHeight: 71848,
|
37
|
+
balance: "40699912",
|
38
|
+
spendableBalance: "40699912",
|
39
|
+
operations: [],
|
40
|
+
operationsCount: 2,
|
41
|
+
pendingOperations: [],
|
42
|
+
currencyId: "babylon",
|
43
|
+
lastSyncDate: "",
|
44
|
+
creationDate: "2025-04-10T15:47:19.000Z",
|
45
|
+
},
|
46
|
+
transactions: [
|
47
|
+
{
|
48
|
+
name: "Normal transaction",
|
49
|
+
transaction: fromTransactionRaw({
|
50
|
+
amount: "1000000",
|
51
|
+
recipient: "bbn1vh34djka7ug2gww9njrsmmr7emj3dx3paz5sj4",
|
52
|
+
useAllAmount: false,
|
53
|
+
family: "cosmos",
|
54
|
+
mode: "send",
|
55
|
+
networkInfo: null,
|
56
|
+
fees: "213",
|
57
|
+
gas: "106317",
|
58
|
+
validators: [],
|
59
|
+
memo: "",
|
60
|
+
sourceValidator: "",
|
61
|
+
}),
|
62
|
+
expectedStatus: () => ({
|
63
|
+
errors: {},
|
64
|
+
warnings: {},
|
65
|
+
amount: BigNumber("1000000"),
|
66
|
+
}),
|
67
|
+
},
|
68
|
+
],
|
69
|
+
},
|
70
|
+
],
|
71
|
+
};
|
72
|
+
|
73
|
+
export default dataset;
|