* FIX!

* resolve conflicts with main

* undo debug changes

* fix: methods

* fix: methods2

* Fix Tron issue

* fix: 1k limit & reaching top

* fix: missing unspents

* fix: missing commit

---------

Co-authored-by: OmarHatem <omarh.ismail1@gmail.com>
This commit is contained in:
rafael_xmr 2025-05-25 16:28:08 -03:00 committed by GitHub
parent e52bceda3a
commit 7b8ddf9685
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
36 changed files with 667 additions and 402 deletions

View file

@ -213,9 +213,9 @@ class CWBitcoin extends Bitcoin {
return bitcoinWallet.unspentCoins.where((element) {
switch (coinTypeToSpendFrom) {
case UnspentCoinType.mweb:
return element.bitcoinAddressRecord.type == SegwitAddresType.mweb;
return element.bitcoinAddressRecord.type == SegwitAddressType.mweb;
case UnspentCoinType.nonMweb:
return element.bitcoinAddressRecord.type != SegwitAddresType.mweb;
return element.bitcoinAddressRecord.type != SegwitAddressType.mweb;
case UnspentCoinType.any:
return true;
}
@ -296,14 +296,14 @@ class CWBitcoin extends Bitcoin {
case BitcoinReceivePageOption.p2sh:
return P2shAddressType.p2wpkhInP2sh;
case BitcoinReceivePageOption.p2tr:
return SegwitAddresType.p2tr;
return SegwitAddressType.p2tr;
case BitcoinReceivePageOption.p2wsh:
return SegwitAddresType.p2wsh;
return SegwitAddressType.p2wsh;
case BitcoinReceivePageOption.mweb:
return SegwitAddresType.mweb;
return SegwitAddressType.mweb;
case BitcoinReceivePageOption.p2wpkh:
default:
return SegwitAddresType.p2wpkh;
return SegwitAddressType.p2wpkh;
}
}
@ -527,7 +527,7 @@ class CWBitcoin extends Bitcoin {
List<ElectrumSubAddress> getSilentPaymentAddresses(Object wallet) {
final bitcoinWallet = wallet as ElectrumWallet;
return bitcoinWallet.walletAddresses.silentAddresses
.where((addr) => addr.type != SegwitAddresType.p2tr)
.where((addr) => addr.type != SegwitAddressType.p2tr)
.map((addr) => ElectrumSubAddress(
id: addr.index,
name: addr.name,
@ -542,7 +542,7 @@ class CWBitcoin extends Bitcoin {
List<ElectrumSubAddress> getSilentPaymentReceivedAddresses(Object wallet) {
final bitcoinWallet = wallet as ElectrumWallet;
return bitcoinWallet.walletAddresses.silentAddresses
.where((addr) => addr.type == SegwitAddresType.p2tr)
.where((addr) => addr.type == SegwitAddressType.p2tr)
.map((addr) => ElectrumSubAddress(
id: addr.index,
name: addr.name,
@ -712,7 +712,7 @@ class CWBitcoin extends Bitcoin {
try {
final electrumWallet = wallet as ElectrumWallet;
final segwitAddress = electrumWallet.walletAddresses.allAddresses
.firstWhere((element) => !element.isUsed && element.type == SegwitAddresType.p2wpkh);
.firstWhere((element) => !element.isUsed && element.type == SegwitAddressType.p2wpkh);
return segwitAddress.address;
} catch (_) {
return null;