chainapsis / keplr-wallet

The most powerful wallet for the Cosmos ecosystem and the Interchain
https://www.keplr.app
Other
777 stars 463 forks source link

After adding "evm" configuration, gas fee estimation is wrong #1089

Open zakir-code opened 8 months ago

zakir-code commented 8 months ago

Describe the bug

If the evm configuration is set, eip1559 will be used first to calculate the handling fee. However, the cosmos transaction fee is calculated according to minimum-gas-prices. The gas prices in the two places may not be the same. If minimum-gas-prices is larger and always fails when sending transactions using keplr.

https://github.com/chainapsis/keplr-wallet/blob/9ee1c40b158a51f6534bae01c1840a54bea9120c/packages/hooks/src/tx/fee.ts#L553-L561

Expected behavior

I wonder if I can add configuration in evm, such as enable_eip1559, or compare the final calculation results of the two, and use the larger one first.

delivan commented 8 months ago

Hi @zakir-code

Our intention is that if the user enters a bech32 address on the send page, the transaction fee should be calculated by Cosmos way, and if the user enters a hex address, it should be calculated by EIP-1559 way. But currently gas estimation works as intended, but gas price doesn't work like that as you said. Thanks for letting us know. We will fix it as soon as possible.