Skip to content

Commit

Permalink
Move all wrapping to proper _wrap functions (#3818).
Browse files Browse the repository at this point in the history
  • Loading branch information
ricmoo committed Mar 10, 2023
1 parent 278f841 commit 02a0aad
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src.ts/providers/abstract-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ export class AbstractProvider implements Provider {
}

_wrapTransactionResponse(tx: TransactionResponseParams, network: Network): TransactionResponse {
return new TransactionResponse(tx, this);
return new TransactionResponse(formatTransactionResponse(tx), this);
}

_detectNetwork(): Promise<Network> {
Expand Down Expand Up @@ -897,7 +897,7 @@ export class AbstractProvider implements Provider {
});
if (params == null) { return null; }

return this._wrapBlock(formatBlock(params), network);
return this._wrapBlock(params, network);
}

async getTransaction(hash: string): Promise<null | TransactionResponse> {
Expand All @@ -907,7 +907,7 @@ export class AbstractProvider implements Provider {
});
if (params == null) { return null; }

return this._wrapTransactionResponse(formatTransactionResponse(params), network);
return this._wrapTransactionResponse(params, network);
}

async getTransactionReceipt(hash: string): Promise<null | TransactionReceipt> {
Expand All @@ -925,7 +925,7 @@ export class AbstractProvider implements Provider {
params.effectiveGasPrice = tx.gasPrice;
}

return this._wrapTransactionReceipt(formatTransactionReceipt(params), network);
return this._wrapTransactionReceipt(params, network);
}

async getTransactionResult(hash: string): Promise<null | string> {
Expand All @@ -947,7 +947,7 @@ export class AbstractProvider implements Provider {
params: this.#perform<Array<LogParams>>({ method: "getLogs", filter })
});

return params.map((p) => this._wrapLog(formatLog(p), network));
return params.map((p) => this._wrapLog(p, network));
}

// ENS
Expand Down

0 comments on commit 02a0aad

Please sign in to comment.