aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/containers/inputs
diff options
context:
space:
mode:
authorfragosti <francesco.agosti93@gmail.com>2018-07-21 01:44:59 +0800
committerfragosti <francesco.agosti93@gmail.com>2018-07-21 01:44:59 +0800
commit0f8e6b395eb2260bbb03da9de35505a7a91c5c7b (patch)
tree8c7974d2259d008f826252b00fb992323dc137e8 /packages/website/ts/containers/inputs
parentb28cc6d7d300d209bee0091369a8e221eaeb4e64 (diff)
downloaddexon-0x-contracts-0f8e6b395eb2260bbb03da9de35505a7a91c5c7b.tar.gz
dexon-0x-contracts-0f8e6b395eb2260bbb03da9de35505a7a91c5c7b.tar.zst
dexon-0x-contracts-0f8e6b395eb2260bbb03da9de35505a7a91c5c7b.zip
WIP for allowance toggle redesign working
Diffstat (limited to 'packages/website/ts/containers/inputs')
-rw-r--r--packages/website/ts/containers/inputs/allowance_state_toggle.ts20
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);