aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src/containers/connected_account_payment_method.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/instant/src/containers/connected_account_payment_method.ts')
-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);