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:
parent
8f96a39e73
commit
d466799871
|
@ -32,7 +32,7 @@ export class AddressLookupTableAccount {
|
|||
}
|
||||
|
||||
isActive(): boolean {
|
||||
const U64_MAX = 18446744073709551615n;
|
||||
const U64_MAX = BigInt('0xffffffffffffffff');
|
||||
return this.state.deactivationSlot === U64_MAX;
|
||||
}
|
||||
|
||||
|
|
|
@ -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: {
|
||||
|
|
|
@ -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: {
|
||||
|
|
|
@ -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: {
|
||||
|
|
Loading…
Reference in New Issue