|
@ -15,6 +15,7 @@ import { getBridgeForCurrency } from 'bridge' |
|
|
|
|
|
|
|
|
import { accountsSelector } from 'reducers/accounts' |
|
|
import { accountsSelector } from 'reducers/accounts' |
|
|
import { updateAccountWithUpdater } from 'actions/accounts' |
|
|
import { updateAccountWithUpdater } from 'actions/accounts' |
|
|
|
|
|
import createCustomErrorClass from 'helpers/createCustomErrorClass' |
|
|
|
|
|
|
|
|
import { MODAL_SEND } from 'config/constants' |
|
|
import { MODAL_SEND } from 'config/constants' |
|
|
import Modal, { ModalBody, ModalContent, ModalTitle } from 'components/base/Modal' |
|
|
import Modal, { ModalBody, ModalContent, ModalTitle } from 'components/base/Modal' |
|
@ -32,6 +33,8 @@ import StepAmount from './01-step-amount' |
|
|
import StepVerification from './03-step-verification' |
|
|
import StepVerification from './03-step-verification' |
|
|
import StepConfirmation from './04-step-confirmation' |
|
|
import StepConfirmation from './04-step-confirmation' |
|
|
|
|
|
|
|
|
|
|
|
export const UserRefusedOnDevice = createCustomErrorClass('UserRefusedOnDevice') |
|
|
|
|
|
|
|
|
type Props = { |
|
|
type Props = { |
|
|
updateAccountWithUpdater: (string, (Account) => Account) => void, |
|
|
updateAccountWithUpdater: (string, (Account) => Account) => void, |
|
|
accounts: Account[], |
|
|
accounts: Account[], |
|
@ -226,14 +229,11 @@ class SendModal extends Component<Props, State<*>> { |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
onOperationError = (error: Error) => { |
|
|
onOperationError = (error: *) => { |
|
|
// $FlowFixMe
|
|
|
this.setState({ |
|
|
if (error.statusCode === 0x6985) { |
|
|
error: error.statusCode === 0x6985 ? new UserRefusedOnDevice() : error, |
|
|
// User denied on device
|
|
|
stepIndex: 3, |
|
|
this.setState({ error }) |
|
|
}) |
|
|
} else { |
|
|
|
|
|
this.setState({ error, stepIndex: 3 }) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
onChangeAccount = account => { |
|
|
onChangeAccount = account => { |
|
|