aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src/containers
diff options
context:
space:
mode:
authorfragosti <francesco.agosti93@gmail.com>2018-11-16 04:40:28 +0800
committerfragosti <francesco.agosti93@gmail.com>2018-11-16 04:41:49 +0800
commit4da574560d50f661227ec4d91acf20917c26b17b (patch)
treeb4d17a68db63cc788b4980848be99d9a42acd5b0 /packages/instant/src/containers
parentf9e012398606a85d286087f3e94bf8b95a52df55 (diff)
downloaddexon-sol-tools-4da574560d50f661227ec4d91acf20917c26b17b.tar
dexon-sol-tools-4da574560d50f661227ec4d91acf20917c26b17b.tar.gz
dexon-sol-tools-4da574560d50f661227ec4d91acf20917c26b17b.tar.bz2
dexon-sol-tools-4da574560d50f661227ec4d91acf20917c26b17b.tar.lz
dexon-sol-tools-4da574560d50f661227ec4d91acf20917c26b17b.tar.xz
dexon-sol-tools-4da574560d50f661227ec4d91acf20917c26b17b.tar.zst
dexon-sol-tools-4da574560d50f661227ec4d91acf20917c26b17b.zip
fix: remove redundant handler
Diffstat (limited to 'packages/instant/src/containers')
-rw-r--r--packages/instant/src/containers/connected_account_payment_method.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/packages/instant/src/containers/connected_account_payment_method.ts b/packages/instant/src/containers/connected_account_payment_method.ts
index beaaccf2f..eacbadfca 100644
--- a/packages/instant/src/containers/connected_account_payment_method.ts
+++ b/packages/instant/src/containers/connected_account_payment_method.ts
@@ -22,7 +22,7 @@ interface ConnectedState {
}
interface ConnectedDispatch {
- onInstallWalletClick: () => void;
+ openInstallWalletPanel: () => void;
unlockWalletAndDispatchToStore: (providerState: ProviderState) => void;
}
@@ -39,7 +39,7 @@ const mapDispatchToProps = (
dispatch: Dispatch<Action>,
ownProps: ConnectedAccountPaymentMethodProps,
): ConnectedDispatch => ({
- onInstallWalletClick: () => dispatch(actions.openStandardSlidingPanel(StandardSlidingPanelContent.InstallWallet)),
+ openInstallWalletPanel: () => dispatch(actions.openStandardSlidingPanel(StandardSlidingPanelContent.InstallWallet)),
unlockWalletAndDispatchToStore: async (providerState: ProviderState) =>
asyncData.fetchAccountInfoAndDispatchToStore(providerState, dispatch, true),
});
@@ -52,12 +52,12 @@ const mergeProps = (
...ownProps,
network: connectedState.network,
account: connectedState.providerState.account,
- onInstallWalletClick: connectedDispatch.onInstallWalletClick,
walletName: connectedState.providerState.name,
- onUnlockWalletClick: () => {
+ onUnlockWalletClick: () => connectedDispatch.unlockWalletAndDispatchToStore(connectedState.providerState),
+ onInstallWalletClick: () => {
const isMobile = envUtil.isMobileOperatingSystem();
if (!isMobile) {
- connectedDispatch.unlockWalletAndDispatchToStore(connectedState.providerState);
+ connectedDispatch.openInstallWalletPanel();
return;
}
const operatingSystem = envUtil.getOperatingSystem();