@@ -77,28 +77,28 @@ function checkError(method: string, error: any, params: any): any {
7777 const transaction = params . transaction || params . signedTransaction ;
7878
7979 // "insufficient funds for gas * price + value + cost(data)"
80- if ( message . match ( / i n s u f f i c i e n t f u n d s | b a s e f e e e x c e e d s g a s l i m i t / ) ) {
80+ if ( message . match ( / i n s u f f i c i e n t f u n d s | b a s e f e e e x c e e d s g a s l i m i t / i ) ) {
8181 logger . throwError ( "insufficient funds for intrinsic transaction cost" , Logger . errors . INSUFFICIENT_FUNDS , {
8282 error, method, transaction
8383 } ) ;
8484 }
8585
8686 // "nonce too low"
87- if ( message . match ( / n o n c e ( i s ) ? t o o l o w / ) ) {
87+ if ( message . match ( / n o n c e ( i s ) ? t o o l o w / i ) ) {
8888 logger . throwError ( "nonce has already been used" , Logger . errors . NONCE_EXPIRED , {
8989 error, method, transaction
9090 } ) ;
9191 }
9292
9393 // "replacement transaction underpriced"
94- if ( message . match ( / r e p l a c e m e n t t r a n s a c t i o n u n d e r p r i c e d / ) ) {
94+ if ( message . match ( / r e p l a c e m e n t t r a n s a c t i o n u n d e r p r i c e d | t r a n s a c t i o n g a s p r i c e . * t o o l o w / i ) ) {
9595 logger . throwError ( "replacement fee too low" , Logger . errors . REPLACEMENT_UNDERPRICED , {
9696 error, method, transaction
9797 } ) ;
9898 }
9999
100100 // "replacement transaction underpriced"
101- if ( message . match ( / o n l y r e p l a y - p r o t e c t e d / ) ) {
101+ if ( message . match ( / o n l y r e p l a y - p r o t e c t e d / i ) ) {
102102 logger . throwError ( "legacy pre-eip-155 transactions not supported" , Logger . errors . UNSUPPORTED_OPERATION , {
103103 error, method, transaction
104104 } ) ;
0 commit comments