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
|
@ -109,7 +109,6 @@ abstract class EVMChainClient {
|
|||
sender: senderAddress,
|
||||
to: toAddress,
|
||||
value: value,
|
||||
// maxFeePerGas: maxFeePerGas,
|
||||
);
|
||||
|
||||
return estimatedGas.toInt();
|
||||
|
@ -165,6 +164,7 @@ abstract class EVMChainClient {
|
|||
required int exponent,
|
||||
String? contractAddress,
|
||||
String? data,
|
||||
int? gasPrice,
|
||||
}) async {
|
||||
assert(currency == CryptoCurrency.eth ||
|
||||
currency == CryptoCurrency.maticpoly ||
|
||||
|
@ -180,6 +180,7 @@ abstract class EVMChainClient {
|
|||
data: data != null ? hexToBytes(data) : null,
|
||||
maxGas: estimatedGasUnits,
|
||||
maxFeePerGas: EtherAmount.fromInt(EtherUnit.wei, maxFeePerGas),
|
||||
gasPrice: gasPrice != null ? EtherAmount.fromInt(EtherUnit.wei, gasPrice) : null,
|
||||
);
|
||||
|
||||
Uint8List signedTransaction;
|
||||
|
@ -224,6 +225,7 @@ abstract class EVMChainClient {
|
|||
required EVMChainTransactionPriority priority,
|
||||
required int exponent,
|
||||
required String contractAddress,
|
||||
int? gasPrice,
|
||||
}) async {
|
||||
|
||||
final Transaction transaction = createTransaction(
|
||||
|
@ -233,6 +235,7 @@ abstract class EVMChainClient {
|
|||
amount: EtherAmount.zero(),
|
||||
maxGas: estimatedGasUnits,
|
||||
maxFeePerGas: EtherAmount.fromInt(EtherUnit.wei, maxFeePerGas),
|
||||
gasPrice: gasPrice != null ? EtherAmount.fromInt(EtherUnit.wei, gasPrice) : null,
|
||||
);
|
||||
|
||||
final erc20 = ERC20(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue