pyre-world-kit 2.0.2 → 2.0.3

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/intel.js CHANGED
@@ -241,7 +241,7 @@ async function getAgentFactions(connection, wallet, factionLimit = 50) {
241
241
  const heldMints = tokenAccounts.value
242
242
  .map(a => ({
243
243
  mint: a.account.data.parsed.info.mint,
244
- balance: Number(a.account.data.parsed.info.tokenAmount.amount),
244
+ balance: Number(a.account.data.parsed.info.tokenAmount.uiAmount ?? 0),
245
245
  }))
246
246
  .filter(a => a.balance > 0 && (0, vanity_1.isPyreMint)(a.mint));
247
247
  if (heldMints.length === 0)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pyre-world-kit",
3
- "version": "2.0.2",
3
+ "version": "2.0.3",
4
4
  "description": "Agent-first faction warfare kit — game-semantic wrapper over torchsdk",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -15,7 +15,7 @@
15
15
  "@solana/spl-token": "^0.4.6",
16
16
  "@solana/web3.js": "^1.98.4",
17
17
  "bs58": "^6.0.0",
18
- "torchsdk": "^3.7.36"
18
+ "torchsdk": "^3.7.37"
19
19
  },
20
20
  "devDependencies": {
21
21
  "@types/node": "^22.15.0",
package/src/intel.ts CHANGED
@@ -264,7 +264,7 @@ export async function getAgentFactions(
264
264
  const heldMints = tokenAccounts.value
265
265
  .map(a => ({
266
266
  mint: a.account.data.parsed.info.mint as string,
267
- balance: Number(a.account.data.parsed.info.tokenAmount.amount),
267
+ balance: Number(a.account.data.parsed.info.tokenAmount.uiAmount ?? 0),
268
268
  }))
269
269
  .filter(a => a.balance > 0 && isPyreMint(a.mint));
270
270