Remove balanceMinusMaxFee for token since fees paid in ETH and send full balance on sendAll

This commit is contained in:
likho 2023-01-27 16:32:03 +02:00
parent fd0b20d661
commit d53709c7b0
2 changed files with 2 additions and 10 deletions

View file

@ -102,13 +102,6 @@ class EthereumToken extends TokenServiceAPI {
return await totalBalance; return await totalBalance;
} }
@override
Future<Decimal> get balanceMinusMaxFee async =>
(await availableBalance) -
(Decimal.fromInt((await maxFee)) /
Decimal.fromInt(Constants.satsPerCoin(coin)))
.toDecimal();
@override @override
Coin get coin => Coin.ethereum; Coin get coin => Coin.ethereum;
@ -263,8 +256,8 @@ class EthereumToken extends TokenServiceAPI {
} }
if (isSendAll) { if (isSendAll) {
//Subtract fee amount from send amount //Send the full balance
satoshiAmount -= feeEstimate; satoshiAmount = balance;
} }
Map<String, dynamic> txData = { Map<String, dynamic> txData = {

View file

@ -45,7 +45,6 @@ abstract class TokenServiceAPI {
Future<Decimal> get availableBalance; Future<Decimal> get availableBalance;
Future<Decimal> get totalBalance; Future<Decimal> get totalBalance;
Future<Decimal> get balanceMinusMaxFee;
Future<List<String>> get allOwnAddresses; Future<List<String>> get allOwnAddresses;