@medialane/sdk 0.97.0 → 0.98.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/{services-6lZz3hUV.d.ts → services-BcckoQHb.d.ts} +1 -0
- package/dist/{services-CRckcKEc.d.cts → services-DkdQoHIr.d.cts} +1 -0
- package/dist/starknet/index.cjs +23 -10
- package/dist/starknet/index.cjs.map +1 -1
- package/dist/starknet/index.d.cts +7 -6
- package/dist/starknet/index.d.ts +7 -6
- package/dist/starknet/index.js +22 -10
- package/dist/starknet/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1213,8 +1213,8 @@ function formatAmount(raw, decimals) {
|
|
|
1213
1213
|
const factor = 10n ** BigInt(decimals);
|
|
1214
1214
|
const whole = value / factor;
|
|
1215
1215
|
const remainder = value % factor;
|
|
1216
|
-
const fractional = remainder.toString().padStart(decimals, "0");
|
|
1217
|
-
return `${whole}.${fractional}
|
|
1216
|
+
const fractional = remainder.toString().padStart(decimals, "0").replace(/0+$/, "");
|
|
1217
|
+
return fractional ? `${whole}.${fractional}` : whole.toString();
|
|
1218
1218
|
}
|
|
1219
1219
|
function getTokenByAddress(address) {
|
|
1220
1220
|
let target = null;
|