Browse Source

Send: step4: Fix missing Button in some coins like stealth

master
Gaëtan Renaudeau 7 years ago
parent
commit
995f0fc085
  1. 37
      src/components/modals/Send/steps/04-step-confirmation.js

37
src/components/modals/Send/steps/04-step-confirmation.js

@ -2,7 +2,6 @@
import React, { Fragment } from 'react' import React, { Fragment } from 'react'
import styled from 'styled-components' import styled from 'styled-components'
import { getAccountOperationExplorer } from '@ledgerhq/live-common/lib/explorers'
import { MODAL_OPERATION_DETAILS } from 'config/constants' import { MODAL_OPERATION_DETAILS } from 'config/constants'
import { colors } from 'styles/theme' import { colors } from 'styles/theme'
@ -82,29 +81,25 @@ export function StepConfirmationFooter({
openModal, openModal,
closeModal, closeModal,
}: StepProps<*>) { }: StepProps<*>) {
const url =
optimisticOperation && account && getAccountOperationExplorer(account, optimisticOperation)
return ( return (
<Fragment> <Fragment>
{optimisticOperation ? ( {optimisticOperation ? (
url ? ( <Button
<Button ml={2}
ml={2} event="Send Flow Step 4 View OpD Clicked"
event="Send Flow Step 4 View OpD Clicked" onClick={() => {
onClick={() => { closeModal()
closeModal() if (account && optimisticOperation) {
if (account && optimisticOperation) { openModal(MODAL_OPERATION_DETAILS, {
openModal(MODAL_OPERATION_DETAILS, { operationId: optimisticOperation.id,
operationId: optimisticOperation.id, accountId: account.id,
accountId: account.id, })
}) }
} }}
}} primary
primary >
> {t('app:send.steps.confirmation.success.cta')}
{t('app:send.steps.confirmation.success.cta')} </Button>
</Button>
) : null
) : error ? ( ) : error ? (
<Button <Button
ml={2} ml={2}

Loading…
Cancel
Save