diff --git a/src/components/modals/OperationDetails.js b/src/components/modals/OperationDetails.js index 0123f57b..8110b92f 100644 --- a/src/components/modals/OperationDetails.js +++ b/src/components/modals/OperationDetails.js @@ -243,16 +243,13 @@ const OperationDetails = connect(mapStateToProps)((props: Props) => { - - - {url ? ( + {url && ( + - ) : null} - + + )} ) }) diff --git a/src/components/modals/Send/index.js b/src/components/modals/Send/index.js index c0f15263..2ecdee86 100644 --- a/src/components/modals/Send/index.js +++ b/src/components/modals/Send/index.js @@ -20,7 +20,7 @@ import type { StepProps as DefaultStepProps } from 'components/base/Stepper' import { getCurrentDevice } from 'reducers/devices' import { accountsSelector } from 'reducers/accounts' -import { closeModal } from 'reducers/modals' +import { closeModal, openModal } from 'reducers/modals' import Modal from 'components/base/Modal' import Stepper from 'components/base/Stepper' @@ -38,6 +38,7 @@ type Props = { device: ?Device, accounts: Account[], closeModal: string => void, + openModal: (string, any) => void, updateAccountWithUpdater: (string, (Account) => Account) => void, } @@ -62,6 +63,7 @@ export type StepProps = DefaultStepProps & { error: ?Error, optimisticOperation: ?Operation, closeModal: void => void, + openModal: (string, any) => void, isAppOpened: boolean, onChangeAccount: (?Account) => void, onChangeAppOpened: boolean => void, @@ -111,6 +113,7 @@ const mapStateToProps = createStructuredSelector({ const mapDispatchToProps = { closeModal, + openModal, updateAccountWithUpdater, } @@ -128,10 +131,8 @@ const INITIAL_STATE = { } class SendModal extends PureComponent> { + state = INITIAL_STATE - STEPS = createSteps({ t: this.props.t }) - _signTransactionSub = null - _isUnmounted = false componentWillUnmount() { if (this._signTransactionSub) { @@ -139,6 +140,10 @@ class SendModal extends PureComponent> { } } + STEPS = createSteps({ t: this.props.t }) + _signTransactionSub = null + _isUnmounted = false + handleReset = () => this.setState({ ...INITIAL_STATE }) handleCloseModal = () => this.props.closeModal(MODAL_SEND) @@ -218,7 +223,7 @@ class SendModal extends PureComponent> { } render() { - const { t, device } = this.props + const { t, device, openModal } = this.props const { stepId, account, @@ -239,6 +244,7 @@ class SendModal extends PureComponent> { isAppOpened, error, optimisticOperation, + openModal, closeModal: this.handleCloseModal, onChangeAccount: this.handleChangeAccount, onChangeAppOpened: this.handleChangeAppOpened, diff --git a/src/components/modals/Send/steps/04-step-confirmation.js b/src/components/modals/Send/steps/04-step-confirmation.js index 8d06c56c..e73f12dc 100644 --- a/src/components/modals/Send/steps/04-step-confirmation.js +++ b/src/components/modals/Send/steps/04-step-confirmation.js @@ -1,10 +1,10 @@ // @flow import React, { Fragment } from 'react' -import { shell } from 'electron' import styled from 'styled-components' import { getAccountOperationExplorer } from '@ledgerhq/live-common/lib/explorers' +import { MODAL_OPERATION_DETAILS } from 'config/constants' import { colors } from 'styles/theme' import { multiline } from 'styles/helpers' @@ -83,6 +83,7 @@ export function StepConfirmationFooter({ onRetry, optimisticOperation, error, + openModal, closeModal, }: StepProps<*>) { const url = @@ -96,8 +97,13 @@ export function StepConfirmationFooter({