Skip to content

Commit

Permalink
change access modifier to 'protected' for 'startBlock'
Browse files Browse the repository at this point in the history
  • Loading branch information
alejoacosta74 committed May 22, 2024
1 parent 83128d3 commit f37ad6a
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions src.ts/providers/provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1547,9 +1547,7 @@ export class QuaiTransactionResponse implements QuaiTransactionLike, QuaiTransac
*/
readonly accessList!: null | AccessList;

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
#startBlock: number;
protected startBlock: number;

/**
* @ignore
Expand Down Expand Up @@ -1580,7 +1578,7 @@ export class QuaiTransactionResponse implements QuaiTransactionLike, QuaiTransac
this.signature = tx.signature;

this.accessList = tx.accessList != null ? tx.accessList : null;
this.#startBlock = -1;
this.startBlock = -1;
}

/**
Expand Down Expand Up @@ -1696,7 +1694,7 @@ export class QuaiTransactionResponse implements QuaiTransactionLike, QuaiTransac
const confirms = _confirms == null ? 1 : _confirms;
const timeout = _timeout == null ? 0 : _timeout;

let startBlock = this.#startBlock;
let startBlock = this.startBlock;
let nextScan = -1;
let stopScanning = startBlock === -1 ? true : false;
const shard = shardFromHash(this.hash);
Expand Down Expand Up @@ -1731,8 +1729,8 @@ export class QuaiTransactionResponse implements QuaiTransactionLike, QuaiTransac
// Starting to scan; look back a few extra blocks for safety
if (nextScan === -1) {
nextScan = startBlock - 3;
if (nextScan < this.#startBlock) {
nextScan = this.#startBlock;
if (nextScan < this.startBlock) {
nextScan = this.startBlock;
}
}

Expand Down Expand Up @@ -1967,7 +1965,7 @@ export class QuaiTransactionResponse implements QuaiTransactionLike, QuaiTransac
replaceableTransaction(startBlock: number): QuaiTransactionResponse {
assertArgument(Number.isInteger(startBlock) && startBlock >= 0, 'invalid startBlock', 'startBlock', startBlock);
const tx = new QuaiTransactionResponse(this, this.provider);
tx.#startBlock = startBlock;
tx.startBlock = startBlock;
return tx;
}
}
Expand Down Expand Up @@ -2027,7 +2025,7 @@ export class QiTransactionResponse implements QiTransactionLike, QiTransactionRe

readonly txOutputs?: Array<TxOutput>;

#startBlock: number;
protected startBlock: number;
/**
* @ignore
*/
Expand All @@ -2045,7 +2043,7 @@ export class QiTransactionResponse implements QiTransactionLike, QiTransactionRe
this.chainId = tx.chainId;
this.signature = tx.signature;

this.#startBlock = -1;
this.startBlock = -1;

this.txInputs = tx.txInputs;
this.txOutputs = tx.txOutputs;
Expand Down Expand Up @@ -2381,7 +2379,7 @@ export class QiTransactionResponse implements QiTransactionLike, QiTransactionRe
replaceableTransaction(startBlock: number): QiTransactionResponse {
assertArgument(Number.isInteger(startBlock) && startBlock >= 0, 'invalid startBlock', 'startBlock', startBlock);
const tx = new QiTransactionResponse(this, this.provider);
tx.#startBlock = startBlock;
tx.startBlock = startBlock;
return tx;
}
}
Expand Down

0 comments on commit f37ad6a

Please sign in to comment.