@injectivelabs/wallet-ledger 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
|
@@ -192,6 +192,7 @@ const signTypedDataMethods = new Set([
|
|
|
192
192
|
"eth_signTypedData_v4"
|
|
193
193
|
]);
|
|
194
194
|
const signMessageMethods = new Set(["eth_sign", "personal_sign"]);
|
|
195
|
+
const sendTransactionMethods = new Set(["eth_sendTransaction", "wallet_sendTransaction"]);
|
|
195
196
|
const isEthAddress = (value) => typeof value === "string" && /^0x[a-fA-F0-9]{40}$/.test(value);
|
|
196
197
|
const getTypedDataParam = (method, params) => {
|
|
197
198
|
const typedData = isEthAddress(params[0]) ? params[1] : params[0];
|
|
@@ -305,7 +306,7 @@ var LedgerEip1193Provider = class {
|
|
|
305
306
|
blockTag: "pending"
|
|
306
307
|
})).toString(16)}`;
|
|
307
308
|
}
|
|
308
|
-
if (args.method
|
|
309
|
+
if (sendTransactionMethods.has(args.method)) {
|
|
309
310
|
const address = await this.getAddress();
|
|
310
311
|
const walletClient = (0, __injectivelabs_wallet_base.getViemWalletClient)({
|
|
311
312
|
chainId: this.chainId,
|
package/dist/esm/index.js
CHANGED
|
@@ -191,6 +191,7 @@ const signTypedDataMethods = new Set([
|
|
|
191
191
|
"eth_signTypedData_v4"
|
|
192
192
|
]);
|
|
193
193
|
const signMessageMethods = new Set(["eth_sign", "personal_sign"]);
|
|
194
|
+
const sendTransactionMethods = new Set(["eth_sendTransaction", "wallet_sendTransaction"]);
|
|
194
195
|
const isEthAddress = (value) => typeof value === "string" && /^0x[a-fA-F0-9]{40}$/.test(value);
|
|
195
196
|
const getTypedDataParam = (method, params) => {
|
|
196
197
|
const typedData = isEthAddress(params[0]) ? params[1] : params[0];
|
|
@@ -304,7 +305,7 @@ var LedgerEip1193Provider = class {
|
|
|
304
305
|
blockTag: "pending"
|
|
305
306
|
})).toString(16)}`;
|
|
306
307
|
}
|
|
307
|
-
if (args.method
|
|
308
|
+
if (sendTransactionMethods.has(args.method)) {
|
|
308
309
|
const address = await this.getAddress();
|
|
309
310
|
const walletClient = getViemWalletClient({
|
|
310
311
|
chainId: this.chainId,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@injectivelabs/wallet-ledger",
|
|
3
|
-
"version": "1.20.
|
|
3
|
+
"version": "1.20.30",
|
|
4
4
|
"description": "Ledger wallet strategy for use with @injectivelabs/wallet-core.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": {
|
|
@@ -50,10 +50,10 @@
|
|
|
50
50
|
"@ledgerhq/hw-transport-webusb": "^6.34.4",
|
|
51
51
|
"buffer": "^6.0.3",
|
|
52
52
|
"viem": "^2.54.6",
|
|
53
|
-
"@injectivelabs/
|
|
54
|
-
"@injectivelabs/sdk-ts": "1.20.
|
|
55
|
-
"@injectivelabs/wallet-base": "1.20.
|
|
56
|
-
"@injectivelabs/
|
|
53
|
+
"@injectivelabs/exceptions": "1.20.30",
|
|
54
|
+
"@injectivelabs/sdk-ts": "1.20.30",
|
|
55
|
+
"@injectivelabs/wallet-base": "1.20.30",
|
|
56
|
+
"@injectivelabs/ts-types": "1.20.30"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
59
59
|
"@ethersproject/abi": "^5.7.0",
|