Browse Source

Merge branch 'master' into master

master
Gaëtan Renaudeau 7 years ago
committed by GitHub
parent
commit
3412ca8e80
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 18
      src/components/modals/AddAccount/index.js
  2. 2
      src/internals/manager/constants.js

18
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<Props, State> {
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<Props, State> {
}
}
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 => (
<CounterValues.PollingConsumer>
{cvPolling => <AddAccountModal counterValuesPolling={cvPolling} {...props} />}
</CounterValues.PollingConsumer>
)
export default compose(connect(mapStateToProps, mapDispatchToProps), translate())(
AddAccountModalAndCounterValues,
)

2
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'

Loading…
Cancel
Save