diff --git a/src/actions/account.js b/src/actions/account.js index abaf7a6634..9161e7fa73 100644 --- a/src/actions/account.js +++ b/src/actions/account.js @@ -2,7 +2,7 @@ import i18next from 'i18next'; import actionTypes from '../constants/actions'; import { setSecondPassphrase, getAccount } from '../utils/api/account'; import { registerDelegate, getDelegate, getAllVotes, getVoters } from '../utils/api/delegate'; -import { getTransactions } from '../utils/api/transactions'; +import { getTransactions, getTokenFromAddress } from '../utils/api/transactions'; import { getBlocks } from '../utils/api/blocks'; import { loadTransactionsFinish, transactionsUpdated } from './transactions'; import { delegateRegisteredFailure } from './delegate'; @@ -263,8 +263,9 @@ export const updateAccountDelegateStats = account => async (dispatch, getState) => { const liskAPIClient = getState().peers.liskAPIClient; const { address, publicKey } = account; + const apiClient = getAPIClient(getTokenFromAddress(address), getState()); const transaction = await getTransactions({ - liskAPIClient, address, limit: 1, type: transactionTypes.registerDelegate, + apiClient, address, limit: 1, type: transactionTypes.registerDelegate, }); const block = await getBlocks(liskAPIClient, { generatorPublicKey: publicKey, limit: 1 }); dispatch(delegateStatsLoaded({