@ledgerhq/live-common 34.3.0 → 34.4.0-hotfix.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/families/polkadot/config.d.ts.map +1 -1
- package/lib/families/polkadot/config.js +15 -0
- package/lib/families/polkadot/config.js.map +1 -1
- package/lib/families/polkadot/setup.d.ts.map +1 -1
- package/lib/families/polkadot/setup.js +4 -13
- package/lib/families/polkadot/setup.js.map +1 -1
- package/lib-es/families/polkadot/config.d.ts.map +1 -1
- package/lib-es/families/polkadot/config.js +15 -0
- package/lib-es/families/polkadot/config.js.map +1 -1
- package/lib-es/families/polkadot/setup.d.ts.map +1 -1
- package/lib-es/families/polkadot/setup.js +4 -13
- package/lib-es/families/polkadot/setup.js.map +1 -1
- package/package.json +6 -6
- package/src/families/polkadot/config.ts +15 -0
- package/src/families/polkadot/setup.ts +4 -13
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/families/polkadot/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/families/polkadot/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAG9D,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAuBrD,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.polkadotConfig = void 0;
|
|
4
|
+
const live_env_1 = require("@ledgerhq/live-env");
|
|
4
5
|
exports.polkadotConfig = {
|
|
5
6
|
config_currency_polkadot: {
|
|
6
7
|
type: "object",
|
|
@@ -8,6 +9,20 @@ exports.polkadotConfig = {
|
|
|
8
9
|
status: {
|
|
9
10
|
type: "active",
|
|
10
11
|
},
|
|
12
|
+
sidecar: {
|
|
13
|
+
url: (0, live_env_1.getEnv)("API_POLKADOT_SIDECAR"),
|
|
14
|
+
credentials: (0, live_env_1.getEnv)("API_POLKADOT_SIDECAR_CREDENTIALS"),
|
|
15
|
+
},
|
|
16
|
+
staking: {
|
|
17
|
+
electionStatusThreshold: (0, live_env_1.getEnv)("POLKADOT_ELECTION_STATUS_THRESHOLD"),
|
|
18
|
+
},
|
|
19
|
+
metadataShortener: {
|
|
20
|
+
url: "https://api.zondax.ch/polkadot/transaction/metadata",
|
|
21
|
+
},
|
|
22
|
+
metadataHash: {
|
|
23
|
+
url: "https://api.zondax.ch/polkadot/node/metadata/hash",
|
|
24
|
+
},
|
|
25
|
+
runtimeUpgraded: false,
|
|
11
26
|
},
|
|
12
27
|
},
|
|
13
28
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/families/polkadot/config.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/families/polkadot/config.ts"],"names":[],"mappings":";;;AACA,iDAA4C;AAE/B,QAAA,cAAc,GAA+B;IACxD,wBAAwB,EAAE;QACxB,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE;YACP,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;aACf;YACD,OAAO,EAAE;gBACP,GAAG,EAAE,IAAA,iBAAM,EAAC,sBAAsB,CAAC;gBACnC,WAAW,EAAE,IAAA,iBAAM,EAAC,kCAAkC,CAAC;aACxD;YACD,OAAO,EAAE;gBACP,uBAAuB,EAAE,IAAA,iBAAM,EAAC,oCAAoC,CAAC;aACtE;YACD,iBAAiB,EAAE;gBACjB,GAAG,EAAE,qDAAqD;aAC3D;YACD,YAAY,EAAE;gBACZ,GAAG,EAAE,mDAAmD;aACzD;YACD,eAAe,EAAE,KAAK;SACvB;KACF;CACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../../src/families/polkadot/setup.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,eAAe,EACf,iBAAiB,EAEjB,KAAK,WAAW,EACjB,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../../src/families/polkadot/setup.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,eAAe,EACf,iBAAiB,EAEjB,KAAK,WAAW,EACjB,MAAM,yBAAyB,CAAC;AAGjC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAGnD,OAAqB,EAAE,KAAK,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAE/E,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAarD,QAAA,MAAM,MAAM,EAAE,MAAM,CAAC,WAAW,EAAE,eAAe,EAAE,iBAAiB,CAGnE,CAAC;AAEF,QAAA,MAAM,QAAQ,EAAE,QAAyD,CAAC;AAE1E,QAAA,MAAM,QAAQ,EAAE,QAAyB,CAAC;AAE1C,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -6,27 +6,18 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
exports.resolver = exports.cliTools = exports.bridge = void 0;
|
|
8
8
|
const coin_polkadot_1 = require("@ledgerhq/coin-polkadot");
|
|
9
|
-
const live_env_1 = require("@ledgerhq/live-env");
|
|
10
9
|
const hw_app_polkadot_1 = __importDefault(require("@ledgerhq/hw-app-polkadot"));
|
|
11
10
|
const index_1 = __importDefault(require("@ledgerhq/coin-polkadot/signer/index"));
|
|
12
11
|
const cli_1 = __importDefault(require("@ledgerhq/coin-polkadot/test/cli"));
|
|
13
12
|
const setup_1 = require("../../bridge/setup");
|
|
13
|
+
const config_1 = require("../../config");
|
|
14
|
+
const currencies_1 = require("@ledgerhq/cryptoassets/currencies");
|
|
14
15
|
const createSigner = (transport) => {
|
|
15
16
|
return new hw_app_polkadot_1.default(transport);
|
|
16
17
|
};
|
|
17
18
|
const getCurrencyConfig = () => {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
type: "active",
|
|
21
|
-
},
|
|
22
|
-
sidecar: {
|
|
23
|
-
url: (0, live_env_1.getEnv)("API_POLKADOT_SIDECAR"),
|
|
24
|
-
credentials: (0, live_env_1.getEnv)("API_POLKADOT_SIDECAR_CREDENTIALS"),
|
|
25
|
-
},
|
|
26
|
-
staking: {
|
|
27
|
-
electionStatusThreshold: (0, live_env_1.getEnv)("POLKADOT_ELECTION_STATUS_THRESHOLD"),
|
|
28
|
-
},
|
|
29
|
-
};
|
|
19
|
+
const polkadot = (0, currencies_1.getCryptoCurrencyById)("polkadot");
|
|
20
|
+
return (0, config_1.getCurrencyConfiguration)(polkadot);
|
|
30
21
|
};
|
|
31
22
|
const bridge = (0, coin_polkadot_1.createBridges)((0, setup_1.executeWithSigner)(createSigner), getCurrencyConfig);
|
|
32
23
|
exports.bridge = bridge;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup.js","sourceRoot":"","sources":["../../../src/families/polkadot/setup.ts"],"names":[],"mappings":";AAAA,wFAAwF;;;;;;AAExF,2DAKiC;
|
|
1
|
+
{"version":3,"file":"setup.js","sourceRoot":"","sources":["../../../src/families/polkadot/setup.ts"],"names":[],"mappings":";AAAA,wFAAwF;;;;;;AAExF,2DAKiC;AAEjC,gFAAiD;AAGjD,iFAAoE;AACpE,2EAA+E;AAC/E,8CAAqF;AAErF,yCAAwD;AACxD,kEAA0E;AAE1E,MAAM,YAAY,GAA2B,CAAC,SAAoB,EAAE,EAAE;IACpE,OAAO,IAAI,yBAAQ,CAAC,SAAS,CAAC,CAAC;AACjC,CAAC,CAAC;AAEF,MAAM,iBAAiB,GAAG,GAAuB,EAAE;IACjD,MAAM,QAAQ,GAAG,IAAA,kCAAqB,EAAC,UAAU,CAAC,CAAC;IACnD,OAAO,IAAA,iCAAwB,EAAC,QAAQ,CAAC,CAAC;AAC5C,CAAC,CAAC;AAEF,MAAM,MAAM,GAA4D,IAAA,6BAAa,EACnF,IAAA,yBAAiB,EAAC,YAAY,CAAC,EAC/B,iBAAiB,CAClB,CAAC;AAMO,wBAAM;AAJf,MAAM,QAAQ,GAAa,IAAA,sBAAc,EAAC,YAAY,EAAE,eAAgB,CAAC,CAAC;AAI/C,4BAAQ;AAFnC,MAAM,QAAQ,GAAa,IAAA,aAAY,GAAE,CAAC;AAEzB,4BAAQ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/families/polkadot/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/families/polkadot/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAG9D,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAuBrD,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { getEnv } from "@ledgerhq/live-env";
|
|
1
2
|
export const polkadotConfig = {
|
|
2
3
|
config_currency_polkadot: {
|
|
3
4
|
type: "object",
|
|
@@ -5,6 +6,20 @@ export const polkadotConfig = {
|
|
|
5
6
|
status: {
|
|
6
7
|
type: "active",
|
|
7
8
|
},
|
|
9
|
+
sidecar: {
|
|
10
|
+
url: getEnv("API_POLKADOT_SIDECAR"),
|
|
11
|
+
credentials: getEnv("API_POLKADOT_SIDECAR_CREDENTIALS"),
|
|
12
|
+
},
|
|
13
|
+
staking: {
|
|
14
|
+
electionStatusThreshold: getEnv("POLKADOT_ELECTION_STATUS_THRESHOLD"),
|
|
15
|
+
},
|
|
16
|
+
metadataShortener: {
|
|
17
|
+
url: "https://api.zondax.ch/polkadot/transaction/metadata",
|
|
18
|
+
},
|
|
19
|
+
metadataHash: {
|
|
20
|
+
url: "https://api.zondax.ch/polkadot/node/metadata/hash",
|
|
21
|
+
},
|
|
22
|
+
runtimeUpgraded: false,
|
|
8
23
|
},
|
|
9
24
|
},
|
|
10
25
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/families/polkadot/config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/families/polkadot/config.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAE5C,MAAM,CAAC,MAAM,cAAc,GAA+B;IACxD,wBAAwB,EAAE;QACxB,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE;YACP,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;aACf;YACD,OAAO,EAAE;gBACP,GAAG,EAAE,MAAM,CAAC,sBAAsB,CAAC;gBACnC,WAAW,EAAE,MAAM,CAAC,kCAAkC,CAAC;aACxD;YACD,OAAO,EAAE;gBACP,uBAAuB,EAAE,MAAM,CAAC,oCAAoC,CAAC;aACtE;YACD,iBAAiB,EAAE;gBACjB,GAAG,EAAE,qDAAqD;aAC3D;YACD,YAAY,EAAE;gBACZ,GAAG,EAAE,mDAAmD;aACzD;YACD,eAAe,EAAE,KAAK;SACvB;KACF;CACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../../src/families/polkadot/setup.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,eAAe,EACf,iBAAiB,EAEjB,KAAK,WAAW,EACjB,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../../src/families/polkadot/setup.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,eAAe,EACf,iBAAiB,EAEjB,KAAK,WAAW,EACjB,MAAM,yBAAyB,CAAC;AAGjC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAGnD,OAAqB,EAAE,KAAK,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAE/E,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAarD,QAAA,MAAM,MAAM,EAAE,MAAM,CAAC,WAAW,EAAE,eAAe,EAAE,iBAAiB,CAGnE,CAAC;AAEF,QAAA,MAAM,QAAQ,EAAE,QAAyD,CAAC;AAE1E,QAAA,MAAM,QAAQ,EAAE,QAAyB,CAAC;AAE1C,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -1,26 +1,17 @@
|
|
|
1
1
|
// Goal of this file is to inject all necessary device/signer dependency to coin-modules
|
|
2
2
|
import { createBridges, } from "@ledgerhq/coin-polkadot";
|
|
3
|
-
import { getEnv } from "@ledgerhq/live-env";
|
|
4
3
|
import Polkadot from "@ledgerhq/hw-app-polkadot";
|
|
5
4
|
import polkadotResolver from "@ledgerhq/coin-polkadot/signer/index";
|
|
6
5
|
import makeCliTools from "@ledgerhq/coin-polkadot/test/cli";
|
|
7
6
|
import { createResolver, executeWithSigner } from "../../bridge/setup";
|
|
7
|
+
import { getCurrencyConfiguration } from "../../config";
|
|
8
|
+
import { getCryptoCurrencyById } from "@ledgerhq/cryptoassets/currencies";
|
|
8
9
|
const createSigner = (transport) => {
|
|
9
10
|
return new Polkadot(transport);
|
|
10
11
|
};
|
|
11
12
|
const getCurrencyConfig = () => {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
type: "active",
|
|
15
|
-
},
|
|
16
|
-
sidecar: {
|
|
17
|
-
url: getEnv("API_POLKADOT_SIDECAR"),
|
|
18
|
-
credentials: getEnv("API_POLKADOT_SIDECAR_CREDENTIALS"),
|
|
19
|
-
},
|
|
20
|
-
staking: {
|
|
21
|
-
electionStatusThreshold: getEnv("POLKADOT_ELECTION_STATUS_THRESHOLD"),
|
|
22
|
-
},
|
|
23
|
-
};
|
|
13
|
+
const polkadot = getCryptoCurrencyById("polkadot");
|
|
14
|
+
return getCurrencyConfiguration(polkadot);
|
|
24
15
|
};
|
|
25
16
|
const bridge = createBridges(executeWithSigner(createSigner), getCurrencyConfig);
|
|
26
17
|
const resolver = createResolver(createSigner, polkadotResolver);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup.js","sourceRoot":"","sources":["../../../src/families/polkadot/setup.ts"],"names":[],"mappings":"AAAA,wFAAwF;AAExF,OAAO,EAGL,aAAa,GAEd,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"setup.js","sourceRoot":"","sources":["../../../src/families/polkadot/setup.ts"],"names":[],"mappings":"AAAA,wFAAwF;AAExF,OAAO,EAGL,aAAa,GAEd,MAAM,yBAAyB,CAAC;AAEjC,OAAO,QAAQ,MAAM,2BAA2B,CAAC;AAGjD,OAAO,gBAAgB,MAAM,sCAAsC,CAAC;AACpE,OAAO,YAA+B,MAAM,kCAAkC,CAAC;AAC/E,OAAO,EAAgB,cAAc,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAErF,OAAO,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAE1E,MAAM,YAAY,GAA2B,CAAC,SAAoB,EAAE,EAAE;IACpE,OAAO,IAAI,QAAQ,CAAC,SAAS,CAAC,CAAC;AACjC,CAAC,CAAC;AAEF,MAAM,iBAAiB,GAAG,GAAuB,EAAE;IACjD,MAAM,QAAQ,GAAG,qBAAqB,CAAC,UAAU,CAAC,CAAC;IACnD,OAAO,wBAAwB,CAAC,QAAQ,CAAC,CAAC;AAC5C,CAAC,CAAC;AAEF,MAAM,MAAM,GAA4D,aAAa,CACnF,iBAAiB,CAAC,YAAY,CAAC,EAC/B,iBAAiB,CAClB,CAAC;AAEF,MAAM,QAAQ,GAAa,cAAc,CAAC,YAAY,EAAE,gBAAgB,CAAC,CAAC;AAE1E,MAAM,QAAQ,GAAa,YAAY,EAAE,CAAC;AAE1C,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ledgerhq/live-common",
|
|
3
3
|
"description": "Common ground for the Ledger Live apps",
|
|
4
|
-
"version": "34.
|
|
4
|
+
"version": "34.4.0-hotfix.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/LedgerHQ/ledger-live.git"
|
|
@@ -190,22 +190,22 @@
|
|
|
190
190
|
"@ledgerhq/coin-evm": "^2.1.0",
|
|
191
191
|
"@ledgerhq/coin-framework": "^0.14.0",
|
|
192
192
|
"@ledgerhq/coin-near": "^0.5.0",
|
|
193
|
-
"@ledgerhq/coin-polkadot": "^0.
|
|
193
|
+
"@ledgerhq/coin-polkadot": "^0.8.0-hotfix.0",
|
|
194
194
|
"@ledgerhq/coin-solana": "^0.7.0",
|
|
195
195
|
"@ledgerhq/coin-tezos": "^0.4.0",
|
|
196
196
|
"@ledgerhq/coin-xrp": "^0.2.0",
|
|
197
197
|
"@ledgerhq/crypto-icons-ui": "^1.2.0",
|
|
198
198
|
"@ledgerhq/cryptoassets": "^13.1.0",
|
|
199
|
-
"@ledgerhq/device-core": "^0.2.0",
|
|
200
199
|
"@ledgerhq/devices": "^8.4.0",
|
|
200
|
+
"@ledgerhq/device-core": "^0.2.0",
|
|
201
201
|
"@ledgerhq/errors": "^6.17.0",
|
|
202
|
-
"@ledgerhq/hw-app-algorand": "^6.29.0",
|
|
203
202
|
"@ledgerhq/hw-app-btc": "^10.3.0",
|
|
203
|
+
"@ledgerhq/hw-app-algorand": "^6.29.0",
|
|
204
204
|
"@ledgerhq/hw-app-cosmos": "^6.30.0",
|
|
205
205
|
"@ledgerhq/hw-app-eth": "^6.37.0",
|
|
206
206
|
"@ledgerhq/hw-app-exchange": "^0.5.0",
|
|
207
207
|
"@ledgerhq/hw-app-near": "^6.29.0",
|
|
208
|
-
"@ledgerhq/hw-app-polkadot": "^6.
|
|
208
|
+
"@ledgerhq/hw-app-polkadot": "^6.30.0-hotfix.0",
|
|
209
209
|
"@ledgerhq/hw-app-solana": "^7.2.0",
|
|
210
210
|
"@ledgerhq/hw-app-str": "^6.29.0",
|
|
211
211
|
"@ledgerhq/hw-app-tezos": "^6.29.0",
|
|
@@ -219,8 +219,8 @@
|
|
|
219
219
|
"@ledgerhq/live-countervalues-react": "^0.2.0",
|
|
220
220
|
"@ledgerhq/live-env": "^2.1.0",
|
|
221
221
|
"@ledgerhq/live-hooks": "0.1.0",
|
|
222
|
-
"@ledgerhq/live-network": "^1.3.0",
|
|
223
222
|
"@ledgerhq/live-nft": "^0.4.0",
|
|
223
|
+
"@ledgerhq/live-network": "^1.3.0",
|
|
224
224
|
"@ledgerhq/live-promise": "^0.1.0",
|
|
225
225
|
"@ledgerhq/live-wallet": "^0.2.0",
|
|
226
226
|
"@ledgerhq/logs": "^6.12.0",
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ConfigInfo } from "@ledgerhq/live-config/LiveConfig";
|
|
2
|
+
import { getEnv } from "@ledgerhq/live-env";
|
|
2
3
|
|
|
3
4
|
export const polkadotConfig: Record<string, ConfigInfo> = {
|
|
4
5
|
config_currency_polkadot: {
|
|
@@ -7,6 +8,20 @@ export const polkadotConfig: Record<string, ConfigInfo> = {
|
|
|
7
8
|
status: {
|
|
8
9
|
type: "active",
|
|
9
10
|
},
|
|
11
|
+
sidecar: {
|
|
12
|
+
url: getEnv("API_POLKADOT_SIDECAR"),
|
|
13
|
+
credentials: getEnv("API_POLKADOT_SIDECAR_CREDENTIALS"),
|
|
14
|
+
},
|
|
15
|
+
staking: {
|
|
16
|
+
electionStatusThreshold: getEnv("POLKADOT_ELECTION_STATUS_THRESHOLD"),
|
|
17
|
+
},
|
|
18
|
+
metadataShortener: {
|
|
19
|
+
url: "https://api.zondax.ch/polkadot/transaction/metadata",
|
|
20
|
+
},
|
|
21
|
+
metadataHash: {
|
|
22
|
+
url: "https://api.zondax.ch/polkadot/node/metadata/hash",
|
|
23
|
+
},
|
|
24
|
+
runtimeUpgraded: false,
|
|
10
25
|
},
|
|
11
26
|
},
|
|
12
27
|
};
|
|
@@ -6,7 +6,6 @@ import {
|
|
|
6
6
|
createBridges,
|
|
7
7
|
type Transaction,
|
|
8
8
|
} from "@ledgerhq/coin-polkadot";
|
|
9
|
-
import { getEnv } from "@ledgerhq/live-env";
|
|
10
9
|
import Transport from "@ledgerhq/hw-transport";
|
|
11
10
|
import Polkadot from "@ledgerhq/hw-app-polkadot";
|
|
12
11
|
import type { Bridge } from "@ledgerhq/types-live";
|
|
@@ -15,24 +14,16 @@ import polkadotResolver from "@ledgerhq/coin-polkadot/signer/index";
|
|
|
15
14
|
import makeCliTools, { type CliTools } from "@ledgerhq/coin-polkadot/test/cli";
|
|
16
15
|
import { CreateSigner, createResolver, executeWithSigner } from "../../bridge/setup";
|
|
17
16
|
import { Resolver } from "../../hw/getAddress/types";
|
|
17
|
+
import { getCurrencyConfiguration } from "../../config";
|
|
18
|
+
import { getCryptoCurrencyById } from "@ledgerhq/cryptoassets/currencies";
|
|
18
19
|
|
|
19
20
|
const createSigner: CreateSigner<Polkadot> = (transport: Transport) => {
|
|
20
21
|
return new Polkadot(transport);
|
|
21
22
|
};
|
|
22
23
|
|
|
23
24
|
const getCurrencyConfig = (): PolkadotCoinConfig => {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
type: "active",
|
|
27
|
-
},
|
|
28
|
-
sidecar: {
|
|
29
|
-
url: getEnv("API_POLKADOT_SIDECAR"),
|
|
30
|
-
credentials: getEnv("API_POLKADOT_SIDECAR_CREDENTIALS"),
|
|
31
|
-
},
|
|
32
|
-
staking: {
|
|
33
|
-
electionStatusThreshold: getEnv("POLKADOT_ELECTION_STATUS_THRESHOLD"),
|
|
34
|
-
},
|
|
35
|
-
};
|
|
25
|
+
const polkadot = getCryptoCurrencyById("polkadot");
|
|
26
|
+
return getCurrencyConfiguration(polkadot);
|
|
36
27
|
};
|
|
37
28
|
|
|
38
29
|
const bridge: Bridge<Transaction, PolkadotAccount, TransactionStatus> = createBridges(
|