mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-06-28 12:29:51 +00:00
CW-1086: Polygon Issues (#2329)
* fix(polygon): Polygon wallets not showing in address book when sending tokens * feat(polygon_issues): Enhance gas price handling in EVM Chains This change: - Updates gas price calculation to account for minimum priority fee in Polygon - Adjusts gas price handling to use maxFeePerGas when gasPrice is not provided. - Fixes issue with send all for Polygon
This commit is contained in:
parent
5082dc20f3
commit
4434ad7363
5 changed files with 63 additions and 16 deletions
|
@ -18,13 +18,20 @@ class PolygonClient extends EVMChainClient {
|
|||
EtherAmount? gasPrice,
|
||||
EtherAmount? maxFeePerGas,
|
||||
}) {
|
||||
EtherAmount? finalGasPrice = gasPrice;
|
||||
|
||||
if (gasPrice == null && maxFeePerGas != null) {
|
||||
// If we have EIP-1559 parameters but no legacy gasPrice, then use maxFeePerGas as gasPrice
|
||||
finalGasPrice = maxFeePerGas;
|
||||
}
|
||||
|
||||
return Transaction(
|
||||
from: from,
|
||||
to: to,
|
||||
value: amount,
|
||||
// data: data,
|
||||
data: data,
|
||||
maxGas: maxGas,
|
||||
// gasPrice: gasPrice,
|
||||
gasPrice: finalGasPrice,
|
||||
// maxFeePerGas: maxFeePerGas,
|
||||
// maxPriorityFeePerGas: maxPriorityFeePerGas,
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue