Skip to content

Commit

Permalink
DONTMERGE: patch in github.com/MetaMask/eth-json-rpc-middleware/pull/263
Browse files Browse the repository at this point in the history
  • Loading branch information
legobeat committed Oct 26, 2023
1 parent 2eb62db commit 5304bbd
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
diff --git a/dist/wallet.js b/dist/wallet.js
index 89e30ef9b44f3852ecef5e0ae7336e1d6903d6a5..c38576393a91f666ad4b2ccef67cbded4d88234b 100644
--- a/dist/wallet.js
+++ b/dist/wallet.js
@@ -72,9 +72,9 @@ function createWalletMiddleware({ getAccounts, processDecryptMessage, processEnc
throw rpc_errors_1.rpcErrors.invalidInput();
}
const params = req.params;
- const txParams = {
+ const txParams = Object.assign({}, req.params[0] || {}, {
from: await validateAndNormalizeKeyholder(((_a = params[0]) === null || _a === void 0 ? void 0 : _a.from) || '', req),
- };
+ });
res.result = await processTransaction(txParams, req);
}
async function signTransaction(req, res) {
@@ -88,9 +88,9 @@ function createWalletMiddleware({ getAccounts, processDecryptMessage, processEnc
throw rpc_errors_1.rpcErrors.invalidInput();
}
const params = req.params;
- const txParams = {
+ const txParams = Object.assign({}, req.params[0] || {}, {
from: await validateAndNormalizeKeyholder(((_a = params[0]) === null || _a === void 0 ? void 0 : _a.from) || '', req),
- };
+ });
res.result = await processSignTransaction(txParams, req);
}
//
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,8 @@
"@metamask/signature-controller@^6.1.2": "patch:@metamask/signature-controller@npm%3A6.1.2#~/.yarn/patches/@metamask-signature-controller-npm-6.1.2-f60d8a4960.patch",
"semver@7.3.7": "^7.5.4",
"semver@7.3.8": "^7.5.4",
"@metamask/eth-keyring-controller@npm:^13.0.1": "patch:@metamask/eth-keyring-controller@npm%3A13.0.1#~/.yarn/patches/@metamask-eth-keyring-controller-npm-13.0.1-06ff83faad.patch"
"@metamask/eth-keyring-controller@npm:^13.0.1": "patch:@metamask/eth-keyring-controller@npm%3A13.0.1#~/.yarn/patches/@metamask-eth-keyring-controller-npm-13.0.1-06ff83faad.patch",
"@metamask/eth-json-rpc-middleware@npm:^12.0.0": "patch:@metamask/eth-json-rpc-middleware@npm%3A12.0.0#~/.yarn/patches/@metamask-eth-json-rpc-middleware-npm-12.0.0-0e9d7bc980.patch"
},
"dependencies": {
"@babel/runtime": "^7.23.2",
Expand Down Expand Up @@ -245,7 +246,7 @@
"@metamask/controller-utils": "^5.0.0",
"@metamask/design-tokens": "^1.12.0",
"@metamask/desktop": "^0.3.0",
"@metamask/eth-json-rpc-middleware": "^12.0.0",
"@metamask/eth-json-rpc-middleware": "patch:@metamask/eth-json-rpc-middleware@npm%3A12.0.0#~/.yarn/patches/@metamask-eth-json-rpc-middleware-npm-12.0.0-0e9d7bc980.patch",
"@metamask/eth-keyring-controller": "^13.0.1",
"@metamask/eth-ledger-bridge-keyring": "^0.15.0",
"@metamask/eth-snap-keyring": "^1.0.0",
Expand Down

0 comments on commit 5304bbd

Please sign in to comment.