aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src/containers
diff options
context:
space:
mode:
authorfragosti <francesco.agosti93@gmail.com>2018-11-10 06:20:14 +0800
committerfragosti <francesco.agosti93@gmail.com>2018-11-10 06:20:14 +0800
commit79a533940e62f65def1695fe6c0990b3165f6158 (patch)
tree636a2facb441496cc9eca42d4f98a1be49fd5da2 /packages/instant/src/containers
parent3a51bd1e69d8eb279fee138df2bc69ddb1ba5f82 (diff)
downloaddexon-sol-tools-79a533940e62f65def1695fe6c0990b3165f6158.tar
dexon-sol-tools-79a533940e62f65def1695fe6c0990b3165f6158.tar.gz
dexon-sol-tools-79a533940e62f65def1695fe6c0990b3165f6158.tar.bz2
dexon-sol-tools-79a533940e62f65def1695fe6c0990b3165f6158.tar.lz
dexon-sol-tools-79a533940e62f65def1695fe6c0990b3165f6158.tar.xz
dexon-sol-tools-79a533940e62f65def1695fe6c0990b3165f6158.tar.zst
dexon-sol-tools-79a533940e62f65def1695fe6c0990b3165f6158.zip
feat: open metamask sliding panel if locked on click
Diffstat (limited to 'packages/instant/src/containers')
-rw-r--r--packages/instant/src/containers/connected_account_payment_method.ts20
1 files changed, 17 insertions, 3 deletions
diff --git a/packages/instant/src/containers/connected_account_payment_method.ts b/packages/instant/src/containers/connected_account_payment_method.ts
index a1ebe7125..ee57d1829 100644
--- a/packages/instant/src/containers/connected_account_payment_method.ts
+++ b/packages/instant/src/containers/connected_account_payment_method.ts
@@ -1,10 +1,11 @@
import * as React from 'react';
import { connect } from 'react-redux';
-
-import { State } from '../redux/reducer';
-import { Account, Network } from '../types';
+import { Dispatch } from 'redux';
import { PaymentMethod } from '../components/payment_method';
+import { Action, actions } from '../redux/actions';
+import { State } from '../redux/reducer';
+import { Account, Network, StandardSlidingPanelContent } from '../types';
export interface ConnectedAccountPaymentMethodProps {}
@@ -13,11 +14,24 @@ interface ConnectedState {
network: Network;
}
+interface ConnectedDispatch {
+ openStandardSlidingPanel: (content: StandardSlidingPanelContent) => void;
+}
+
const mapStateToProps = (state: State, _ownProps: ConnectedAccountPaymentMethodProps): ConnectedState => ({
account: state.providerState.account,
network: state.network,
});
+const mapDispatchToProps = (
+ dispatch: Dispatch<Action>,
+ ownProps: ConnectedAccountPaymentMethodProps,
+): ConnectedDispatch => ({
+ openStandardSlidingPanel: (content: StandardSlidingPanelContent) =>
+ dispatch(actions.openStandardSlidingPanel(content)),
+});
+
export const ConnectedAccountPaymentMethod: React.ComponentClass<ConnectedAccountPaymentMethodProps> = connect(
mapStateToProps,
+ mapDispatchToProps,
)(PaymentMethod);