Skip to content

Commit

Permalink
Add gasPrice to Polygon feeData for type 0 and type 1 legacy transact…
Browse files Browse the repository at this point in the history
…ions (#4315).
  • Loading branch information
ricmoo committed Aug 14, 2023
1 parent b4fb1a1 commit 0df3ab9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src.ts/providers/network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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),
};
Expand Down

0 comments on commit 0df3ab9

Please sign in to comment.