Sp enhancements (#1672)

* fix: enhance regex, fix multiline

* feat: improve scan msg, fix missing txs, use date api

* feat: node fixes, enhance send modal, TX list tag & filter, refactors

* fix: continuous scanning

* fix: missing close

* fix: resubscribe tweaks

* feat: use mempool api setting toggle

* handle any failure of height API and fallback to the old method [skip ci]

---------

Co-authored-by: OmarHatem <omarh.ismail1@gmail.com>
This commit is contained in:
Rafael 2024-09-20 14:24:25 +00:00 committed by GitHub
parent b6bc3df622
commit 3a391f10a3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
61 changed files with 872 additions and 531 deletions

View file

@ -116,7 +116,7 @@ import 'package:cw_bitcoin/bitcoin_address_record.dart';
import 'package:cw_bitcoin/bitcoin_transaction_credentials.dart';
import 'package:cw_bitcoin/litecoin_wallet_service.dart';
import 'package:cw_core/get_height_by_date.dart';
import 'package:cw_bitcoin/script_hash.dart';
import 'package:cw_core/transaction_info.dart';
import 'package:cw_bitcoin/bitcoin_hardware_wallet_service.dart';
import 'package:mobx/mobx.dart';
""";
@ -211,7 +211,8 @@ abstract class Bitcoin {
int getEstimatedFeeWithFeeRate(Object wallet, int feeRate, int? amount,
{int? outputsCount, int? size});
int feeAmountWithFeeRate(Object wallet, int feeRate, int inputsCount, int outputsCount, {int? size});
int getHeightByDate({required DateTime date});
Future<bool> checkIfMempoolAPIIsEnabled(Object wallet);
Future<int> getHeightByDate({required DateTime date, bool? bitcoinMempoolAPIEnabled});
Future<void> rescan(Object wallet, {required int height, bool? doSingleScan});
Future<bool> getNodeIsElectrsSPEnabled(Object wallet);
void deleteSilentPaymentAddress(Object wallet, String address);
@ -220,6 +221,8 @@ abstract class Bitcoin {
void setLedger(WalletBase wallet, Ledger ledger, LedgerDevice device);
Future<List<HardwareAccountData>> getHardwareWalletAccounts(LedgerViewModel ledgerVM, {int index = 0, int limit = 5});
List<Output> updateOutputs(PendingTransaction pendingTransaction, List<Output> outputs);
bool txIsReceivedSilentPayment(TransactionInfo txInfo);
}
""";