aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src/components/payment_method.tsx
diff options
context:
space:
mode:
authorfragosti <francesco.agosti93@gmail.com>2018-11-13 05:30:47 +0800
committerfragosti <francesco.agosti93@gmail.com>2018-11-13 05:30:47 +0800
commit79f0324abc6e59d5595770e44d620e6d0cccd6bc (patch)
treecab441568b4362b90f2626257576ebab60b7ecbb /packages/instant/src/components/payment_method.tsx
parenta8a1ea92a614181ebdf6c738139723f0d5c6da69 (diff)
downloaddexon-sol-tools-79f0324abc6e59d5595770e44d620e6d0cccd6bc.tar.gz
dexon-sol-tools-79f0324abc6e59d5595770e44d620e6d0cccd6bc.tar.zst
dexon-sol-tools-79f0324abc6e59d5595770e44d620e6d0cccd6bc.zip
feat: integrate wallet flow with heartbeat and other branches
Diffstat (limited to 'packages/instant/src/components/payment_method.tsx')
-rw-r--r--packages/instant/src/components/payment_method.tsx12
1 files changed, 5 insertions, 7 deletions
diff --git a/packages/instant/src/components/payment_method.tsx b/packages/instant/src/components/payment_method.tsx
index f596c5ad6..25c879519 100644
--- a/packages/instant/src/components/payment_method.tsx
+++ b/packages/instant/src/components/payment_method.tsx
@@ -2,7 +2,7 @@ import * as _ from 'lodash';
import * as React from 'react';
import { ColorOption } from '../style/theme';
-import { Account, AccountState, Network, StandardSlidingPanelContent } from '../types';
+import { Account, AccountState, Network } from '../types';
import { MetaMaskLogo } from './meta_mask_logo';
import { PaymentMethodDropdown } from './payment_method_dropdown';
@@ -15,7 +15,8 @@ import { Text } from './ui/text';
export interface PaymentMethodProps {
account: Account;
network: Network;
- openStandardSlidingPanel: (content: StandardSlidingPanelContent) => void;
+ onInstallWalletClick: () => void;
+ onUnlockWalletClick: () => void;
}
export class PaymentMethod extends React.Component<PaymentMethodProps> {
@@ -80,7 +81,7 @@ export class PaymentMethod extends React.Component<PaymentMethodProps> {
case AccountState.Locked:
return (
<WalletPrompt
- onClick={this._openInstallWalletPanel}
+ onClick={this.props.onUnlockWalletClick}
image={<Icon width={13} icon="lock" color={ColorOption.black} />}
>
Please Unlock MetaMask
@@ -89,7 +90,7 @@ export class PaymentMethod extends React.Component<PaymentMethodProps> {
case AccountState.None:
return (
<WalletPrompt
- onClick={this._openInstallWalletPanel}
+ onClick={this.props.onInstallWalletClick}
image={<MetaMaskLogo width={19} height={18} />}
>
Install MetaMask
@@ -107,9 +108,6 @@ export class PaymentMethod extends React.Component<PaymentMethodProps> {
return null;
}
};
- private readonly _openInstallWalletPanel = () => {
- this.props.openStandardSlidingPanel(StandardSlidingPanelContent.InstallWallet);
- };
}
interface WalletPromptProps {