@injectivelabs/wallet-trezor 1.16.25-alpha.2 → 1.16.25-alpha.3
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/dist/cjs/index.cjs +13 -10
- package/dist/esm/index.js +13 -10
- package/package.json +6 -6
package/dist/cjs/index.cjs
CHANGED
|
@@ -16,10 +16,15 @@ const TrezorDerivationPathType = {
|
|
|
16
16
|
//#endregion
|
|
17
17
|
//#region src/strategy/lib.ts
|
|
18
18
|
async function loadTrezorConnect() {
|
|
19
|
+
var _module$default, _module$default2;
|
|
19
20
|
console.log("🪵Loading TrezorConnect...");
|
|
20
21
|
const module$1 = await import("@trezor/connect-web");
|
|
21
22
|
console.log("🪵Module:", module$1);
|
|
22
|
-
|
|
23
|
+
console.log({
|
|
24
|
+
aa: module$1.default,
|
|
25
|
+
bb: (_module$default = module$1.default) === null || _module$default === void 0 ? void 0 : _module$default.default
|
|
26
|
+
});
|
|
27
|
+
return ((_module$default2 = module$1.default) === null || _module$default2 === void 0 ? void 0 : _module$default2.default) || module$1.default;
|
|
23
28
|
}
|
|
24
29
|
|
|
25
30
|
//#endregion
|
|
@@ -191,15 +196,12 @@ var BaseTrezorTransport = class {
|
|
|
191
196
|
}
|
|
192
197
|
async connect() {
|
|
193
198
|
const TrezorConnect = await loadTrezorConnect();
|
|
194
|
-
if (!(await TrezorConnect.getSettings()).success) {
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
coreMode: "popup"
|
|
201
|
-
});
|
|
202
|
-
}
|
|
199
|
+
if (!(await TrezorConnect.getSettings()).success) await TrezorConnect.init({
|
|
200
|
+
lazyLoad: true,
|
|
201
|
+
manifest: TREZOR_CONNECT_MANIFEST,
|
|
202
|
+
debug: true,
|
|
203
|
+
coreMode: "popup"
|
|
204
|
+
});
|
|
203
205
|
return Promise.resolve();
|
|
204
206
|
}
|
|
205
207
|
async getAccountManager() {
|
|
@@ -306,6 +308,7 @@ var TrezorBase = class extends __injectivelabs_wallet_base.BaseConcreteStrategy
|
|
|
306
308
|
metamask_v4_compat: true
|
|
307
309
|
});
|
|
308
310
|
console.log("🪵response", response);
|
|
311
|
+
if (response.payload.code === "Failure_ActionCancelled") throw new Error("Request rejected");
|
|
309
312
|
if (!response.success) throw new Error(response.payload && response.payload.error || "Unknown error");
|
|
310
313
|
return response.payload.signature;
|
|
311
314
|
} catch (e) {
|
package/dist/esm/index.js
CHANGED
|
@@ -16,10 +16,15 @@ const TrezorDerivationPathType = {
|
|
|
16
16
|
//#endregion
|
|
17
17
|
//#region src/strategy/lib.ts
|
|
18
18
|
async function loadTrezorConnect() {
|
|
19
|
+
var _module$default, _module$default2;
|
|
19
20
|
console.log("🪵Loading TrezorConnect...");
|
|
20
21
|
const module = await import("@trezor/connect-web");
|
|
21
22
|
console.log("🪵Module:", module);
|
|
22
|
-
|
|
23
|
+
console.log({
|
|
24
|
+
aa: module.default,
|
|
25
|
+
bb: (_module$default = module.default) === null || _module$default === void 0 ? void 0 : _module$default.default
|
|
26
|
+
});
|
|
27
|
+
return ((_module$default2 = module.default) === null || _module$default2 === void 0 ? void 0 : _module$default2.default) || module.default;
|
|
23
28
|
}
|
|
24
29
|
|
|
25
30
|
//#endregion
|
|
@@ -191,15 +196,12 @@ var BaseTrezorTransport = class {
|
|
|
191
196
|
}
|
|
192
197
|
async connect() {
|
|
193
198
|
const TrezorConnect = await loadTrezorConnect();
|
|
194
|
-
if (!(await TrezorConnect.getSettings()).success) {
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
coreMode: "popup"
|
|
201
|
-
});
|
|
202
|
-
}
|
|
199
|
+
if (!(await TrezorConnect.getSettings()).success) await TrezorConnect.init({
|
|
200
|
+
lazyLoad: true,
|
|
201
|
+
manifest: TREZOR_CONNECT_MANIFEST,
|
|
202
|
+
debug: true,
|
|
203
|
+
coreMode: "popup"
|
|
204
|
+
});
|
|
203
205
|
return Promise.resolve();
|
|
204
206
|
}
|
|
205
207
|
async getAccountManager() {
|
|
@@ -306,6 +308,7 @@ var TrezorBase = class extends BaseConcreteStrategy {
|
|
|
306
308
|
metamask_v4_compat: true
|
|
307
309
|
});
|
|
308
310
|
console.log("🪵response", response);
|
|
311
|
+
if (response.payload.code === "Failure_ActionCancelled") throw new Error("Request rejected");
|
|
309
312
|
if (!response.success) throw new Error(response.payload && response.payload.error || "Unknown error");
|
|
310
313
|
return response.payload.signature;
|
|
311
314
|
} catch (e) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@injectivelabs/wallet-trezor",
|
|
3
3
|
"description": "Trezor wallet strategy for use with @injectivelabs/wallet-core.",
|
|
4
|
-
"version": "1.16.25-alpha.
|
|
4
|
+
"version": "1.16.25-alpha.3",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"type": "module",
|
|
7
7
|
"author": {
|
|
@@ -56,10 +56,10 @@
|
|
|
56
56
|
"lint": "eslint . --ext .ts,.js"
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
|
-
"@injectivelabs/exceptions": "1.16.25-alpha.
|
|
60
|
-
"@injectivelabs/sdk-ts": "1.16.25-alpha.
|
|
61
|
-
"@injectivelabs/ts-types": "1.16.25-alpha.
|
|
62
|
-
"@injectivelabs/wallet-base": "1.16.25-alpha.
|
|
59
|
+
"@injectivelabs/exceptions": "1.16.25-alpha.3",
|
|
60
|
+
"@injectivelabs/sdk-ts": "1.16.25-alpha.3",
|
|
61
|
+
"@injectivelabs/ts-types": "1.16.25-alpha.3",
|
|
62
|
+
"@injectivelabs/wallet-base": "1.16.25-alpha.3",
|
|
63
63
|
"@trezor/connect": "^9.6.4",
|
|
64
64
|
"@trezor/connect-web": "^9.6.4",
|
|
65
65
|
"alchemy-sdk": "^3.4.7",
|
|
@@ -68,5 +68,5 @@
|
|
|
68
68
|
"devDependencies": {
|
|
69
69
|
"shx": "^0.3.3"
|
|
70
70
|
},
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "84488e40668d8240af96e45f6e2568a74c986101"
|
|
72
72
|
}
|