aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/components/inputs
diff options
context:
space:
mode:
authorfragosti <francesco.agosti93@gmail.com>2018-06-06 12:36:05 +0800
committerfragosti <francesco.agosti93@gmail.com>2018-06-07 01:11:30 +0800
commit3898b8e8ab083689221e39de6b18fe31e6699d38 (patch)
tree3a391b102aad84020edd74ee5912102a86dd7ada /packages/website/ts/components/inputs
parent7ee7f9978049383030be8fd95100a9dfcd1923a3 (diff)
downloaddexon-sol-tools-3898b8e8ab083689221e39de6b18fe31e6699d38.tar
dexon-sol-tools-3898b8e8ab083689221e39de6b18fe31e6699d38.tar.gz
dexon-sol-tools-3898b8e8ab083689221e39de6b18fe31e6699d38.tar.bz2
dexon-sol-tools-3898b8e8ab083689221e39de6b18fe31e6699d38.tar.lz
dexon-sol-tools-3898b8e8ab083689221e39de6b18fe31e6699d38.tar.xz
dexon-sol-tools-3898b8e8ab083689221e39de6b18fe31e6699d38.tar.zst
dexon-sol-tools-3898b8e8ab083689221e39de6b18fe31e6699d38.zip
Wrap AllowanceToggle in redux container
Diffstat (limited to 'packages/website/ts/components/inputs')
-rw-r--r--packages/website/ts/components/inputs/allowance_toggle.tsx8
1 files changed, 6 insertions, 2 deletions
diff --git a/packages/website/ts/components/inputs/allowance_toggle.tsx b/packages/website/ts/components/inputs/allowance_toggle.tsx
index a8df4935a..ca4b89f77 100644
--- a/packages/website/ts/components/inputs/allowance_toggle.tsx
+++ b/packages/website/ts/components/inputs/allowance_toggle.tsx
@@ -18,11 +18,11 @@ interface AllowanceToggleProps {
networkId: number;
blockchain: Blockchain;
dispatcher: Dispatcher;
- onErrorOccurred: (errType: BalanceErrs) => void;
token: Token;
tokenState: TokenState;
userAddress: string;
- isDisabled: boolean;
+ isDisabled?: boolean;
+ onErrorOccurred?: (errType: BalanceErrs) => void;
refetchTokenStateAsync: () => Promise<void>;
}
@@ -57,6 +57,10 @@ const styles: Styles = {
};
export class AllowanceToggle extends React.Component<AllowanceToggleProps, AllowanceToggleState> {
+ public static defaultProps = {
+ onErrorOccurred: _.noop,
+ isDisabled: false,
+ };
constructor(props: AllowanceToggleProps) {
super(props);
this.state = {