diff --git a/src/components/modals/AddAccount/index.js b/src/components/modals/AddAccount/index.js index 07b82a8b..b719c189 100644 --- a/src/components/modals/AddAccount/index.js +++ b/src/components/modals/AddAccount/index.js @@ -22,6 +22,7 @@ import Button from 'components/base/Button' import Modal, { ModalContent, ModalTitle, ModalFooter, ModalBody } from 'components/base/Modal' import StepConnectDevice from 'components/modals/StepConnectDevice' import { getBridgeForCurrency } from 'bridge' +import CounterValues from 'helpers/countervalues' import StepCurrency from './01-step-currency' import StepImport from './03-step-import' @@ -53,6 +54,7 @@ type Props = { closeModal: Function, t: T, updateAccount: Function, + counterValuesPolling: *, } type State = { @@ -164,6 +166,8 @@ class AddAccountModal extends PureComponent { selectedAccounts.forEach(a => updateAccount({ ...a, archived: false })) this.setState({ selectedAccounts: [] }) closeModal(MODAL_ADD_ACCOUNT) + this.props.counterValuesPolling.poll() + this.props.counterValuesPolling.flush() } handleNextStep = () => { @@ -288,4 +292,16 @@ class AddAccountModal extends PureComponent { } } -export default compose(connect(mapStateToProps, mapDispatchToProps), translate())(AddAccountModal) +// FIXME This is kinda ugly architecture right now. +// I think we should delegate more work to individual steps +// e.g. each step is responsible to connect to redux, not at top level. + +const AddAccountModalAndCounterValues = props => ( + + {cvPolling => } + +) + +export default compose(connect(mapStateToProps, mapDispatchToProps), translate())( + AddAccountModalAndCounterValues, +) diff --git a/src/internals/manager/constants.js b/src/internals/manager/constants.js index d4562412..61d50650 100644 --- a/src/internals/manager/constants.js +++ b/src/internals/manager/constants.js @@ -1,6 +1,6 @@ // Socket endpoint -export const BASE_SOCKET_URL = 'ws://api.ledgerwallet.com/update/install' +export const BASE_SOCKET_URL = 'ws://api.ledgerwallet.com/update' // If you want to test locally with https://github.com/LedgerHQ/ledger-update-python-api // export const BASE_SOCKET_URL = 'ws://localhost:3001/update'