mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-03-12 09:32:33 +00:00
Generic fixes (#1342)
* handle balance exceptions in estimating All exchange * Fix trades not showing
This commit is contained in:
parent
ecb4f32cda
commit
af7fe05099
2 changed files with 19 additions and 13 deletions
|
@ -220,7 +220,9 @@ abstract class ElectrumWalletAddressesBase extends WalletAddresses with Store {
|
|||
Future<void> updateAddressesInBox() async {
|
||||
try {
|
||||
addressesMap.clear();
|
||||
addressesMap[address] = '';
|
||||
_addresses.forEach((addressRecord) {
|
||||
addressesMap[addressRecord.address] = addressRecord.name;
|
||||
});
|
||||
await saveAddressesInBox();
|
||||
} catch (e) {
|
||||
print(e.toString());
|
||||
|
|
|
@ -127,6 +127,7 @@ class CWBitcoin extends Bitcoin {
|
|||
|
||||
final p2shAddr = sk.getPublic().toP2pkhInP2sh();
|
||||
final p2wpkhAddr = sk.getPublic().toP2wpkhAddress();
|
||||
try {
|
||||
final estimatedTx = await electrumWallet.estimateTxFeeAndInputsToUse(
|
||||
0,
|
||||
true,
|
||||
|
@ -140,6 +141,9 @@ class CWBitcoin extends Bitcoin {
|
|||
priority as BitcoinTransactionPriority);
|
||||
|
||||
return estimatedTx.amount;
|
||||
} catch (_) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
Loading…
Reference in a new issue