mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-04-11 09:51:57 +00:00
fix mweb tags
This commit is contained in:
parent
f2ddbcf740
commit
6bcda3b5cf
1 changed files with 21 additions and 2 deletions
|
@ -614,7 +614,26 @@ class CWBitcoin extends Bitcoin {
|
|||
bool txIsMweb(TransactionInfo txInfo) {
|
||||
final tx = txInfo as ElectrumTransactionInfo;
|
||||
|
||||
// return tx.isMweb;
|
||||
return false;
|
||||
List<String> inputAddresses = tx.inputAddresses ?? [];
|
||||
List<String> outputAddresses = tx.outputAddresses ?? [];
|
||||
bool inputAddressesContainMweb = false;
|
||||
bool outputAddressesContainMweb = false;
|
||||
|
||||
for (var address in inputAddresses) {
|
||||
if (address.toLowerCase().contains('mweb')) {
|
||||
inputAddressesContainMweb = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
for (var address in outputAddresses) {
|
||||
if (address.toLowerCase().contains('mweb')) {
|
||||
outputAddressesContainMweb = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: this could be improved:
|
||||
return inputAddressesContainMweb || outputAddressesContainMweb;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue