@injectivelabs/wallet-trezor 1.20.29 → 1.20.30
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 +2 -1
- package/dist/esm/index.js +2 -1
- package/package.json +5 -5
package/dist/cjs/index.cjs
CHANGED
|
@@ -243,6 +243,7 @@ const signTypedDataMethods = new Set([
|
|
|
243
243
|
"eth_signTypedData_v4"
|
|
244
244
|
]);
|
|
245
245
|
const signMessageMethods = new Set(["eth_sign", "personal_sign"]);
|
|
246
|
+
const sendTransactionMethods = new Set(["eth_sendTransaction", "wallet_sendTransaction"]);
|
|
246
247
|
const isEthAddress = (value) => typeof value === "string" && /^0x[a-fA-F0-9]{40}$/.test(value);
|
|
247
248
|
const getTypedDataParam = (method, params) => {
|
|
248
249
|
const typedData = isEthAddress(params[0]) ? params[1] : params[0];
|
|
@@ -422,7 +423,7 @@ var TrezorEip1193Provider = class {
|
|
|
422
423
|
blockTag: "pending"
|
|
423
424
|
})).toString(16)}`;
|
|
424
425
|
}
|
|
425
|
-
if (args.method
|
|
426
|
+
if (sendTransactionMethods.has(args.method)) {
|
|
426
427
|
const address = await this.getAddress();
|
|
427
428
|
const walletClient = (0, __injectivelabs_wallet_base.getViemWalletClient)({
|
|
428
429
|
chainId: this.chainId,
|
package/dist/esm/index.js
CHANGED
|
@@ -243,6 +243,7 @@ const signTypedDataMethods = new Set([
|
|
|
243
243
|
"eth_signTypedData_v4"
|
|
244
244
|
]);
|
|
245
245
|
const signMessageMethods = new Set(["eth_sign", "personal_sign"]);
|
|
246
|
+
const sendTransactionMethods = new Set(["eth_sendTransaction", "wallet_sendTransaction"]);
|
|
246
247
|
const isEthAddress = (value) => typeof value === "string" && /^0x[a-fA-F0-9]{40}$/.test(value);
|
|
247
248
|
const getTypedDataParam = (method, params) => {
|
|
248
249
|
const typedData = isEthAddress(params[0]) ? params[1] : params[0];
|
|
@@ -422,7 +423,7 @@ var TrezorEip1193Provider = class {
|
|
|
422
423
|
blockTag: "pending"
|
|
423
424
|
})).toString(16)}`;
|
|
424
425
|
}
|
|
425
|
-
if (args.method
|
|
426
|
+
if (sendTransactionMethods.has(args.method)) {
|
|
426
427
|
const address = await this.getAddress();
|
|
427
428
|
const walletClient = getViemWalletClient({
|
|
428
429
|
chainId: this.chainId,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@injectivelabs/wallet-trezor",
|
|
3
|
-
"version": "1.20.
|
|
3
|
+
"version": "1.20.30",
|
|
4
4
|
"description": "Trezor wallet strategy for use with @injectivelabs/wallet-core.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": {
|
|
@@ -46,10 +46,10 @@
|
|
|
46
46
|
"@trezor/connect": "^9.7.3",
|
|
47
47
|
"@trezor/connect-web": "^9.7.3",
|
|
48
48
|
"viem": "^2.54.6",
|
|
49
|
-
"@injectivelabs/exceptions": "1.20.
|
|
50
|
-
"@injectivelabs/ts-types": "1.20.
|
|
51
|
-
"@injectivelabs/wallet-base": "1.20.
|
|
52
|
-
"@injectivelabs/sdk-ts": "1.20.
|
|
49
|
+
"@injectivelabs/exceptions": "1.20.30",
|
|
50
|
+
"@injectivelabs/ts-types": "1.20.30",
|
|
51
|
+
"@injectivelabs/wallet-base": "1.20.30",
|
|
52
|
+
"@injectivelabs/sdk-ts": "1.20.30"
|
|
53
53
|
},
|
|
54
54
|
"publishConfig": {
|
|
55
55
|
"access": "public"
|