Fix BigInt use

This commit is contained in:
Matthew Sevey 2021-10-26 12:17:44 -04:00
parent d4482e6025
commit 5dc357b3d1
No known key found for this signature in database
GPG Key ID: 9ADDD344F13057F6
1 changed files with 3 additions and 1 deletions

View File

@ -16,7 +16,9 @@ async function skydConfigCheck(done) {
const response = await got(`http://10.10.10.10:9980/renter`, { headers: { "User-Agent": "Sia-Agent" } }).json(); const response = await got(`http://10.10.10.10:9980/renter`, { headers: { "User-Agent": "Sia-Agent" } }).json();
// make sure initial funding is set to a non zero value // make sure initial funding is set to a non zero value
if (BigInt(response.settings.allowance.paymentcontractinitialfunding) === 0) { let actual = BigInt(response.settings.allowance.paymentcontractinitialfunding);
let expected = BigInt(10000000000000000000000000); // 10 SC
if (actual !== expected) {
throw new Error("Skynet Portal Per-Contract Budget is not set!"); throw new Error("Skynet Portal Per-Contract Budget is not set!");
} }