@netmind/arena-cli 0.36.0 → 0.36.1

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.js CHANGED
@@ -1292,6 +1292,11 @@ function formatTicket(c) {
1292
1292
  const chain = c.ticket_chain ?? c.ticketChain ?? "?";
1293
1293
  return `USDC ${price} on ${chain}`;
1294
1294
  }
1295
+ function formatPlayers(c) {
1296
+ const current = c.current_participants ?? c.currentParticipants ?? c.participant_count ?? 0;
1297
+ const max = c.max_participants ?? c.maxParticipants;
1298
+ return `${current}/${max || "\u221E"}`;
1299
+ }
1295
1300
  function formatCutoff(c) {
1296
1301
  const v = c.prediction_cutoff_time ?? c.predictionCutoffTime;
1297
1302
  if (v == null || v === "") return "-";
@@ -1368,8 +1373,8 @@ means no cutoff applies to this game type.`
1368
1373
  name: c.name,
1369
1374
  type: c.type || c.game_type,
1370
1375
  status: c.status,
1371
- players: `${c.current_participants || c.participant_count || 0}/${c.max_participants || "\u221E"}`,
1372
- entry_fee: c.entry_fee ?? 0,
1376
+ players: formatPlayers(c),
1377
+ entry_fee: c.entry_fee ?? c.entryFee ?? 0,
1373
1378
  ticket: formatTicket(c),
1374
1379
  prize: formatPrize(c),
1375
1380
  cutoff: formatCutoff(c)
@@ -1403,22 +1408,22 @@ var showCmd = new Command6("show").description("Show competition details").argum
1403
1408
  type: c.type || c.game_type,
1404
1409
  status: c.status,
1405
1410
  description: c.description,
1406
- entry_fee: c.entry_fee
1411
+ entry_fee: c.entry_fee ?? c.entryFee
1407
1412
  };
1408
1413
  const ticketPrice = c.ticket_price ?? c.ticketPrice;
1409
1414
  if (ticketPrice != null && ticketPrice !== "") {
1410
1415
  kv.ticket_price = `${ticketPrice} USDC`;
1411
1416
  kv.ticket_chain = c.ticket_chain ?? c.ticketChain ?? "-";
1412
1417
  }
1413
- kv.prize_pool = c.prize_pool;
1418
+ kv.prize_pool = c.prize_pool ?? c.prizePool;
1414
1419
  const cryptoPrize = cryptoPrizeOf(c);
1415
1420
  if (cryptoPrize) {
1416
1421
  kv.crypto_prize_pool = `${cryptoPrize.amount} ${cryptoPrize.currency}`;
1417
1422
  if (cryptoPrize.funding) kv.funding_status = cryptoPrize.funding;
1418
1423
  }
1419
- kv.players = `${c.current_participants || 0}/${c.max_participants || "\u221E"}`;
1420
- kv.starts = c.start_time || c.starts_at;
1421
- kv.ends = c.end_time || c.ends_at;
1424
+ kv.players = formatPlayers(c);
1425
+ kv.starts = c.start_time || c.startTime || c.starts_at;
1426
+ kv.ends = c.end_time || c.endTime || c.ends_at;
1422
1427
  const cutoff = c.prediction_cutoff_time ?? c.predictionCutoffTime;
1423
1428
  if (cutoff != null && cutoff !== "") {
1424
1429
  kv.prediction_cutoff_time = cutoff;