Skip to content

Commit

Permalink
add missing exchange amount check
Browse files Browse the repository at this point in the history
  • Loading branch information
bonedaddy committed Mar 26, 2021
1 parent cffc7a0 commit 503cb8e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bclient/uniswap.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,10 @@ func (c *Client) ExchangeAmount(amount *big.Int, pair string) (*big.Int, error)
return c.uc.GetExchangeAmount(amount, DEGEN10TokenAddress, WETHTokenAddress)
case "eth-degen10", "eth-degen":
return c.uc.GetExchangeAmount(amount, WETHTokenAddress, DEGEN10TokenAddress)
case "nftp-eth":
return c.uc.GetExchangeAmount(amount, NFTPTokenAddress, WETHTokenAddress)
case "eth-nftp":
return c.uc.GetExchangeAmount(amount, WETHTokenAddress, NFTPTokenAddress)
default:
return nil, errors.New("unsupported pair")
}
Expand Down

0 comments on commit 503cb8e

Please sign in to comment.