aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src/containers/connected_account_payment_method.ts
blob: a1ebe7125e628d4c9688e2e19b60c85fb03bece3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import * as React from 'react';
import { connect } from 'react-redux';

import { State } from '../redux/reducer';
import { Account, Network } from '../types';

import { PaymentMethod } from '../components/payment_method';

export interface ConnectedAccountPaymentMethodProps {}

interface ConnectedState {
    account: Account;
    network: Network;
}

const mapStateToProps = (state: State, _ownProps: ConnectedAccountPaymentMethodProps): ConnectedState => ({
    account: state.providerState.account,
    network: state.network,
});

export const ConnectedAccountPaymentMethod: React.ComponentClass<ConnectedAccountPaymentMethodProps> = connect(
    mapStateToProps,
)(PaymentMethod);