mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-17 09:47:37 +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;
|
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 = {
|
||||||
|
|
|
@ -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;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue