2025-06-22 00:21:09 +03:00

14 lines
422 B
JavaScript

import * as StellarSdk from "@stellar/stellar-sdk";
import "./walletStoreFix.js";
new StellarSdk.Horizon.Server("https://horizon-testnet.stellar.org");
StellarSdk.Networks.TESTNET;
function formatXLM(amount, decimals = 2) {
if (!amount) return "0.00";
const num = typeof amount === "string" ? parseFloat(amount) : amount;
if (isNaN(num)) return "0.00";
return num.toFixed(decimals);
}
export {
formatXLM as f
};