Skip to content

Commit

Permalink
fix invalid asset error and returning correct decimals
Browse files Browse the repository at this point in the history
  • Loading branch information
bonedaddy committed Mar 26, 2021
1 parent 503cb8e commit 9d263b3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions bclient/uniswap.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,10 @@ func (c *Client) PairDecimals(pair string) int {
return 18
case "eth-degen10", "eth-degen":
return 18
case "nftp-eth":
return 18
case "eth-nftp":
return 18
default:
return 0
}
Expand Down
3 changes: 2 additions & 1 deletion db/asset.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ var (
Asset("ETH"),
Asset("ORCL5"),
Asset("DEGEN10"),
Asset("NFTP"),
}
// ErrInvalidAsset is an error returned when the given asset specified is invalid
ErrInvalidAsset = errors.New("invalid asset")
Expand All @@ -30,7 +31,7 @@ var (
// IsValidAsset determines whether or not the given asset is one we are tracking
func IsValidAsset(asset string) bool {
switch strings.ToLower(asset) {
case "ndx", "defi5", "cc10", "orcl5", "eth", "degen10":
case "ndx", "defi5", "cc10", "orcl5", "eth", "degen10", "nftp":
return true
default:
return false
Expand Down

0 comments on commit 9d263b3

Please sign in to comment.