mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-06-28 12:29:51 +00:00
Generic Fixes (#1103)
* Update trade_details_page.dart * let web3dart calculate gas price and max gas while just providing the priority fee per gas needed
This commit is contained in:
parent
f07062d987
commit
b1859b9e63
3 changed files with 6 additions and 6 deletions
|
@ -65,13 +65,11 @@ class EthereumClient {
|
|||
|
||||
bool _isEthereum = currency == CryptoCurrency.eth;
|
||||
|
||||
final price = await _client!.getGasPrice();
|
||||
final price = _client!.getGasPrice();
|
||||
|
||||
final Transaction transaction = Transaction(
|
||||
from: privateKey.address,
|
||||
to: EthereumAddress.fromHex(toAddress),
|
||||
maxGas: gas,
|
||||
gasPrice: price,
|
||||
maxPriorityFeePerGas: EtherAmount.fromInt(EtherUnit.gwei, priority.tip),
|
||||
value: _isEthereum ? EtherAmount.inWei(BigInt.parse(amount)) : EtherAmount.zero(),
|
||||
);
|
||||
|
@ -101,7 +99,7 @@ class EthereumClient {
|
|||
return PendingEthereumTransaction(
|
||||
signedTransaction: signedTransaction,
|
||||
amount: amount,
|
||||
fee: BigInt.from(gas) * price.getInWei,
|
||||
fee: BigInt.from(gas) * (await price).getInWei,
|
||||
sendTransaction: _sendTransaction,
|
||||
exponent: exponent,
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue