Skip to content
This repository has been archived by the owner on Aug 1, 2023. It is now read-only.

Commit

Permalink
feat: add trezor help link, closes #248
Browse files Browse the repository at this point in the history
  • Loading branch information
kyranjamie committed Oct 30, 2020
1 parent f56742e commit 64e1587
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
3 changes: 3 additions & 0 deletions app/constants/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ export const STATUS_PAGE_URL = 'http://status.test-blockstack.com';

export const DEFAULT_STACKS_NODE_URL = 'https://stacks-node-api.krypton.blockstack.org';

export const TREZOR_HELP_URL =
'https://www.blockstack.org/questions/how-can-i-use-my-trezor-device-with-the-stacks-wallet';

export const NETWORK = process.env.STX_NETWORK as 'mainnet' | 'testnet';

export const MAX_STACKING_CYCLES = 12;
Expand Down
10 changes: 8 additions & 2 deletions app/pages/onboarding/02-create-wallet/create-wallet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import { useDispatch } from 'react-redux';
import { useHistory } from 'react-router-dom';

import { onboardingMnemonicGenerationStep } from '@store/keys/keys.actions';
import { onboardingMnemonicGenerationStep } from '@store/keys';
import routes from '@constants/routes.json';
import {
Onboarding,
Expand All @@ -13,6 +13,8 @@ import {
OnboardingFooterLink,
} from '@components/onboarding';
import { useBackButton } from '@hooks/use-back-url';
import { openExternalLink } from '@utils/external-links';
import { TREZOR_HELP_URL } from '@constants/index';

export const CreateWallet: React.FC = () => {
const dispatch = useDispatch();
Expand All @@ -24,6 +26,8 @@ export const CreateWallet: React.FC = () => {
history.push(routes.GENERATING);
};

const openTrezorHelpPage = () => openExternalLink(TREZOR_HELP_URL);

return (
<Onboarding>
<OnboardingTitle>Create a new wallet</OnboardingTitle>
Expand All @@ -40,7 +44,9 @@ export const CreateWallet: React.FC = () => {
</OnboardingButton>

<OnboardingFooter>
{/* <OnboardingFooterLink>I have a Trezor wallet</OnboardingFooterLink> */}
<OnboardingFooterLink onClick={openTrezorHelpPage}>
I have a Trezor wallet
</OnboardingFooterLink>
</OnboardingFooter>
</Onboarding>
);
Expand Down

0 comments on commit 64e1587

Please sign in to comment.