@ledgerhq/coin-hedera 1.8.2 → 1.8.3-nightly.1
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 +30 -0
- package/.turbo/turbo-build.log +1 -1
- package/CHANGELOG.md +19 -0
- package/lib/logic.test.js +8 -4
- package/lib/logic.test.js.map +1 -1
- package/lib-es/logic.test.js +8 -4
- package/lib-es/logic.test.js.map +1 -1
- package/package.json +11 -10
- package/src/logic.test.ts +8 -4
package/.eslintrc.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
env: {
|
|
3
|
+
browser: true,
|
|
4
|
+
es6: true,
|
|
5
|
+
},
|
|
6
|
+
overrides: [
|
|
7
|
+
{
|
|
8
|
+
files: ["src/**/*.test.{ts,tsx}"],
|
|
9
|
+
env: {
|
|
10
|
+
"jest/globals": true,
|
|
11
|
+
},
|
|
12
|
+
plugins: ["jest"],
|
|
13
|
+
rules: {
|
|
14
|
+
"jest/no-restricted-matchers": [
|
|
15
|
+
"error",
|
|
16
|
+
{
|
|
17
|
+
toBeFalsy: null,
|
|
18
|
+
toBeTruthy: null,
|
|
19
|
+
toBeDefined: null,
|
|
20
|
+
},
|
|
21
|
+
],
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
],
|
|
25
|
+
rules: {
|
|
26
|
+
"no-console": ["error", { allow: ["warn", "error"] }],
|
|
27
|
+
"@typescript-eslint/no-empty-function": "off",
|
|
28
|
+
"@typescript-eslint/no-explicit-any": "warn",
|
|
29
|
+
},
|
|
30
|
+
};
|
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
|
|
2
|
-
> @ledgerhq/coin-hedera@1.8.
|
|
2
|
+
> @ledgerhq/coin-hedera@1.8.3-nightly.0 build /home/runner/work/ledger-live/ledger-live/libs/coin-modules/coin-hedera
|
|
3
3
|
> tsc --outDir lib --module commonjs --moduleResolution node10 && tsc -m ES6 --outDir lib-es
|
|
4
4
|
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @ledgerhq/coin-hedera
|
|
2
2
|
|
|
3
|
+
## 1.8.3-nightly.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`4eee376`](https://github.com/LedgerHQ/ledger-live/commit/4eee3767b513dfb58a156cf2ce8086e31a7d55bf), [`6792990`](https://github.com/LedgerHQ/ledger-live/commit/6792990d8130ec297192bb7d6b98aef024e81dfa), [`132af3d`](https://github.com/LedgerHQ/ledger-live/commit/132af3db5863fb6e54587dd53d4db7b0ec19259e)]:
|
|
8
|
+
- @ledgerhq/types-live@6.78.0-nightly.0
|
|
9
|
+
- @ledgerhq/cryptoassets@13.22.0-nightly.5
|
|
10
|
+
- @ledgerhq/coin-framework@5.7.0-nightly.1
|
|
11
|
+
- @ledgerhq/live-countervalues@0.5.14-nightly.1
|
|
12
|
+
|
|
13
|
+
## 1.8.3-nightly.0
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- Updated dependencies [[`72c2a6c`](https://github.com/LedgerHQ/ledger-live/commit/72c2a6c91cfee66fac3505774ba16049fba1c0cf)]:
|
|
18
|
+
- @ledgerhq/cryptoassets@13.22.0-nightly.4
|
|
19
|
+
- @ledgerhq/coin-framework@5.6.1-nightly.0
|
|
20
|
+
- @ledgerhq/live-countervalues@0.5.14-nightly.0
|
|
21
|
+
|
|
3
22
|
## 1.8.2
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
package/lib/logic.test.js
CHANGED
|
@@ -6,8 +6,10 @@ const logic_1 = require("./logic");
|
|
|
6
6
|
describe("getTransactionExplorer", () => {
|
|
7
7
|
test("Tx explorer URL is converted from hash to consensus timestamp", async () => {
|
|
8
8
|
const explorerView = (0, cryptoassets_1.getCryptoCurrencyById)("hedera").explorerViews[0];
|
|
9
|
-
expect(explorerView).
|
|
10
|
-
|
|
9
|
+
expect(explorerView).toEqual({
|
|
10
|
+
tx: expect.any(String),
|
|
11
|
+
address: expect.any(String),
|
|
12
|
+
});
|
|
11
13
|
const mockOperation = {
|
|
12
14
|
extra: {
|
|
13
15
|
consensusTimestamp: "1.2.3.4",
|
|
@@ -29,8 +31,10 @@ describe("getTransactionExplorer", () => {
|
|
|
29
31
|
});
|
|
30
32
|
test("Tx explorer URL is based on transaction id if consensus timestamp is not available", async () => {
|
|
31
33
|
const explorerView = (0, cryptoassets_1.getCryptoCurrencyById)("hedera").explorerViews[0];
|
|
32
|
-
expect(explorerView).
|
|
33
|
-
|
|
34
|
+
expect(explorerView).toEqual({
|
|
35
|
+
tx: expect.any(String),
|
|
36
|
+
address: expect.any(String),
|
|
37
|
+
});
|
|
34
38
|
const mockOperation = {
|
|
35
39
|
extra: {
|
|
36
40
|
transactionId: "0.0.1234567-123-123",
|
package/lib/logic.test.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logic.test.js","sourceRoot":"","sources":["../src/logic.test.ts"],"names":[],"mappings":";;AAAA,+CAAyC;AAEzC,yDAA+D;AAC/D,mCAAiD;AAEjD,QAAQ,CAAC,wBAAwB,EAAE,GAAG,EAAE;IACtC,IAAI,CAAC,+DAA+D,EAAE,KAAK,IAAI,EAAE;QAC/E,MAAM,YAAY,GAAG,IAAA,oCAAqB,EAAC,QAAQ,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;QACtE,MAAM,CAAC,YAAY,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"logic.test.js","sourceRoot":"","sources":["../src/logic.test.ts"],"names":[],"mappings":";;AAAA,+CAAyC;AAEzC,yDAA+D;AAC/D,mCAAiD;AAEjD,QAAQ,CAAC,wBAAwB,EAAE,GAAG,EAAE;IACtC,IAAI,CAAC,+DAA+D,EAAE,KAAK,IAAI,EAAE;QAC/E,MAAM,YAAY,GAAG,IAAA,oCAA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ACN,IAAI,EAAE,EAAE;YACR,IAAI,EAAE,IAAI;YACV,KAAK,EAAE,IAAI,wBAAS,CAAC,CAAC,CAAC;YACvB,GAAG,EAAE,IAAI,wBAAS,CAAC,CAAC,CAAC;YACrB,OAAO,EAAE,EAAE;YACX,UAAU,EAAE,EAAE;YACd,WAAW,EAAE,SAAS;YACtB,SAAS,EAAE,SAAS;YACpB,SAAS,EAAE,EAAE;YACb,IAAI,EAAE,IAAI,IAAI,EAAE;SACjB,CAAC;QAEF,MAAM,MAAM,GAAG,IAAA,8BAAsB,EAAC,YAAY,EAAE,aAAa,CAAC,CAAC;QACnE,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,6DAA6D,CAAC,CAAC;IACrF,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/lib-es/logic.test.js
CHANGED
|
@@ -4,8 +4,10 @@ import { getTransactionExplorer } from "./logic";
|
|
|
4
4
|
describe("getTransactionExplorer", () => {
|
|
5
5
|
test("Tx explorer URL is converted from hash to consensus timestamp", async () => {
|
|
6
6
|
const explorerView = getCryptoCurrencyById("hedera").explorerViews[0];
|
|
7
|
-
expect(explorerView).
|
|
8
|
-
|
|
7
|
+
expect(explorerView).toEqual({
|
|
8
|
+
tx: expect.any(String),
|
|
9
|
+
address: expect.any(String),
|
|
10
|
+
});
|
|
9
11
|
const mockOperation = {
|
|
10
12
|
extra: {
|
|
11
13
|
consensusTimestamp: "1.2.3.4",
|
|
@@ -27,8 +29,10 @@ describe("getTransactionExplorer", () => {
|
|
|
27
29
|
});
|
|
28
30
|
test("Tx explorer URL is based on transaction id if consensus timestamp is not available", async () => {
|
|
29
31
|
const explorerView = getCryptoCurrencyById("hedera").explorerViews[0];
|
|
30
|
-
expect(explorerView).
|
|
31
|
-
|
|
32
|
+
expect(explorerView).toEqual({
|
|
33
|
+
tx: expect.any(String),
|
|
34
|
+
address: expect.any(String),
|
|
35
|
+
});
|
|
32
36
|
const mockOperation = {
|
|
33
37
|
extra: {
|
|
34
38
|
transactionId: "0.0.1234567-123-123",
|
package/lib-es/logic.test.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logic.test.js","sourceRoot":"","sources":["../src/logic.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAEjD,QAAQ,CAAC,wBAAwB,EAAE,GAAG,EAAE;IACtC,IAAI,CAAC,+DAA+D,EAAE,KAAK,IAAI,EAAE;QAC/E,MAAM,YAAY,GAAG,qBAAqB,CAAC,QAAQ,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;QACtE,MAAM,CAAC,YAAY,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"logic.test.js","sourceRoot":"","sources":["../src/logic.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAEjD,QAAQ,CAAC,wBAAwB,EAAE,GAAG,EAAE;IACtC,IAAI,CAAC,+DAA+D,EAAE,KAAK,IAAI,EAAE;QAC/E,MAAM,YAAY,GAAG,qBAAqB,CAAC,QAAQ,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;QACtE,MAAM,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC;YAC3B,EAAE,EAAE,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC;YACtB,OAAO,EAAE,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC;SAC5B,CAAC,CAAC;QAEH,MAAM,aAAa,GAAc;YAC/B,KAAK,EAAE;gBACL,kBAAkB,EAAE,SAAS;aAC9B;YACD,EAAE,EAAE,EA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Y,EAAE,aAAa,CAAC,CAAC;QACnE,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,6DAA6D,CAAC,CAAC;IACrF,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ledgerhq/coin-hedera",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.3-nightly.1",
|
|
4
4
|
"description": "Ledger Hedera Coin integration",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Ledger",
|
|
@@ -81,23 +81,24 @@
|
|
|
81
81
|
"invariant": "^2.2.2",
|
|
82
82
|
"lodash": "^4.17.21",
|
|
83
83
|
"rxjs": "^7.8.1",
|
|
84
|
-
"@ledgerhq/coin-framework": "^5.
|
|
85
|
-
"@ledgerhq/cryptoassets": "^13.
|
|
86
|
-
"@ledgerhq/
|
|
87
|
-
"@ledgerhq/
|
|
88
|
-
"@ledgerhq/live-countervalues": "^0.5.
|
|
89
|
-
"@ledgerhq/live-env": "^2.
|
|
90
|
-
"@ledgerhq/live-network": "^2.0.
|
|
91
|
-
"@ledgerhq/types-live": "^6.
|
|
84
|
+
"@ledgerhq/coin-framework": "^5.7.0-nightly.1",
|
|
85
|
+
"@ledgerhq/cryptoassets": "^13.22.0-nightly.5",
|
|
86
|
+
"@ledgerhq/errors": "^6.23.0-nightly.0",
|
|
87
|
+
"@ledgerhq/devices": "8.4.8-nightly.0",
|
|
88
|
+
"@ledgerhq/live-countervalues": "^0.5.14-nightly.1",
|
|
89
|
+
"@ledgerhq/live-env": "^2.12.0-nightly.1",
|
|
90
|
+
"@ledgerhq/live-network": "^2.0.13-nightly.1",
|
|
91
|
+
"@ledgerhq/types-live": "^6.78.0-nightly.0"
|
|
92
92
|
},
|
|
93
93
|
"devDependencies": {
|
|
94
94
|
"@types/invariant": "^2.2.2",
|
|
95
95
|
"@types/jest": "^29.5.10",
|
|
96
96
|
"@types/lodash": "^4.14.191",
|
|
97
|
+
"eslint-plugin-jest": "^27.4.2",
|
|
97
98
|
"jest": "^29.7.0",
|
|
98
99
|
"ts-jest": "^29.1.1",
|
|
99
100
|
"@ledgerhq/disable-network-setup": "^0.0.0",
|
|
100
|
-
"@ledgerhq/types-cryptoassets": "^7.
|
|
101
|
+
"@ledgerhq/types-cryptoassets": "^7.24.0-nightly.0"
|
|
101
102
|
},
|
|
102
103
|
"scripts": {
|
|
103
104
|
"clean": "rimraf lib lib-es",
|
package/src/logic.test.ts
CHANGED
|
@@ -6,8 +6,10 @@ import { getTransactionExplorer } from "./logic";
|
|
|
6
6
|
describe("getTransactionExplorer", () => {
|
|
7
7
|
test("Tx explorer URL is converted from hash to consensus timestamp", async () => {
|
|
8
8
|
const explorerView = getCryptoCurrencyById("hedera").explorerViews[0];
|
|
9
|
-
expect(explorerView).
|
|
10
|
-
|
|
9
|
+
expect(explorerView).toEqual({
|
|
10
|
+
tx: expect.any(String),
|
|
11
|
+
address: expect.any(String),
|
|
12
|
+
});
|
|
11
13
|
|
|
12
14
|
const mockOperation: Operation = {
|
|
13
15
|
extra: {
|
|
@@ -32,8 +34,10 @@ describe("getTransactionExplorer", () => {
|
|
|
32
34
|
|
|
33
35
|
test("Tx explorer URL is based on transaction id if consensus timestamp is not available", async () => {
|
|
34
36
|
const explorerView = getCryptoCurrencyById("hedera").explorerViews[0];
|
|
35
|
-
expect(explorerView).
|
|
36
|
-
|
|
37
|
+
expect(explorerView).toEqual({
|
|
38
|
+
tx: expect.any(String),
|
|
39
|
+
address: expect.any(String),
|
|
40
|
+
});
|
|
37
41
|
|
|
38
42
|
const mockOperation: Operation = {
|
|
39
43
|
extra: {
|