Skip to content

Commit

Permalink
🐛 Fix account actions to use the token-agnostic getTransactions
Browse files Browse the repository at this point in the history
  • Loading branch information
slaweet committed Apr 26, 2019
1 parent e9bb0f4 commit cc06a25
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/actions/account.js
Expand Up @@ -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';
Expand Down Expand Up @@ -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({
Expand Down

0 comments on commit cc06a25

Please sign in to comment.