apow-cli 0.11.7 → 0.11.8
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/miner.js +6 -3
- package/package.json +1 -1
package/dist/miner.js
CHANGED
|
@@ -261,6 +261,9 @@ async function grindNonce(challengeNumber, target, minerAddress, onProgress) {
|
|
|
261
261
|
nonce += 1n;
|
|
262
262
|
}
|
|
263
263
|
}
|
|
264
|
+
function toBigInt(value) {
|
|
265
|
+
return typeof value === "bigint" ? value : BigInt(value);
|
|
266
|
+
}
|
|
264
267
|
async function showStartupBanner(tokenId) {
|
|
265
268
|
const { account } = (0, wallet_1.requireWallet)();
|
|
266
269
|
const [ethBalance, totalMines, totalMinted, mineableSupply, eraInterval, hashpowerRaw, rarityRaw] = await Promise.all([
|
|
@@ -314,9 +317,9 @@ async function showStartupBanner(tokenId) {
|
|
|
314
317
|
]);
|
|
315
318
|
console.log("");
|
|
316
319
|
return {
|
|
317
|
-
mineableSupply,
|
|
318
|
-
eraInterval,
|
|
319
|
-
hashpower: hashpowerRaw,
|
|
320
|
+
mineableSupply: toBigInt(mineableSupply),
|
|
321
|
+
eraInterval: toBigInt(eraInterval),
|
|
322
|
+
hashpower: toBigInt(hashpowerRaw),
|
|
320
323
|
};
|
|
321
324
|
}
|
|
322
325
|
async function startMining(tokenId) {
|