mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-12-23 11:59:30 +00:00
Remove balanceMinusMaxFee for token since fees paid in ETH and send full balance on sendAll
This commit is contained in:
parent
fd0b20d661
commit
d53709c7b0
2 changed files with 2 additions and 10 deletions
|
@ -102,13 +102,6 @@ class EthereumToken extends TokenServiceAPI {
|
|||
return await totalBalance;
|
||||
}
|
||||
|
||||
@override
|
||||
Future<Decimal> get balanceMinusMaxFee async =>
|
||||
(await availableBalance) -
|
||||
(Decimal.fromInt((await maxFee)) /
|
||||
Decimal.fromInt(Constants.satsPerCoin(coin)))
|
||||
.toDecimal();
|
||||
|
||||
@override
|
||||
Coin get coin => Coin.ethereum;
|
||||
|
||||
|
@ -263,8 +256,8 @@ class EthereumToken extends TokenServiceAPI {
|
|||
}
|
||||
|
||||
if (isSendAll) {
|
||||
//Subtract fee amount from send amount
|
||||
satoshiAmount -= feeEstimate;
|
||||
//Send the full balance
|
||||
satoshiAmount = balance;
|
||||
}
|
||||
|
||||
Map<String, dynamic> txData = {
|
||||
|
|
|
@ -45,7 +45,6 @@ abstract class TokenServiceAPI {
|
|||
|
||||
Future<Decimal> get availableBalance;
|
||||
Future<Decimal> get totalBalance;
|
||||
Future<Decimal> get balanceMinusMaxFee;
|
||||
|
||||
Future<List<String>> get allOwnAddresses;
|
||||
|
||||
|
|
Loading…
Reference in a new issue