diff --git a/src/components/modals/Send/index.js b/src/components/modals/Send/index.js index 2f4bbafe..e78eaecf 100644 --- a/src/components/modals/Send/index.js +++ b/src/components/modals/Send/index.js @@ -44,6 +44,7 @@ type Props = { type State = { stepId: string, + openedFromAccount: boolean, account: ?Account, bridge: ?WalletBridge, transaction: ?Transaction, @@ -54,6 +55,7 @@ type State = { } export type StepProps = DefaultStepProps & { + openedFromAccount: boolean, device: ?Device, account: ?Account, bridge: ?WalletBridge, @@ -118,6 +120,7 @@ const mapDispatchToProps = { const INITIAL_STATE = { stepId: 'amount', amount: 0, + openedFromAccount: false, account: null, bridge: null, transaction: null, @@ -151,7 +154,12 @@ class SendModal extends PureComponent> { const account = (data && data.account) || accounts[0] const bridge = account ? getBridgeForCurrency(account.currency) : null const transaction = bridge ? bridge.createTransaction(account) : null - this.setState({ account, bridge, transaction }) + this.setState({ + openedFromAccount: !!(data && data.account), + account, + bridge, + transaction, + }) } } @@ -227,6 +235,7 @@ class SendModal extends PureComponent> { const { t, device, openModal } = this.props const { stepId, + openedFromAccount, account, isAppOpened, bridge, @@ -237,6 +246,7 @@ class SendModal extends PureComponent> { const addtionnalProps = { device, + openedFromAccount, account, bridge, transaction, diff --git a/src/components/modals/Send/steps/01-step-amount.js b/src/components/modals/Send/steps/01-step-amount.js index 0e2524d0..3461a4d7 100644 --- a/src/components/modals/Send/steps/01-step-amount.js +++ b/src/components/modals/Send/steps/01-step-amount.js @@ -20,6 +20,7 @@ export default ({ t, account, bridge, + openedFromAccount, transaction, onChangeAccount, onChangeTransaction, @@ -35,14 +36,14 @@ export default ({ - + {account && bridge && transaction && (