From 4ab9045d8a63403a3effef65dbfcc2cdb81c05cd Mon Sep 17 00:00:00 2001 From: Nulo Date: Fri, 12 Nov 2021 12:33:34 -0300 Subject: [PATCH] Solo restar decimales cuando hay suficientes digitos --- opensea.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opensea.go b/opensea.go index 6ce5e28..3daa8be 100644 --- a/opensea.go +++ b/opensea.go @@ -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 }