From b2256679bef6c39ee5889f12838d1c2e9d4dd832 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Sun, 17 Dec 2017 15:41:24 -0500 Subject: Add `Max` convenience button in unwrap WETH dialog --- .../ts/components/dialogs/eth_weth_conversion_dialog.tsx | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'packages/website/ts/components') diff --git a/packages/website/ts/components/dialogs/eth_weth_conversion_dialog.tsx b/packages/website/ts/components/dialogs/eth_weth_conversion_dialog.tsx index c8bdced9b..230ac5183 100644 --- a/packages/website/ts/components/dialogs/eth_weth_conversion_dialog.tsx +++ b/packages/website/ts/components/dialogs/eth_weth_conversion_dialog.tsx @@ -109,7 +109,16 @@ export class EthWethConversionDialog extends className="pt1" style={{fontSize: 12}} > - 1 ETH = 1 WETH +
1 ETH = 1 WETH
+ {this.props.direction === Side.receive && +
+ Max +
+ } @@ -137,6 +146,11 @@ export class EthWethConversionDialog extends ); } + private onMaxClick() { + this.setState({ + value: this.props.tokenState.balance, + }); + } private onValueChange(isValid: boolean, amount?: BigNumber) { this.setState({ value: amount, -- cgit