From 957e02f313626ef3f4850ddf94dcd08bfb0d6a28 Mon Sep 17 00:00:00 2001 From: Szymon Lesisz Date: Sun, 23 Sep 2018 08:19:38 +0200 Subject: [PATCH] eslint --- src/actions/BlockchainActions.js | 4 ++-- src/actions/Web3Actions.js | 8 ++++---- src/views/Wallet/views/AccountSend/index.js | 1 - 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/actions/BlockchainActions.js b/src/actions/BlockchainActions.js index 20e3c77a..24c50251 100644 --- a/src/actions/BlockchainActions.js +++ b/src/actions/BlockchainActions.js @@ -1,10 +1,8 @@ /* @flow */ -import EthereumjsUtil from 'ethereumjs-util'; import TrezorConnect from 'trezor-connect'; import BigNumber from 'bignumber.js'; import * as BLOCKCHAIN from 'actions/constants/blockchain'; -import * as PENDING from 'actions/constants/pendingTx'; import type { TrezorDevice, @@ -128,6 +126,7 @@ export const onBlockMined = (coinInfo: any): PromiseAction => async (dispa // not used for now, waiting for fix in blockbook +/* export const onNotification = (payload: any): PromiseAction => async (dispatch: Dispatch, getState: GetState): Promise => { // this event can be triggered multiple times // 1. check if pair [txid + address] is already in reducer @@ -166,6 +165,7 @@ export const onNotification = (payload: any): PromiseAction => async (disp } } }; +*/ export const subscribe = (network: string): PromiseAction => async (dispatch: Dispatch, getState: GetState): Promise => { diff --git a/src/actions/Web3Actions.js b/src/actions/Web3Actions.js index 82249a80..a8d9491c 100644 --- a/src/actions/Web3Actions.js +++ b/src/actions/Web3Actions.js @@ -135,7 +135,7 @@ export const discoverAccount = (address: string, network: string): PromiseAction export const resolvePendingTransactions = (network: string): PromiseAction => async (dispatch: Dispatch, getState: GetState): Promise => { const instance: Web3Instance = await dispatch(initWeb3(network)); const pending = getState().pending.filter(p => p.network === network); - for (const tx of pending) { + pending.forEach(async (tx) => { const status = await instance.web3.eth.getTransaction(tx.id); if (!status) { dispatch({ @@ -158,7 +158,7 @@ export const resolvePendingTransactions = (network: string): PromiseAction }); } } - } + }); }; /* @@ -205,7 +205,7 @@ export const updateAccount = (account: Account, newAccount: EthereumAccount, net export const updateAccountTokens = (account: Account): PromiseAction => async (dispatch: Dispatch, getState: GetState): Promise => { const tokens = getState().tokens.filter(t => t.network === account.network && t.ethAddress === account.address); - for (const token of tokens) { + tokens.forEach(async (token) => { const balance = await dispatch(getTokenBalance(token)); // const newBalance: string = balance.dividedBy(Math.pow(10, token.decimals)).toString(10); if (balance !== token.balance) { @@ -215,7 +215,7 @@ export const updateAccountTokens = (account: Account): PromiseAction => as balance, )); } - } + }); }; export const getTokenInfo = (address: string, network: string): PromiseAction => async (dispatch: Dispatch): Promise => { diff --git a/src/views/Wallet/views/AccountSend/index.js b/src/views/Wallet/views/AccountSend/index.js index 64863ab3..77616db6 100644 --- a/src/views/Wallet/views/AccountSend/index.js +++ b/src/views/Wallet/views/AccountSend/index.js @@ -195,7 +195,6 @@ const AccountSend = (props: Props) => { errors, warnings, infos, - data, sending, advanced, } = props.sendForm;