Skip to content

Commit

Permalink
Add WETH balance to ETH balance PM-666 (#397)
Browse files Browse the repository at this point in the history
  • Loading branch information
mmv08 authored Jun 7, 2018
1 parent 66b62d2 commit 95382d3
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,10 @@ class MarketBuySharesForm extends Component {

let balance = currentBalance

if (collateralTokenSymbol !== 'WETH') {
if (!/^(WETH|ETH|W-ETH)$/.test(collateralTokenSymbol)) {
balance = collateralTokenBalance.div(1e18)
} else {
balance = Decimal(balance).add(collateralTokenBalance.div(1e18))
}

if (decimalValue.gt(balance)) {
Expand Down

0 comments on commit 95382d3

Please sign in to comment.