We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a74256e commit 0a2ee12Copy full SHA for 0a2ee12
src/Mx.NET.SDK.Core/Domain/ESDTAmount.cs
@@ -157,9 +157,13 @@ public string ToDenominated(int nrOfDecimals)
157
start = start < 0 ? 0 : start;
158
159
var decimals = padded.Substring(start, Esdt.DecimalPrecision < nrOfDecimals ? Esdt.DecimalPrecision : nrOfDecimals);
160
+ decimals = decimals.TrimEnd('0');
161
var integer = start == 0 ? "0" : padded.Substring(0, start);
162
- return $"{integer}.{decimals}";
163
+ if (string.IsNullOrEmpty(decimals))
164
+ return integer;
165
+ else
166
+ return $"{integer}.{decimals}";
167
}
168
169
/// <summary>
0 commit comments