mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-17 17:57:40 +00:00
Fix sendall
This commit is contained in:
parent
27322061f6
commit
78a64690ed
1 changed files with 15 additions and 0 deletions
|
@ -434,6 +434,20 @@ class EthereumWallet extends CoinServiceAPI {
|
||||||
}
|
}
|
||||||
|
|
||||||
final feeEstimate = await estimateFeeFor(satoshiAmount, fee);
|
final feeEstimate = await estimateFeeFor(satoshiAmount, fee);
|
||||||
|
print("FEE ESTIMATE IS $feeEstimate");
|
||||||
|
print("AMOUNT TO SEND IS $satoshiAmount");
|
||||||
|
|
||||||
|
bool isSendAll = false;
|
||||||
|
final balance =
|
||||||
|
Format.decimalAmountToSatoshis(await availableBalance, coin);
|
||||||
|
if (satoshiAmount == balance) {
|
||||||
|
isSendAll = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isSendAll) {
|
||||||
|
//Subtract fee amount from send amount
|
||||||
|
satoshiAmount -= feeEstimate;
|
||||||
|
}
|
||||||
|
|
||||||
Map<String, dynamic> txData = {
|
Map<String, dynamic> txData = {
|
||||||
"fee": feeEstimate,
|
"fee": feeEstimate,
|
||||||
|
@ -868,6 +882,7 @@ class EthereumWallet extends CoinServiceAPI {
|
||||||
final List<Map<String, dynamic>> midSortedArray = [];
|
final List<Map<String, dynamic>> midSortedArray = [];
|
||||||
|
|
||||||
AddressTransaction txs = await fetchAddressTransactions(thisAddress);
|
AddressTransaction txs = await fetchAddressTransactions(thisAddress);
|
||||||
|
|
||||||
if (txs.message == "OK") {
|
if (txs.message == "OK") {
|
||||||
final allTxs = txs.result;
|
final allTxs = txs.result;
|
||||||
allTxs.forEach((element) {
|
allTxs.forEach((element) {
|
||||||
|
|
Loading…
Reference in a new issue