5afe / safe-relay-service

Relay Tx Service for Gnosis Safe
MIT License
59 stars 32 forks source link

Estimating a safe transaction gas in Polygon using USDC/USDT tokens results in a zero gas price #553

Closed FadhlanR closed 1 year ago

FadhlanR commented 1 year ago

We use a relay server in Polygon and we enable USDC and USDT as gas tokens. When estimating secure transactions using either of the two tokens, the gas price value is 0. After some investigation, I believe this line of code is the reason for that. In the USDC/USDT case, estimated_gas_price is 1, and if that line of code performs, int(1 * 2 / 3) => 0.

I think that line of code, needs to be updated to something like this math.ceil(estimated_gas_price * 2 / 3).

Uxio0 commented 1 year ago

Sounds good, if you send a PR I will review and merge

FadhlanR commented 1 year ago

@Uxio0 Do we need a new release for this fix?

Uxio0 commented 1 year ago

@Uxio0 Do we need a new release for this fix?

😉 https://github.com/5afe/safe-relay-service/releases/tag/v4.3.0

FadhlanR commented 1 year ago

Thanks!