diff options
author | fragosti <francesco.agosti93@gmail.com> | 2018-07-21 01:44:59 +0800 |
---|---|---|
committer | fragosti <francesco.agosti93@gmail.com> | 2018-07-21 01:44:59 +0800 |
commit | 0f8e6b395eb2260bbb03da9de35505a7a91c5c7b (patch) | |
tree | 8c7974d2259d008f826252b00fb992323dc137e8 /packages/website/ts/containers/inputs/allowance_state_toggle.ts | |
parent | b28cc6d7d300d209bee0091369a8e221eaeb4e64 (diff) | |
download | dexon-sol-tools-0f8e6b395eb2260bbb03da9de35505a7a91c5c7b.tar dexon-sol-tools-0f8e6b395eb2260bbb03da9de35505a7a91c5c7b.tar.gz dexon-sol-tools-0f8e6b395eb2260bbb03da9de35505a7a91c5c7b.tar.bz2 dexon-sol-tools-0f8e6b395eb2260bbb03da9de35505a7a91c5c7b.tar.lz dexon-sol-tools-0f8e6b395eb2260bbb03da9de35505a7a91c5c7b.tar.xz dexon-sol-tools-0f8e6b395eb2260bbb03da9de35505a7a91c5c7b.tar.zst dexon-sol-tools-0f8e6b395eb2260bbb03da9de35505a7a91c5c7b.zip |
WIP for allowance toggle redesign working
Diffstat (limited to 'packages/website/ts/containers/inputs/allowance_state_toggle.ts')
-rw-r--r-- | packages/website/ts/containers/inputs/allowance_state_toggle.ts | 20 |
1 files changed, 16 insertions, 4 deletions
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<void>; } -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<State>): ConnectedDispatch => ({}); +const mapDispatchTopProps = (dispatch: Dispatch<State>): ConnectedDispatch => ({ + dispatcher: new Dispatcher(dispatch), +}); export const AllowanceStateToggle: React.ComponentClass<AllowanceStateToggleProps> = connect( mapStateToProps, - // mapDispatchTopProps, + mapDispatchTopProps, )(AllowanceStateToggleComponent); |