Skip to content

Commit

Permalink
Revert "Move eth_sendTransaction method handler to a separate module (
Browse files Browse the repository at this point in the history
#5968)" (#6021)

This reverts commit 49a6305.
  • Loading branch information
Cal-L authored Mar 22, 2023
1 parent 0e676ba commit 3b02cc9
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 278 deletions.
24 changes: 6 additions & 18 deletions app/core/RPCMethods/RPCMethodMiddleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -326,25 +326,13 @@ export const getRpcMethodMiddleware = ({
eth_coinbase: getEthAccounts,
eth_sendTransaction: async () => {
checkTabActive();
return RPCMethods.eth_sendTransaction({
next,
req,
res,
validateAccountAndChainId: async ({
from,
chainId,
}: {
from?: string;
chainId?: number;
}) => {
await checkActiveAccountAndChainId({
hostname,
address: from,
chainId,
checkSelectedAddress: isMMSDK || isWalletConnect,
});
},
await checkActiveAccountAndChainId({
hostname,
address: req.params[0].from,
chainId: req.params[0].chainId,
checkSelectedAddress: isMMSDK || isWalletConnect,
});
next();
},
eth_signTransaction: async () => {
// This is implemented later in our middleware stack – specifically, in
Expand Down
110 changes: 0 additions & 110 deletions app/core/RPCMethods/eth_sendTransaction.test.ts

This file was deleted.

55 changes: 0 additions & 55 deletions app/core/RPCMethods/eth_sendTransaction.ts

This file was deleted.

2 changes: 0 additions & 2 deletions app/core/RPCMethods/index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import eth_sendTransaction from './eth_sendTransaction';
import wallet_addEthereumChain from './wallet_addEthereumChain.js';
import wallet_switchEthereumChain from './wallet_switchEthereumChain.js';

const RPCMethods = {
eth_sendTransaction,
wallet_addEthereumChain,
wallet_switchEthereumChain,
};
Expand Down
2 changes: 1 addition & 1 deletion metro.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ module.exports = (async () => {
},
resolver: {
assetExts: assetExts.filter((ext) => ext !== 'svg'),
sourceExts: [...sourceExts, 'svg', 'cjs'],
sourceExts: [...sourceExts, 'svg'],
},
maxWorkers: 2,
};
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -152,12 +152,11 @@
"@metamask/message-manager": "^1.0.1",
"@metamask/network-controller": "^2.0.0",
"@metamask/permission-controller": "^1.0.2",
"@metamask/phishing-controller": "^2.0.0",
"@metamask/preferences-controller": "^2.1.0",
"@metamask/sdk-communication-layer": "0.2.0",
"@metamask/phishing-controller": "^2.0.0",
"@metamask/swaps-controller": "^6.8.0",
"@metamask/transaction-controller": "^2.0.0",
"@metamask/utils": "^5.0.0",
"@ngraveio/bc-ur": "^1.1.6",
"@react-native-async-storage/async-storage": "^1.17.10",
"@react-native-clipboard/clipboard": "^1.8.4",
Expand Down
Loading

0 comments on commit 3b02cc9

Please sign in to comment.