pyre-world-kit 2.0.10 → 2.0.11
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 +2 -9
- package/package.json +1 -1
- package/src/intel.ts +2 -7
package/dist/intel.js
CHANGED
|
@@ -271,15 +271,8 @@ async function getAgentFactions(connection, wallet, factionLimit = 50) {
|
|
|
271
271
|
const faction = factionMap.get(mint);
|
|
272
272
|
if (!faction)
|
|
273
273
|
continue;
|
|
274
|
-
//
|
|
275
|
-
|
|
276
|
-
try {
|
|
277
|
-
const holders = await getPyreHolders(connection, mint, 100);
|
|
278
|
-
const holding = holders.holders.find(h => h.address === wallet);
|
|
279
|
-
if (holding)
|
|
280
|
-
percentage = holding.percentage;
|
|
281
|
-
}
|
|
282
|
-
catch { }
|
|
274
|
+
// balance / 1B total supply
|
|
275
|
+
const percentage = (balance / 1_000_000_000) * 100;
|
|
283
276
|
positions.push({
|
|
284
277
|
mint,
|
|
285
278
|
name: faction.name,
|
package/package.json
CHANGED
package/src/intel.ts
CHANGED
|
@@ -295,13 +295,8 @@ export async function getAgentFactions(
|
|
|
295
295
|
const faction = factionMap.get(mint);
|
|
296
296
|
if (!faction) continue;
|
|
297
297
|
|
|
298
|
-
//
|
|
299
|
-
|
|
300
|
-
try {
|
|
301
|
-
const holders = await getPyreHolders(connection, mint, 100);
|
|
302
|
-
const holding = holders.holders.find(h => h.address === wallet);
|
|
303
|
-
if (holding) percentage = holding.percentage;
|
|
304
|
-
} catch {}
|
|
298
|
+
// balance / 1B total supply
|
|
299
|
+
const percentage = (balance / 1_000_000_000) * 100;
|
|
305
300
|
|
|
306
301
|
positions.push({
|
|
307
302
|
mint,
|