From 0df3ab93137039de1e1986bbfe9a5b32ceffa8a4 Mon Sep 17 00:00:00 2001 From: Richard Moore Date: Mon, 14 Aug 2023 19:34:01 -0400 Subject: [PATCH] Add gasPrice to Polygon feeData for type 0 and type 1 legacy transactions (#4315). --- src.ts/providers/network.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src.ts/providers/network.ts b/src.ts/providers/network.ts index e62151021..0fe9c91ae 100644 --- a/src.ts/providers/network.ts +++ b/src.ts/providers/network.ts @@ -329,9 +329,13 @@ function getGasStationPlugin(url: string) { let response; try { - response = await request.send(); + const [ _response, _feeData ] = await Promise.all([ + request.send(), fetchFeeData() + ]); + response = _response; const payload = response.bodyJson.standard; const feeData = { + gasPrice: _feeData.gasPrice, maxFeePerGas: parseUnits(payload.maxFee, 9), maxPriorityFeePerGas: parseUnits(payload.maxPriorityFee, 9), };