@ledgerhq/coin-icon 0.13.0-nightly.9 → 0.13.1-nightly.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.
@@ -1,4 +1,4 @@
1
1
 
2
- > @ledgerhq/coin-icon@0.13.0-nightly.8 build /home/runner/work/ledger-live/ledger-live/libs/coin-modules/coin-icon
2
+ > @ledgerhq/coin-icon@0.13.0 build /home/runner/work/ledger-live/ledger-live/libs/coin-modules/coin-icon
3
3
  > tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es
4
4
 
@@ -26,7 +26,8 @@
26
26
  "src/prepareTransaction.ts",
27
27
  "src/signOperation.ts",
28
28
  "src/synchronization.ts",
29
- "src/types/bridge.fixture.ts"
29
+ "src/types/bridge.fixture.ts",
30
+ "src/test/bridge.dataset.ts"
30
31
  ],
31
32
  "ignoreUnresolved": [],
32
33
  "ignoreUnused": [
package/CHANGELOG.md CHANGED
@@ -1,93 +1,40 @@
1
1
  # @ledgerhq/coin-algorand
2
2
 
3
- ## 0.13.0-nightly.9
3
+ ## 0.13.1-nightly.0
4
4
 
5
5
  ### Patch Changes
6
6
 
7
- - Updated dependencies [[`da750a1`](https://github.com/LedgerHQ/ledger-live/commit/da750a16ee5f2c083114569b8ae3c708cceba06c), [`36e5168`](https://github.com/LedgerHQ/ledger-live/commit/36e5168397eaec2a5f425038392a4400f60571d0), [`d9305e8`](https://github.com/LedgerHQ/ledger-live/commit/d9305e8a4d8364366aaba05dd698396d28b539dc)]:
8
- - @ledgerhq/types-cryptoassets@7.29.0-nightly.1
9
- - @ledgerhq/cryptoassets@13.31.0-nightly.8
10
- - @ledgerhq/coin-framework@6.7.0-nightly.9
11
- - @ledgerhq/types-live@6.87.0-nightly.5
7
+ - Updated dependencies [[`2c6a198`](https://github.com/LedgerHQ/ledger-live/commit/2c6a198ba28391695202a0787ce168c53768ff37)]:
8
+ - @ledgerhq/types-live@6.88.0-nightly.0
9
+ - @ledgerhq/coin-framework@6.7.1-nightly.0
10
+ - @ledgerhq/cryptoassets@13.31.1-nightly.0
12
11
 
13
- ## 0.13.0-nightly.8
12
+ ## 0.13.0
14
13
 
15
- ### Patch Changes
16
-
17
- - Updated dependencies [[`c96d73f`](https://github.com/LedgerHQ/ledger-live/commit/c96d73fed0a75a9c208f78d51c34b742703a7dda)]:
18
- - @ledgerhq/coin-framework@6.7.0-nightly.8
19
-
20
- ## 0.13.0-nightly.7
21
-
22
- ### Patch Changes
23
-
24
- - Updated dependencies [[`b4ceaff`](https://github.com/LedgerHQ/ledger-live/commit/b4ceaff2ecf68d8a14e09801c76ab0b014c45286), [`f392f69`](https://github.com/LedgerHQ/ledger-live/commit/f392f6912f445cc2f7cf4dfcfd030fa3da76f736), [`cbc0648`](https://github.com/LedgerHQ/ledger-live/commit/cbc064885d8e0459e40d327a2e5389204b3ec705)]:
25
- - @ledgerhq/cryptoassets@13.31.0-nightly.7
26
- - @ledgerhq/types-live@6.87.0-nightly.5
27
- - @ledgerhq/live-env@2.19.0-nightly.2
28
- - @ledgerhq/coin-framework@6.7.0-nightly.7
29
- - @ledgerhq/live-network@2.0.20-nightly.3
30
-
31
- ## 0.13.0-nightly.6
32
-
33
- ### Patch Changes
34
-
35
- - Updated dependencies [[`51995e9`](https://github.com/LedgerHQ/ledger-live/commit/51995e96a9e1fafe14c7cbe45ce0b1ec8ebd106b)]:
36
- - @ledgerhq/types-live@6.87.0-nightly.4
37
- - @ledgerhq/coin-framework@6.7.0-nightly.6
38
- - @ledgerhq/cryptoassets@13.31.0-nightly.6
39
-
40
- ## 0.13.0-nightly.5
41
-
42
- ### Patch Changes
43
-
44
- - Updated dependencies [[`cadf2e1`](https://github.com/LedgerHQ/ledger-live/commit/cadf2e1dfb09248d3f77d96f94ae774425dbca75)]:
45
- - @ledgerhq/live-env@2.19.0-nightly.1
46
- - @ledgerhq/coin-framework@6.7.0-nightly.5
47
- - @ledgerhq/cryptoassets@13.31.0-nightly.5
48
- - @ledgerhq/live-network@2.0.20-nightly.2
49
-
50
- ## 0.13.0-nightly.4
51
-
52
- ### Patch Changes
53
-
54
- - Updated dependencies [[`7744980`](https://github.com/LedgerHQ/ledger-live/commit/774498090411f1a6d6c06395dda1fc7cd24adf24), [`759064d`](https://github.com/LedgerHQ/ledger-live/commit/759064d4815c636af2d73ba548a85b4f53e7b491)]:
55
- - @ledgerhq/types-live@6.87.0-nightly.3
56
- - @ledgerhq/errors@6.27.0-nightly.0
57
- - @ledgerhq/coin-framework@6.7.0-nightly.4
58
- - @ledgerhq/cryptoassets@13.31.0-nightly.4
59
- - @ledgerhq/devices@8.6.2-nightly.0
60
- - @ledgerhq/live-network@2.0.20-nightly.1
61
-
62
- ## 0.13.0-nightly.3
63
-
64
- ### Patch Changes
65
-
66
- - Updated dependencies [[`8645f01`](https://github.com/LedgerHQ/ledger-live/commit/8645f016191d29a55f6b0ca6e4b1d1909fd35445)]:
67
- - @ledgerhq/types-live@6.87.0-nightly.2
68
- - @ledgerhq/coin-framework@6.7.0-nightly.3
69
- - @ledgerhq/cryptoassets@13.31.0-nightly.3
14
+ ### Minor Changes
70
15
 
71
- ## 0.13.0-nightly.2
16
+ - [#12015](https://github.com/LedgerHQ/ledger-live/pull/12015) [`03af552`](https://github.com/LedgerHQ/ledger-live/commit/03af552b621e19e31747a65b1870dfe8d3bb005b) Thanks [@Justkant](https://github.com/Justkant)! - feat: new signRawTransaction to support any XRP transaction with wallet-api
72
17
 
73
18
  ### Patch Changes
74
19
 
75
- - Updated dependencies [[`c6a676f`](https://github.com/LedgerHQ/ledger-live/commit/c6a676ff80581ac19b896adf44d54812983b72da), [`565da80`](https://github.com/LedgerHQ/ledger-live/commit/565da807b1ebbfc830fd0e47b3d8856f88d410a6)]:
76
- - @ledgerhq/coin-framework@6.7.0-nightly.2
77
- - @ledgerhq/cryptoassets@13.31.0-nightly.2
20
+ - Updated dependencies [[`ea16f59`](https://github.com/LedgerHQ/ledger-live/commit/ea16f592e85019a1b77287a7f2b975c6fcffc74c), [`b88faa1`](https://github.com/LedgerHQ/ledger-live/commit/b88faa18e2f5cd309b54fc3157a44db606846cc5), [`cfe65ca`](https://github.com/LedgerHQ/ledger-live/commit/cfe65cafa268be4e53197ee163ce78f28ed72592), [`a9aacdb`](https://github.com/LedgerHQ/ledger-live/commit/a9aacdb330700f0a294833f7d77de17f179229b2), [`3979c07`](https://github.com/LedgerHQ/ledger-live/commit/3979c0715e4f54165c89d00ebe1441e064e1a110), [`f1f3845`](https://github.com/LedgerHQ/ledger-live/commit/f1f3845942e4cbce9c585dc65f6170ddbc319f19), [`c6a676f`](https://github.com/LedgerHQ/ledger-live/commit/c6a676ff80581ac19b896adf44d54812983b72da), [`b5fc1bd`](https://github.com/LedgerHQ/ledger-live/commit/b5fc1bd28fff091241905fec5ff8dc8af4c99b79), [`03af552`](https://github.com/LedgerHQ/ledger-live/commit/03af552b621e19e31747a65b1870dfe8d3bb005b), [`89ac0ed`](https://github.com/LedgerHQ/ledger-live/commit/89ac0eddc145dcf5c7cf240aa8be4301372c8f33), [`565da80`](https://github.com/LedgerHQ/ledger-live/commit/565da807b1ebbfc830fd0e47b3d8856f88d410a6), [`8645f01`](https://github.com/LedgerHQ/ledger-live/commit/8645f016191d29a55f6b0ca6e4b1d1909fd35445), [`1d9860c`](https://github.com/LedgerHQ/ledger-live/commit/1d9860cd1688131d391579955b40c6710b667db8), [`d2b12e7`](https://github.com/LedgerHQ/ledger-live/commit/d2b12e70bba9e772d078d1fe4d9c537b8d316a87), [`db25e21`](https://github.com/LedgerHQ/ledger-live/commit/db25e212b87dea426b153c6f1d988cead63c8c46), [`c8dbf40`](https://github.com/LedgerHQ/ledger-live/commit/c8dbf402268359e225a94782420111e786f875fa), [`cab7d97`](https://github.com/LedgerHQ/ledger-live/commit/cab7d9794e7babb8220c6d339fb08e618e3d4202)]:
21
+ - @ledgerhq/cryptoassets@13.31.0
22
+ - @ledgerhq/types-live@6.87.0
23
+ - @ledgerhq/coin-framework@6.7.0
24
+ - @ledgerhq/live-env@2.19.0
25
+ - @ledgerhq/types-cryptoassets@7.29.0
26
+ - @ledgerhq/live-network@2.0.20
78
27
 
79
- ## 0.13.0-nightly.1
28
+ ## 0.13.0-next.1
80
29
 
81
30
  ### Patch Changes
82
31
 
83
- - Updated dependencies [[`ea16f59`](https://github.com/LedgerHQ/ledger-live/commit/ea16f592e85019a1b77287a7f2b975c6fcffc74c), [`a9aacdb`](https://github.com/LedgerHQ/ledger-live/commit/a9aacdb330700f0a294833f7d77de17f179229b2), [`f1f3845`](https://github.com/LedgerHQ/ledger-live/commit/f1f3845942e4cbce9c585dc65f6170ddbc319f19), [`89ac0ed`](https://github.com/LedgerHQ/ledger-live/commit/89ac0eddc145dcf5c7cf240aa8be4301372c8f33), [`db25e21`](https://github.com/LedgerHQ/ledger-live/commit/db25e212b87dea426b153c6f1d988cead63c8c46)]:
84
- - @ledgerhq/cryptoassets@13.31.0-nightly.1
85
- - @ledgerhq/types-live@6.87.0-nightly.1
86
- - @ledgerhq/live-env@2.19.0-nightly.0
87
- - @ledgerhq/coin-framework@6.7.0-nightly.1
88
- - @ledgerhq/live-network@2.0.20-nightly.0
32
+ - Updated dependencies [[`b88faa1`](https://github.com/LedgerHQ/ledger-live/commit/b88faa18e2f5cd309b54fc3157a44db606846cc5)]:
33
+ - @ledgerhq/types-live@6.87.0-next.1
34
+ - @ledgerhq/coin-framework@6.7.0-next.1
35
+ - @ledgerhq/cryptoassets@13.31.0-next.1
89
36
 
90
- ## 0.13.0-nightly.0
37
+ ## 0.13.0-next.0
91
38
 
92
39
  ### Minor Changes
93
40
 
@@ -95,11 +42,13 @@
95
42
 
96
43
  ### Patch Changes
97
44
 
98
- - Updated dependencies [[`cfe65ca`](https://github.com/LedgerHQ/ledger-live/commit/cfe65cafa268be4e53197ee163ce78f28ed72592), [`b5fc1bd`](https://github.com/LedgerHQ/ledger-live/commit/b5fc1bd28fff091241905fec5ff8dc8af4c99b79), [`03af552`](https://github.com/LedgerHQ/ledger-live/commit/03af552b621e19e31747a65b1870dfe8d3bb005b), [`d2b12e7`](https://github.com/LedgerHQ/ledger-live/commit/d2b12e70bba9e772d078d1fe4d9c537b8d316a87), [`cab7d97`](https://github.com/LedgerHQ/ledger-live/commit/cab7d9794e7babb8220c6d339fb08e618e3d4202)]:
99
- - @ledgerhq/cryptoassets@13.31.0-nightly.0
100
- - @ledgerhq/types-live@6.87.0-nightly.0
101
- - @ledgerhq/coin-framework@6.7.0-nightly.0
102
- - @ledgerhq/types-cryptoassets@7.29.0-nightly.0
45
+ - Updated dependencies [[`ea16f59`](https://github.com/LedgerHQ/ledger-live/commit/ea16f592e85019a1b77287a7f2b975c6fcffc74c), [`cfe65ca`](https://github.com/LedgerHQ/ledger-live/commit/cfe65cafa268be4e53197ee163ce78f28ed72592), [`a9aacdb`](https://github.com/LedgerHQ/ledger-live/commit/a9aacdb330700f0a294833f7d77de17f179229b2), [`3979c07`](https://github.com/LedgerHQ/ledger-live/commit/3979c0715e4f54165c89d00ebe1441e064e1a110), [`f1f3845`](https://github.com/LedgerHQ/ledger-live/commit/f1f3845942e4cbce9c585dc65f6170ddbc319f19), [`c6a676f`](https://github.com/LedgerHQ/ledger-live/commit/c6a676ff80581ac19b896adf44d54812983b72da), [`b5fc1bd`](https://github.com/LedgerHQ/ledger-live/commit/b5fc1bd28fff091241905fec5ff8dc8af4c99b79), [`03af552`](https://github.com/LedgerHQ/ledger-live/commit/03af552b621e19e31747a65b1870dfe8d3bb005b), [`89ac0ed`](https://github.com/LedgerHQ/ledger-live/commit/89ac0eddc145dcf5c7cf240aa8be4301372c8f33), [`565da80`](https://github.com/LedgerHQ/ledger-live/commit/565da807b1ebbfc830fd0e47b3d8856f88d410a6), [`8645f01`](https://github.com/LedgerHQ/ledger-live/commit/8645f016191d29a55f6b0ca6e4b1d1909fd35445), [`1d9860c`](https://github.com/LedgerHQ/ledger-live/commit/1d9860cd1688131d391579955b40c6710b667db8), [`d2b12e7`](https://github.com/LedgerHQ/ledger-live/commit/d2b12e70bba9e772d078d1fe4d9c537b8d316a87), [`db25e21`](https://github.com/LedgerHQ/ledger-live/commit/db25e212b87dea426b153c6f1d988cead63c8c46), [`c8dbf40`](https://github.com/LedgerHQ/ledger-live/commit/c8dbf402268359e225a94782420111e786f875fa), [`cab7d97`](https://github.com/LedgerHQ/ledger-live/commit/cab7d9794e7babb8220c6d339fb08e618e3d4202)]:
46
+ - @ledgerhq/cryptoassets@13.31.0-next.0
47
+ - @ledgerhq/types-live@6.87.0-next.0
48
+ - @ledgerhq/coin-framework@6.7.0-next.0
49
+ - @ledgerhq/live-env@2.19.0-next.0
50
+ - @ledgerhq/types-cryptoassets@7.29.0-next.0
51
+ - @ledgerhq/live-network@2.0.20-next.0
103
52
 
104
53
  ## 0.12.3
105
54
 
@@ -0,0 +1,4 @@
1
+ import type { DatasetTest } from "@ledgerhq/types-live";
2
+ import type { Transaction } from "../types";
3
+ export declare const dataset: DatasetTest<Transaction>;
4
+ //# sourceMappingURL=bridge.dataset.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bridge.dataset.d.ts","sourceRoot":"","sources":["../../src/test/bridge.dataset.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAkB,MAAM,sBAAsB,CAAC;AACxE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAoG5C,eAAO,MAAM,OAAO,EAAE,WAAW,CAAC,WAAW,CAK5C,CAAC"}
@@ -0,0 +1,105 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.dataset = void 0;
7
+ const transaction_1 = require("../transaction");
8
+ const bignumber_js_1 = __importDefault(require("bignumber.js"));
9
+ const errors_1 = require("@ledgerhq/errors");
10
+ const TEST_ADDRESS = "hxe52720d9125586e64c745bf3c2c1917dbb46f9ba";
11
+ const icon = {
12
+ scanAccounts: [
13
+ {
14
+ name: "icon seed 1",
15
+ apdus: `
16
+ => e00200010d038000002c8049435880000000
17
+ <= 410426dd3cdd69f3604e9c1d8f3021b20e133524f12894b9ef8e35d3f1f5244516d18b7bb0d1fee7b7c2972d5cde08190d66cf932d0addd5ac87f53198d050940ccb2a6878626232396531313463626434303939346136346462303137626363323233616661353135363966669fd5109b2b2077b50f18fee878efef03cef0cfb5c3256ea9e55f44fa0e9ae5289000
18
+ => e002000115058000002c80494358800000008000000080000000
19
+ <= 4104c1142d5b765d3026e801fd3946d9673051c7e3c3bd0eecd8ca27b6be079c9ee6b7b9f311b9eecb2995efd7e4a7ef9287a7f8878751d3227689c25a324270e8082a687863663465326339346235323631396637326161346461313333373061613663316333646164303064ff4e5e0cebe9462a469955997216658ce22953f79d272a6a1ecf3b3cdcb3549a9000
20
+ => e002000115058000002c80494358800000008000000080000001
21
+ <= 410429e40c4a50f96a32b622e218114c9204f66763c997dadb8c719a95d3a2d98fda3b00ccc9f3d491906d453fa2a63298817eb6af94c77a47f5eb4baa43cbb73a832a6878666330343962346365363063633539363834383764313830643963343236336536333138313733392ed566d1841e629d6f3040a23918ee84015fb60b99824d7dcadde65bcb01bb089000
22
+ => e002000115058000002c80494358800000008000000080000002
23
+ <= 41040310ab9742ae76a33cfb81fbb90f7d2c16af8dbe543cea73dc62dda4eb79eea4363cabad566329103dc8c6d1f29d6e005d608e35d97d80337e1ca5fd07f3da5b2a6878303139393332346162343038343733313565633339373264313738316239646363643136323061650ce87de91bb446401889398f585fc09a525bf7841dc254d94def7023b40523069000
24
+ `,
25
+ },
26
+ ],
27
+ accounts: [
28
+ {
29
+ FIXME_tests: ["balance is sum of ops"],
30
+ raw: {
31
+ id: `js:2:icon:${TEST_ADDRESS}:`,
32
+ seedIdentifier: `${TEST_ADDRESS}`,
33
+ name: "ICON 1",
34
+ derivationMode: "",
35
+ index: 0,
36
+ freshAddress: `${TEST_ADDRESS}`,
37
+ freshAddressPath: "44'/4801368'/0'/0'/0'",
38
+ blockHeight: 0,
39
+ operations: [],
40
+ pendingOperations: [],
41
+ currencyId: "icon",
42
+ lastSyncDate: "",
43
+ balance: "299569965",
44
+ },
45
+ transactions: [
46
+ {
47
+ name: "recipient and sender must not be the same",
48
+ transaction: (0, transaction_1.fromTransactionRaw)({
49
+ family: "icon",
50
+ recipient: `${TEST_ADDRESS}`,
51
+ amount: "100000000",
52
+ mode: "send",
53
+ fees: "0.00125",
54
+ }),
55
+ expectedStatus: {
56
+ amount: new bignumber_js_1.default("100000000"),
57
+ errors: {
58
+ recipient: new errors_1.InvalidAddressBecauseDestinationIsAlsoSource(),
59
+ },
60
+ warnings: {},
61
+ },
62
+ },
63
+ {
64
+ name: "Not a valid address",
65
+ transaction: (0, transaction_1.fromTransactionRaw)({
66
+ family: "icon",
67
+ recipient: "iconinv",
68
+ amount: "100000000",
69
+ mode: "send",
70
+ fees: null,
71
+ }),
72
+ expectedStatus: {
73
+ errors: {
74
+ recipient: new errors_1.InvalidAddress(),
75
+ },
76
+ warnings: {},
77
+ },
78
+ },
79
+ {
80
+ name: "Not enough balance",
81
+ transaction: (0, transaction_1.fromTransactionRaw)({
82
+ family: "icon",
83
+ recipient: "hxedaf3b2027fbbc0a31f589299c0b34533cd8edac",
84
+ amount: "1000000000000000000000000",
85
+ mode: "send",
86
+ fees: null,
87
+ }),
88
+ expectedStatus: {
89
+ errors: {
90
+ amount: new errors_1.NotEnoughBalance(),
91
+ },
92
+ warnings: {},
93
+ },
94
+ },
95
+ ],
96
+ },
97
+ ],
98
+ };
99
+ exports.dataset = {
100
+ implementations: ["js"],
101
+ currencies: {
102
+ icon,
103
+ },
104
+ };
105
+ //# sourceMappingURL=bridge.dataset.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bridge.dataset.js","sourceRoot":"","sources":["../../src/test/bridge.dataset.ts"],"names":[],"mappings":";;;;;;AAEA,gDAAoD;AACpD,gEAAqC;AACrC,6CAI0B;AAE1B,MAAM,YAAY,GAAG,4CAA4C,CAAC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ACN,SAAS,EAAE,IAAI,uBAAc,EAAE;yBAChC;wBACD,QAAQ,EAAE,EAAE;qBACb;iBACF;gBACD;oBACE,IAAI,EAAE,oBAAoB;oBAC1B,WAAW,EAAE,IAAA,gCAAkB,EAAC;wBAC9B,MAAM,EAAE,MAAM;wBACd,SAAS,EAAE,4CAA4C;wBACvD,MAAM,EAAE,2BAA2B;wBACnC,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,IAAI;qBACX,CAAC;oBACF,cAAc,EAAE;wBACd,MAAM,EAAE;4BACN,MAAM,EAAE,IAAI,yBAAgB,EAAE;yBAC/B;wBACD,QAAQ,EAAE,EAAE;qBACb;iBACF;aACF;SACF;KACF;CACF,CAAC;AAEW,QAAA,OAAO,GAA6B;IAC/C,eAAe,EAAE,CAAC,IAAI,CAAC;IACvB,UAAU,EAAE;QACV,IAAI;KACL;CACF,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { DatasetTest } from "@ledgerhq/types-live";
2
+ import type { Transaction } from "../types";
3
+ export declare const dataset: DatasetTest<Transaction>;
4
+ //# sourceMappingURL=bridge.dataset.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bridge.dataset.d.ts","sourceRoot":"","sources":["../../src/test/bridge.dataset.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAkB,MAAM,sBAAsB,CAAC;AACxE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAoG5C,eAAO,MAAM,OAAO,EAAE,WAAW,CAAC,WAAW,CAK5C,CAAC"}
@@ -0,0 +1,99 @@
1
+ import { fromTransactionRaw } from "../transaction";
2
+ import BigNumber from "bignumber.js";
3
+ import { InvalidAddressBecauseDestinationIsAlsoSource, InvalidAddress, NotEnoughBalance, } from "@ledgerhq/errors";
4
+ const TEST_ADDRESS = "hxe52720d9125586e64c745bf3c2c1917dbb46f9ba";
5
+ const icon = {
6
+ scanAccounts: [
7
+ {
8
+ name: "icon seed 1",
9
+ apdus: `
10
+ => e00200010d038000002c8049435880000000
11
+ <= 410426dd3cdd69f3604e9c1d8f3021b20e133524f12894b9ef8e35d3f1f5244516d18b7bb0d1fee7b7c2972d5cde08190d66cf932d0addd5ac87f53198d050940ccb2a6878626232396531313463626434303939346136346462303137626363323233616661353135363966669fd5109b2b2077b50f18fee878efef03cef0cfb5c3256ea9e55f44fa0e9ae5289000
12
+ => e002000115058000002c80494358800000008000000080000000
13
+ <= 4104c1142d5b765d3026e801fd3946d9673051c7e3c3bd0eecd8ca27b6be079c9ee6b7b9f311b9eecb2995efd7e4a7ef9287a7f8878751d3227689c25a324270e8082a687863663465326339346235323631396637326161346461313333373061613663316333646164303064ff4e5e0cebe9462a469955997216658ce22953f79d272a6a1ecf3b3cdcb3549a9000
14
+ => e002000115058000002c80494358800000008000000080000001
15
+ <= 410429e40c4a50f96a32b622e218114c9204f66763c997dadb8c719a95d3a2d98fda3b00ccc9f3d491906d453fa2a63298817eb6af94c77a47f5eb4baa43cbb73a832a6878666330343962346365363063633539363834383764313830643963343236336536333138313733392ed566d1841e629d6f3040a23918ee84015fb60b99824d7dcadde65bcb01bb089000
16
+ => e002000115058000002c80494358800000008000000080000002
17
+ <= 41040310ab9742ae76a33cfb81fbb90f7d2c16af8dbe543cea73dc62dda4eb79eea4363cabad566329103dc8c6d1f29d6e005d608e35d97d80337e1ca5fd07f3da5b2a6878303139393332346162343038343733313565633339373264313738316239646363643136323061650ce87de91bb446401889398f585fc09a525bf7841dc254d94def7023b40523069000
18
+ `,
19
+ },
20
+ ],
21
+ accounts: [
22
+ {
23
+ FIXME_tests: ["balance is sum of ops"],
24
+ raw: {
25
+ id: `js:2:icon:${TEST_ADDRESS}:`,
26
+ seedIdentifier: `${TEST_ADDRESS}`,
27
+ name: "ICON 1",
28
+ derivationMode: "",
29
+ index: 0,
30
+ freshAddress: `${TEST_ADDRESS}`,
31
+ freshAddressPath: "44'/4801368'/0'/0'/0'",
32
+ blockHeight: 0,
33
+ operations: [],
34
+ pendingOperations: [],
35
+ currencyId: "icon",
36
+ lastSyncDate: "",
37
+ balance: "299569965",
38
+ },
39
+ transactions: [
40
+ {
41
+ name: "recipient and sender must not be the same",
42
+ transaction: fromTransactionRaw({
43
+ family: "icon",
44
+ recipient: `${TEST_ADDRESS}`,
45
+ amount: "100000000",
46
+ mode: "send",
47
+ fees: "0.00125",
48
+ }),
49
+ expectedStatus: {
50
+ amount: new BigNumber("100000000"),
51
+ errors: {
52
+ recipient: new InvalidAddressBecauseDestinationIsAlsoSource(),
53
+ },
54
+ warnings: {},
55
+ },
56
+ },
57
+ {
58
+ name: "Not a valid address",
59
+ transaction: fromTransactionRaw({
60
+ family: "icon",
61
+ recipient: "iconinv",
62
+ amount: "100000000",
63
+ mode: "send",
64
+ fees: null,
65
+ }),
66
+ expectedStatus: {
67
+ errors: {
68
+ recipient: new InvalidAddress(),
69
+ },
70
+ warnings: {},
71
+ },
72
+ },
73
+ {
74
+ name: "Not enough balance",
75
+ transaction: fromTransactionRaw({
76
+ family: "icon",
77
+ recipient: "hxedaf3b2027fbbc0a31f589299c0b34533cd8edac",
78
+ amount: "1000000000000000000000000",
79
+ mode: "send",
80
+ fees: null,
81
+ }),
82
+ expectedStatus: {
83
+ errors: {
84
+ amount: new NotEnoughBalance(),
85
+ },
86
+ warnings: {},
87
+ },
88
+ },
89
+ ],
90
+ },
91
+ ],
92
+ };
93
+ export const dataset = {
94
+ implementations: ["js"],
95
+ currencies: {
96
+ icon,
97
+ },
98
+ };
99
+ //# sourceMappingURL=bridge.dataset.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bridge.dataset.js","sourceRoot":"","sources":["../../src/test/bridge.dataset.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,SAAS,MAAM,cAAc,CAAC;AACrC,OAAO,EACL,4CAA4C,EAC5C,cAAc,EACd,gBAAgB,GACjB,MAAM,kBAAkB,CAAC;AAE1B,MA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,MAAM,EAAE;4BACN,SAAS,EAAE,IAAI,cAAc,EAAE;yBAChC;wBACD,QAAQ,EAAE,EAAE;qBACb;iBACF;gBACD;oBACE,IAAI,EAAE,oBAAoB;oBAC1B,WAAW,EAAE,kBAAkB,CAAC;wBAC9B,MAAM,EAAE,MAAM;wBACd,SAAS,EAAE,4CAA4C;wBACvD,MAAM,EAAE,2BAA2B;wBACnC,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,IAAI;qBACX,CAAC;oBACF,cAAc,EAAE;wBACd,MAAM,EAAE;4BACN,MAAM,EAAE,IAAI,gBAAgB,EAAE;yBAC/B;wBACD,QAAQ,EAAE,EAAE;qBACb;iBACF;aACF;SACF;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAA6B;IAC/C,eAAe,EAAE,CAAC,IAAI,CAAC;IACvB,UAAU,EAAE;QACV,IAAI;KACL;CACF,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ledgerhq/coin-icon",
3
- "version": "0.13.0-nightly.9",
3
+ "version": "0.13.1-nightly.0",
4
4
  "description": "Ledger Icon Coin integration",
5
5
  "keywords": [
6
6
  "Ledger",
@@ -52,16 +52,16 @@
52
52
  "lodash": "^4.17.21",
53
53
  "prando": "^6.0.1",
54
54
  "rxjs": "^7.8.1",
55
- "@ledgerhq/coin-framework": "^6.7.0-nightly.9",
56
- "@ledgerhq/cryptoassets": "^13.31.0-nightly.8",
57
- "@ledgerhq/live-env": "^2.19.0-nightly.2",
58
- "@ledgerhq/live-network": "^2.0.20-nightly.3",
55
+ "@ledgerhq/coin-framework": "^6.7.1-nightly.0",
56
+ "@ledgerhq/cryptoassets": "^13.31.1-nightly.0",
57
+ "@ledgerhq/devices": "8.6.2-nightly.0",
59
58
  "@ledgerhq/errors": "^6.27.0-nightly.0",
59
+ "@ledgerhq/live-env": "^2.19.0",
60
+ "@ledgerhq/live-network": "^2.0.20",
60
61
  "@ledgerhq/live-promise": "^0.1.1",
61
62
  "@ledgerhq/logs": "^6.13.0",
62
- "@ledgerhq/types-cryptoassets": "^7.29.0-nightly.1",
63
- "@ledgerhq/types-live": "^6.87.0-nightly.5",
64
- "@ledgerhq/devices": "8.6.2-nightly.0"
63
+ "@ledgerhq/types-cryptoassets": "^7.29.0",
64
+ "@ledgerhq/types-live": "^6.88.0-nightly.0"
65
65
  },
66
66
  "devDependencies": {
67
67
  "@types/invariant": "^2.2.2",
@@ -1,6 +1,6 @@
1
1
  import type { DatasetTest, CurrenciesData } from "@ledgerhq/types-live";
2
- import type { Transaction } from "./types";
3
- import { fromTransactionRaw } from "./transaction";
2
+ import type { Transaction } from "../types";
3
+ import { fromTransactionRaw } from "../transaction";
4
4
  import BigNumber from "bignumber.js";
5
5
  import {
6
6
  InvalidAddressBecauseDestinationIsAlsoSource,