Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REVERT] Move eth_sendTransaction method handler to a separate module (#5968) #6021

Merged
merged 1 commit into from
Mar 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 6 additions & 18 deletions app/core/RPCMethods/RPCMethodMiddleware.ts
Original file line number Diff line number Diff line change
@@ -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
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,
};
2 changes: 1 addition & 1 deletion metro.config.js
Original file line number Diff line number Diff line change
@@ -32,7 +32,7 @@ module.exports = (async () => {
},
resolver: {
assetExts: assetExts.filter((ext) => ext !== 'svg'),
sourceExts: [...sourceExts, 'svg', 'cjs'],
sourceExts: [...sourceExts, 'svg'],
},
maxWorkers: 2,
};
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -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",
Loading