File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
packages/experimental/src.ts Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -27,9 +27,13 @@ export class Eip1193Bridge extends EventEmitter {
2727 ethers . utils . defineReadOnly ( this , "provider" , provider || null ) ;
2828 }
2929
30+ request ( request : { method : string , params ?: Array < any > } ) : Promise < any > {
31+ return this . send ( request . method , request . params || [ ] ) ;
32+ }
33+
3034 async send ( method : string , params ?: Array < any > ) : Promise < any > {
3135 function throwUnsupported ( message : string ) : never {
32- return logger . throwError ( "eth_sign requires a signer" , ethers . utils . Logger . errors . UNSUPPORTED_OPERATION , {
36+ return logger . throwError ( message , ethers . utils . Logger . errors . UNSUPPORTED_OPERATION , {
3337 method : method ,
3438 params : params
3539 } ) ;
@@ -125,7 +129,7 @@ export class Eip1193Bridge extends EventEmitter {
125129
126130 case "eth_sendTransaction" : {
127131 if ( ! this . signer ) {
128- return throwUnsupported ( "eth_sign requires an account" ) ;
132+ return throwUnsupported ( "eth_sendTransaction requires an account" ) ;
129133 }
130134
131135 const req = ethers . providers . JsonRpcProvider . hexlifyTransaction ( params [ 0 ] ) ;
You can’t perform that action at this time.
0 commit comments