mirror of https://github.com/waku-org/js-waku.git
Facilitate the use of a polyfill for `BigInt`
By preferring the use of `BigInt` over integer literal (`n` postfix).
This commit is contained in:
parent
d0102d90b5
commit
5de2f1996f
|
@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- Prefer the use of `BigInt` over integer literal (`n` postfix) to facilitate the use of a polyfill.
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
- Declare `it-pipe` dependency, import as per `it-pipe@2.0.0` convention.
|
- Declare `it-pipe` dependency, import as per `it-pipe@2.0.0` convention.
|
||||||
|
|
|
@ -180,7 +180,7 @@ describe("ENR", function () {
|
||||||
let record: ENR;
|
let record: ENR;
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
const seq = 1n;
|
const seq = BigInt(1);
|
||||||
privateKey = hexToBytes(
|
privateKey = hexToBytes(
|
||||||
"b71c71a67e1177ad4e901695e1b4b9ee17ae16c6668d313eac2f96dbcda3f291"
|
"b71c71a67e1177ad4e901695e1b4b9ee17ae16c6668d313eac2f96dbcda3f291"
|
||||||
);
|
);
|
||||||
|
|
|
@ -32,7 +32,7 @@ export class ENR extends Map<ENRKey, ENRValue> {
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
kvs: Record<ENRKey, ENRValue> = {},
|
kvs: Record<ENRKey, ENRValue> = {},
|
||||||
seq: SequenceNumber = 1n,
|
seq: SequenceNumber = BigInt(1),
|
||||||
signature: Uint8Array | null = null
|
signature: Uint8Array | null = null
|
||||||
) {
|
) {
|
||||||
super(Object.entries(kvs));
|
super(Object.entries(kvs));
|
||||||
|
|
Loading…
Reference in New Issue