@fluent-wallet/wallet_send-transaction 1.0.3 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +10 -8
  2. package/package.json +2 -2
package/index.js CHANGED
@@ -88,14 +88,16 @@ export const main = async ({
88
88
  [...params, {dryRun: true}],
89
89
  )
90
90
  } catch (err) {
91
- if (err?.code === ERROR.USER_REJECTED.code) throw err
92
- err.message = `Error while processing tx.\nparams:\n${JSON.stringify(
93
- params,
94
- null,
95
- 2,
96
- )}\nerror:\n${err.message}`
97
-
98
- throw err
91
+ if (!/Can not estimate.*NotEnoughCash/i.test(err.message)) {
92
+ if (err?.code === ERROR.USER_REJECTED.code) throw err
93
+ err.message = `Error while processing tx.\nparams:\n${JSON.stringify(
94
+ params,
95
+ null,
96
+ 2,
97
+ )}\nerror:\n${err.message}`
98
+
99
+ throw err
100
+ }
99
101
  }
100
102
 
101
103
  if (
package/package.json CHANGED
@@ -3,11 +3,11 @@
3
3
  "type": "module",
4
4
  "main": "index.js",
5
5
  "packageManager": "yarn@3.1.0",
6
- "version": "1.0.3",
6
+ "version": "1.0.4",
7
7
  "dependencies": {
8
8
  "@ethersproject/bignumber": "5.6.0",
9
9
  "@fluent-wallet/cfx_send-transaction": "0.1.2",
10
- "@fluent-wallet/consts": "0.0.18",
10
+ "@fluent-wallet/consts": "0.0.19",
11
11
  "@fluent-wallet/eth_send-transaction": "1.1.0",
12
12
  "@fluent-wallet/json-rpc-error": "1.1.0",
13
13
  "@fluent-wallet/signature": "0.0.16",