Browse Source

fixing bug on Contact Us doing nothing on the receive flow Reject screen

master
Anastasia Poupeney 7 years ago
parent
commit
85e79ff6ad
  1. 8
      src/components/modals/Receive/index.js
  2. 4
      src/components/modals/Receive/steps/03-step-confirm-address.js
  3. 3
      src/config/support.js

8
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<Props, State> {
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<Props, State> {
onChangeAccount: this.handleChangeAccount,
onChangeAppOpened: this.handleChangeAppOpened,
onChangeAddressVerified: this.handleChangeAddressVerified,
contactUs: this.handleContactUs,
}
const errorSteps = verifyAddressError

4
src/components/modals/Receive/steps/03-step-confirm-address.js

@ -47,11 +47,11 @@ export default class StepConfirmAddress extends PureComponent<StepProps> {
}
}
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 (
<Fragment>
<Button event="Receive Flow Step 3 Contact Us Clicked">
<Button onClick={contactUs} event="Receive Flow Step 3 Contact Us Clicked">
{t('app:receive.steps.confirmAddress.support')}
</Button>
<Button

3
src/config/support.js

@ -14,4 +14,7 @@ export const urls = {
'https://support.ledgerwallet.com/hc/en-us/requests/new?ticket_form_id=248165',
feesMoreInfo: 'https://support.ledgerwallet.com/hc/en-us/articles/360006535873',
recipientAddressInfo: 'https://support.ledgerwallet.com/hc/en-us/articles/360006433934',
// should join and generalize naming for the same urls once defined
receiveFlowContactSupport:
'https://support.ledgerwallet.com/hc/en-us/requests/new?ticket_form_id=248165',
}

Loading…
Cancel
Save