@exodus/ethereum-api 4.0.4 → 4.0.5

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.
package/LICENSE.md ADDED
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/ethereum-api",
3
- "version": "4.0.4",
3
+ "version": "4.0.5",
4
4
  "description": "Ethereum Api",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -35,5 +35,6 @@
35
35
  },
36
36
  "devDependencies": {
37
37
  "@exodus/models": "^8.10.4"
38
- }
38
+ },
39
+ "gitHead": "7d95fb30d3a509ae2db3740a35b622b9a2c02fc3"
39
40
  }
@@ -45,7 +45,7 @@ export default class ApiCoinNodesServer extends EventEmitter {
45
45
 
46
46
  const result = response?.result
47
47
  const error = response?.error
48
- if (error || !result) {
48
+ if (error || result === undefined) {
49
49
  const message = error?.message || error?.code || 'no result'
50
50
  throw new Error(`Bad rpc response: ${message}`)
51
51
  }
@@ -154,7 +154,7 @@ export default class ClarityServer extends EventEmitter {
154
154
  const response = await this.sendRpcRequest(request)
155
155
  const result = response?.result
156
156
  const error = response?.error
157
- if (error || !result) {
157
+ if (error || result === undefined) {
158
158
  const message = error?.message || error?.code || 'no result'
159
159
  throw new Error(`Bad rpc response: ${message}`)
160
160
  }