From 0f8e6b395eb2260bbb03da9de35505a7a91c5c7b Mon Sep 17 00:00:00 2001 From: fragosti Date: Fri, 20 Jul 2018 10:44:59 -0700 Subject: WIP for allowance toggle redesign working --- .../ts/containers/inputs/allowance_state_toggle.ts | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'packages/website/ts/containers/inputs') diff --git a/packages/website/ts/containers/inputs/allowance_state_toggle.ts b/packages/website/ts/containers/inputs/allowance_state_toggle.ts index cdda5ecf0..d6ff11f84 100644 --- a/packages/website/ts/containers/inputs/allowance_state_toggle.ts +++ b/packages/website/ts/containers/inputs/allowance_state_toggle.ts @@ -9,21 +9,33 @@ import { AllowanceStateToggle as AllowanceStateToggleComponent } from 'ts/compon import { Dispatcher } from 'ts/redux/dispatcher'; interface AllowanceStateToggleProps { + blockchain: Blockchain; + onErrorOccurred?: (errType: BalanceErrs) => void; token: Token; tokenState: TokenState; + isDisabled?: boolean; + refetchTokenStateAsync: () => Promise; } -interface ConnectedState {} +interface ConnectedState { + networkId: number; + userAddress: string; +} interface ConnectedDispatch { dispatcher: Dispatcher; } -const mapStateToProps = (state: State, _ownProps: AllowanceStateToggleProps): ConnectedState => ({}); +const mapStateToProps = (state: State, _ownProps: AllowanceStateToggleProps): ConnectedState => ({ + networkId: state.networkId, + userAddress: state.userAddress, +}); -// const mapDispatchTopProps = (dispatch: Dispatch): ConnectedDispatch => ({}); +const mapDispatchTopProps = (dispatch: Dispatch): ConnectedDispatch => ({ + dispatcher: new Dispatcher(dispatch), +}); export const AllowanceStateToggle: React.ComponentClass = connect( mapStateToProps, - // mapDispatchTopProps, + mapDispatchTopProps, )(AllowanceStateToggleComponent); -- cgit v1.2.3