@exodus/ethereum-api 2.26.3 → 3.1.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/ethereum-api",
3
- "version": "2.26.3",
3
+ "version": "3.1.0",
4
4
  "description": "Ethereum Api",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -34,5 +34,5 @@
34
34
  "devDependencies": {
35
35
  "@exodus/models": "^8.10.4"
36
36
  },
37
- "gitHead": "0fefa0bb464c8abb4cc510090fb7b8a5a4c68dfd"
37
+ "gitHead": "d97519a8bacb8f2d9700248b2d7723fef284c56c"
38
38
  }
@@ -8,8 +8,6 @@ import SolidityContract from '@exodus/solidity-contract'
8
8
  import { bufferToHex } from '@exodus/ethereumjs-util'
9
9
  import { randomUUID } from '@exodus/crypto/randomUUID'
10
10
 
11
- import { resolveEnsAddress, resolveEnsName } from '../ens'
12
-
13
11
  const RETRY_DELAYS = ['10s']
14
12
 
15
13
  export function create(defaultURL, ensAssetName) {
@@ -242,11 +240,5 @@ export function create(defaultURL, ensAssetName) {
242
240
  },
243
241
  }
244
242
 
245
- return ensAssetName === 'ethereum'
246
- ? {
247
- ...api,
248
- resolveEnsName: (name) => resolveEnsName(name, api),
249
- resolveEnsAddress: (address) => resolveEnsAddress(address, api),
250
- }
251
- : api
243
+ return api
252
244
  }
@@ -222,8 +222,9 @@ export class EthereumMonitor extends BaseMonitor {
222
222
  const newAccountState = {}
223
223
  const server = this.server
224
224
  if (isRpcBalanceAsset(asset)) {
225
- const { confirmed } = await server.getBalance(ourWalletAddress)
226
- newAccountState.balance = asset.currency.baseUnit(confirmed.value)
225
+ const balanceHex = await server.getBalanceProxied(ourWalletAddress)
226
+ const balance = parseInt(balanceHex, 16)
227
+ newAccountState.balance = asset.currency.baseUnit(balance)
227
228
  }
228
229
  const tokenBalancePairs = await Promise.all(
229
230
  tokens