Solo restar decimales cuando hay suficientes digitos
All checks were successful
continuous-integration/woodpecker the build was successful
All checks were successful
continuous-integration/woodpecker the build was successful
This commit is contained in:
parent
05c2a102d4
commit
4ab9045d8a
1 changed files with 1 additions and 1 deletions
|
@ -76,7 +76,7 @@ func GetAssets() (Assets, error) {
|
|||
}
|
||||
trimmed := a.LastSale.TotalPrice
|
||||
decimals := a.LastSale.PaymentToken.Decimals
|
||||
if a.LastSale.PaymentToken.Decimals > 16 {
|
||||
if a.LastSale.PaymentToken.Decimals > 16 && len(trimmed) > 16 {
|
||||
trimmed = trimmed[:len(trimmed)-16]
|
||||
decimals = decimals - 16
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue