@@ -77,28 +77,28 @@ function checkError(method: string, error: any, params: any): any {
77
77
const transaction = params . transaction || params . signedTransaction ;
78
78
79
79
// "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 ) ) {
81
81
logger . throwError ( "insufficient funds for intrinsic transaction cost" , Logger . errors . INSUFFICIENT_FUNDS , {
82
82
error, method, transaction
83
83
} ) ;
84
84
}
85
85
86
86
// "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 ) ) {
88
88
logger . throwError ( "nonce has already been used" , Logger . errors . NONCE_EXPIRED , {
89
89
error, method, transaction
90
90
} ) ;
91
91
}
92
92
93
93
// "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 ) ) {
95
95
logger . throwError ( "replacement fee too low" , Logger . errors . REPLACEMENT_UNDERPRICED , {
96
96
error, method, transaction
97
97
} ) ;
98
98
}
99
99
100
100
// "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 ) ) {
102
102
logger . throwError ( "legacy pre-eip-155 transactions not supported" , Logger . errors . UNSUPPORTED_OPERATION , {
103
103
error, method, transaction
104
104
} ) ;
0 commit comments