Skip to content

Commit

Permalink
fix(erc20-actions): fix merge
Browse files Browse the repository at this point in the history
  • Loading branch information
bludnic committed Oct 27, 2023
1 parent fda80a8 commit d7bc161
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/store/modules/erc20/erc20-actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { FetchStatus, INCREASE_FEE_MULTIPLIER } from '@/lib/constants'
import EthContract from 'web3-eth-contract'
import Erc20 from './erc20.abi.json'
import createActions from '../eth-base/eth-base-actions'
import getEndpointUrl from '@/lib/getEndpointUrl'
import { getRandomNodeUrl } from '@/config/utils'
import { AbiDecoder } from '@/lib/abi/abi-decoder'

/** Timestamp of the most recent status update */
Expand Down Expand Up @@ -73,7 +73,7 @@ const createSpecificActions = (api) => ({

try {
const contract = new EthContract(Erc20, state.contractAddress)
const endpoint = getEndpointUrl('ETH')
const endpoint = getRandomNodeUrl('eth')
contract.setProvider(endpoint)
const rawBalance = await contract.methods.balanceOf(state.address).call()
const balance = Number(ethUtils.toFraction(rawBalance, state.decimals))
Expand All @@ -92,7 +92,7 @@ const createSpecificActions = (api) => ({
if (!context.state.address) return

const contract = new EthContract(Erc20, context.state.contractAddress)
const endpoint = getEndpointUrl('ETH')
const endpoint = getRandomNodeUrl('eth')
contract.setProvider(endpoint)

contract.methods
Expand Down

0 comments on commit d7bc161

Please sign in to comment.