@ixo/editor 5.32.0 → 5.33.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.
@@ -6320,9 +6320,12 @@ registerDiffResolver("bid", {
6320
6320
 
6321
6321
  // src/core/lib/actionRegistry/actions/evaluateBid/evaluateBid.diff.ts
6322
6322
  var USDC_DENOM = "ibc/6BBE9BD4246F8E04948D5A4EEE7164B2630263B9EBB5E7DC5F0A46C62A2FF97B";
6323
+ var DECIMALS = 6;
6323
6324
  function formatCoin(coin) {
6324
6325
  const denom = coin.denom === USDC_DENOM ? "USDC" : coin.denom === "uixo" ? "IXO" : coin.denom;
6325
- return `${coin.amount} ${denom}`;
6326
+ const rawAmount = Number(coin.amount);
6327
+ const displayAmount = Number.isFinite(rawAmount) ? String(rawAmount / Math.pow(10, DECIMALS)) : String(coin.amount);
6328
+ return `${displayAmount} ${denom}`;
6326
6329
  }
6327
6330
  registerDiffResolver("evaluateBid", {
6328
6331
  resolver: async (inputs, _ctx) => {
@@ -6485,10 +6488,10 @@ function renderNumber(value) {
6485
6488
  }
6486
6489
  var formatCoin2 = (coin) => {
6487
6490
  const USDC_DENOM3 = "ibc/6BBE9BD4246F8E04948D5A4EEE7164B2630263B9EBB5E7DC5F0A46C62A2FF97B";
6488
- const DECIMALS = 6;
6491
+ const DECIMALS2 = 6;
6489
6492
  const denom = coin.denom === USDC_DENOM3 ? "USDC" : coin.denom === "uixo" ? "IXO" : coin.denom;
6490
6493
  const raw = Number(coin.amount);
6491
- const display = raw >= Math.pow(10, DECIMALS) ? raw / Math.pow(10, DECIMALS) : raw;
6494
+ const display = raw >= Math.pow(10, DECIMALS2) ? raw / Math.pow(10, DECIMALS2) : raw;
6492
6495
  return `${display} ${denom}`;
6493
6496
  };
6494
6497
  var formatCoinAmount = (coin, assetsList) => {
@@ -7266,11 +7269,14 @@ function roleLabel(value) {
7266
7269
  }
7267
7270
  var IXO_DENOM = "uixo";
7268
7271
  var USDC_DENOM2 = "ibc/6BBE9BD4246F8E04948D5A4EEE7164B2630263B9EBB5E7DC5F0A46C62A2FF97B";
7272
+ var DENOM_DECIMALS = 6;
7269
7273
  function formatCoin4(value) {
7270
7274
  const coin = value;
7271
7275
  const denomValue = String(coin?.denom || "");
7272
7276
  const denom = denomValue === IXO_DENOM ? "IXO" : denomValue === USDC_DENOM2 ? "USDC" : denomValue;
7273
- return `${String(coin?.amount || "")} ${denom}`.trim();
7277
+ const rawAmount = Number(coin?.amount);
7278
+ const displayAmount = Number.isFinite(rawAmount) ? String(rawAmount / Math.pow(10, DENOM_DECIMALS)) : String(coin?.amount || "");
7279
+ return `${displayAmount} ${denom}`.trim();
7274
7280
  }
7275
7281
  function diffAdd(inputs) {
7276
7282
  const results = [];
@@ -12063,4 +12069,4 @@ export {
12063
12069
  executeQueuedFlowAgentCoreCommands,
12064
12070
  FlowAgentService
12065
12071
  };
12066
- //# sourceMappingURL=chunk-BCQTKXDM.mjs.map
12072
+ //# sourceMappingURL=chunk-NAR2R3YM.mjs.map