From 85e79ff6ad143c51493176636557955d5b4c10e7 Mon Sep 17 00:00:00 2001 From: Anastasia Poupeney Date: Wed, 4 Jul 2018 22:30:13 +0200 Subject: [PATCH] fixing bug on Contact Us doing nothing on the receive flow Reject screen --- src/components/modals/Receive/index.js | 8 +++++++- .../modals/Receive/steps/03-step-confirm-address.js | 4 ++-- src/config/support.js | 3 +++ 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/components/modals/Receive/index.js b/src/components/modals/Receive/index.js index 52fe9c88..8e68c04e 100644 --- a/src/components/modals/Receive/index.js +++ b/src/components/modals/Receive/index.js @@ -12,6 +12,8 @@ import Track from 'analytics/Track' import type { Account } from '@ledgerhq/live-common/lib/types' import { MODAL_RECEIVE } from 'config/constants' +import { openURL } from 'helpers/linking' +import { urls } from 'config/support' import type { T, Device } from 'types/common' import type { StepProps as DefaultStepProps } from 'components/base/Stepper' @@ -56,6 +58,7 @@ export type StepProps = DefaultStepProps & { onChangeAccount: (?Account) => void, onChangeAppOpened: boolean => void, onChangeAddressVerified: (?boolean, ?Error) => void, + contactUs: () => void, } const createSteps = ({ t }: { t: T }) => [ @@ -129,7 +132,9 @@ class ReceiveModal extends PureComponent { isAddressVerified: null, isAppOpened: false, }) - + handleContactUs = () => { + openURL(urls.receiveFlowContactSupport) + } handleReset = () => this.setState({ ...INITIAL_STATE }) handleCloseModal = () => this.props.closeModal(MODAL_RECEIVE) @@ -182,6 +187,7 @@ class ReceiveModal extends PureComponent { onChangeAccount: this.handleChangeAccount, onChangeAppOpened: this.handleChangeAppOpened, onChangeAddressVerified: this.handleChangeAddressVerified, + contactUs: this.handleContactUs, } const errorSteps = verifyAddressError diff --git a/src/components/modals/Receive/steps/03-step-confirm-address.js b/src/components/modals/Receive/steps/03-step-confirm-address.js index a1ddca5f..4e496999 100644 --- a/src/components/modals/Receive/steps/03-step-confirm-address.js +++ b/src/components/modals/Receive/steps/03-step-confirm-address.js @@ -47,11 +47,11 @@ export default class StepConfirmAddress extends PureComponent { } } -export function StepConfirmAddressFooter({ t, transitionTo, onRetry }: StepProps) { +export function StepConfirmAddressFooter({ t, transitionTo, onRetry, contactUs }: StepProps) { // This will be displayed only if user rejected address return ( -