Skip to content

Commit d0a49ea

Browse files
authored
improve eth_sendtransaction args validation (#121)
1 parent 15153ab commit d0a49ea

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/injected/injectWalletGuard.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ const addWalletGuardProxy = (provider: any) => {
103103
let response;
104104

105105
if (request.method === 'eth_sendTransaction') {
106-
if (request.params.length !== 1) {
106+
if (request.params.length < 1) {
107107
// Forward the request anyway.
108108
log.warn('Unexpected argument length.');
109109
return Reflect.apply(target, thisArg, args);
@@ -271,7 +271,7 @@ const addWalletGuardProxy = (provider: any) => {
271271
}
272272

273273
if (request.method === 'eth_sendTransaction') {
274-
if (request.params.length !== 1) {
274+
if (request.params.length < 1) {
275275
// Forward the request anyway.
276276
log.warn('Unexpected argument length.');
277277
return Reflect.apply(target, thisArg, args);

src/lib/simulation/requests.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ export class RequestManager {
9191
method: args.method,
9292
};
9393
} else {
94-
console.warn('Unexpected Request', args);
94+
console.warn('Unexpected Request');
9595
request = {
9696
...args,
9797
id,

0 commit comments

Comments
 (0)