fix: replace bigint literals with `BigInt` constructors (#27930)

This makes web3.js compatible with runtimes that don't understand bigint literals but _do_ understand `BigInt` constructors.
For whatever that's worth.
This commit is contained in:
Steven Luscher 2022-09-19 18:31:16 -07:00 committed by GitHub
parent 8f96a39e73
commit d466799871
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 4 deletions

View File

@ -32,7 +32,7 @@ export class AddressLookupTableAccount {
}
isActive(): boolean {
const U64_MAX = 18446744073709551615n;
const U64_MAX = BigInt('0xffffffffffffffff');
return this.state.deactivationSlot === U64_MAX;
}

View File

@ -12,7 +12,7 @@ function createTestKeys(count: number): Array<PublicKey> {
function createTestLookupTable(
addresses: Array<PublicKey>,
): AddressLookupTableAccount {
const U64_MAX = 18446744073709551615n;
const U64_MAX = BigInt('0xffffffffffffffff');
return new AddressLookupTableAccount({
key: PublicKey.unique(),
state: {

View File

@ -18,7 +18,7 @@ function createTestKeys(count: number): Array<PublicKey> {
function createTestLookupTable(
addresses: Array<PublicKey>,
): AddressLookupTableAccount {
const U64_MAX = 18446744073709551615n;
const U64_MAX = BigInt('0xffffffffffffffff');
return new AddressLookupTableAccount({
key: PublicKey.unique(),
state: {

View File

@ -17,7 +17,7 @@ function createTestKeys(count: number): Array<PublicKey> {
function createTestLookupTable(
addresses: Array<PublicKey>,
): AddressLookupTableAccount {
const U64_MAX = 18446744073709551615n;
const U64_MAX = BigInt('0xffffffffffffffff');
return new AddressLookupTableAccount({
key: PublicKey.unique(),
state: {