Merge branch 'main' of https://github.com/cake-tech/cake_wallet into CW-477-add-ens

This commit is contained in:
fosse 2023-09-29 11:14:02 -04:00
commit 953cae3e48
24 changed files with 512 additions and 142 deletions

View file

@ -66,13 +66,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(),
);
@ -102,7 +100,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,
);