@@ -45,13 +45,13 @@ jest.mock('../../util/transaction-controller', () => ({
4545 * @returns The JSON-RPC request.
4646 */
4747function constructSendTransactionRequest (
48- params : JsonRpcParams ,
49- ) : JsonRpcRequest < JsonRpcParams > & { method : 'eth_sendTransaction' } {
48+ params : Json [ ] ,
49+ ) : JsonRpcRequest < [ Transaction & JsonRpcParams ] > & { method : 'eth_sendTransaction' } {
5050 return {
5151 jsonrpc : '2.0' ,
5252 id : 1 ,
5353 method : 'eth_sendTransaction' ,
54- params,
54+ params : params as any ,
5555 } ;
5656}
5757
@@ -151,7 +151,7 @@ describe('eth_sendTransaction', () => {
151151 hostname : 'example.metamask.io' ,
152152 req : constructSendTransactionRequest ( [
153153 mockTransactionParameters as unknown as JsonRpcParams ,
154- ] ) ,
154+ ] ) as any ,
155155 res : pendingResult ,
156156 sendTransaction : getMockAddTransaction ( {
157157 expectedTransaction : mockTransactionParameters ,
@@ -173,7 +173,7 @@ describe('eth_sendTransaction', () => {
173173 async ( ) =>
174174 await eth_sendTransaction ( {
175175 hostname : 'example.metamask.io' ,
176- req : constructSendTransactionRequest ( invalidParameter ) ,
176+ req : constructSendTransactionRequest ( invalidParameter as unknown as Json [ ] ) ,
177177 res : constructPendingJsonRpcResponse ( ) ,
178178 sendTransaction : getMockAddTransaction ( {
179179 returnValue : 'fake-hash' ,
@@ -195,7 +195,7 @@ describe('eth_sendTransaction', () => {
195195 async ( ) =>
196196 await eth_sendTransaction ( {
197197 hostname : 'example.metamask.io' ,
198- req : constructSendTransactionRequest ( invalidParameter ) ,
198+ req : constructSendTransactionRequest ( invalidParameter as unknown as Json [ ] ) ,
199199 res : constructPendingJsonRpcResponse ( ) ,
200200 sendTransaction : getMockAddTransaction ( {
201201 returnValue : 'fake-hash' ,
0 commit comments