From 02a0aad61212c35e8d2723a8ae589989b97dae3e Mon Sep 17 00:00:00 2001 From: Richard Moore Date: Fri, 10 Mar 2023 07:02:51 -0500 Subject: [PATCH] Move all wrapping to proper _wrap functions (#3818). --- src.ts/providers/abstract-provider.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src.ts/providers/abstract-provider.ts b/src.ts/providers/abstract-provider.ts index c53c4b6a2..913e85a21 100644 --- a/src.ts/providers/abstract-provider.ts +++ b/src.ts/providers/abstract-provider.ts @@ -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 { @@ -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 { @@ -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 { @@ -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 { @@ -947,7 +947,7 @@ export class AbstractProvider implements Provider { params: this.#perform>({ method: "getLogs", filter }) }); - return params.map((p) => this._wrapLog(formatLog(p), network)); + return params.map((p) => this._wrapLog(p, network)); } // ENS