Solo restar decimales cuando hay suficientes digitos
continuous-integration/woodpecker the build was successful Details

This commit is contained in:
Cat /dev/Nulo 2021-11-12 12:33:34 -03:00
parent 05c2a102d4
commit 4ab9045d8a
1 changed files with 1 additions and 1 deletions

View File

@ -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
}