mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-03-28 10:08:46 +00:00
block sent notification tx change output with reason
This commit is contained in:
parent
0cace4d7bc
commit
d45caa47b3
2 changed files with 20 additions and 16 deletions
lib/services/coins
|
@ -1844,14 +1844,16 @@ class BitcoinWallet extends CoinServiceAPI
|
|||
String? blockReason;
|
||||
|
||||
if (storedTx?.subType ==
|
||||
isar_models.TransactionSubType.bip47Notification &&
|
||||
storedTx?.type == isar_models.TransactionType.incoming) {
|
||||
// probably safe to assume this is an incoming tx as it is a utxo
|
||||
// belonging to this wallet. The extra check may be redundant but
|
||||
// just in case...
|
||||
|
||||
shouldBlock = true;
|
||||
blockReason = "Incoming paynym notification transaction.";
|
||||
isar_models.TransactionSubType.bip47Notification) {
|
||||
if (storedTx?.type == isar_models.TransactionType.incoming) {
|
||||
shouldBlock = true;
|
||||
blockReason = "Incoming paynym notification transaction.";
|
||||
} else if (storedTx?.type == isar_models.TransactionType.outgoing) {
|
||||
shouldBlock = true;
|
||||
blockReason = "Paynym notification change output. Incautious "
|
||||
"handling of change outputs from notification transactions "
|
||||
"may cause unintended loss of privacy.";
|
||||
}
|
||||
}
|
||||
|
||||
final vout = jsonUTXO["tx_pos"] as int;
|
||||
|
|
|
@ -1589,14 +1589,16 @@ class DogecoinWallet extends CoinServiceAPI
|
|||
String? blockReason;
|
||||
|
||||
if (storedTx?.subType ==
|
||||
isar_models.TransactionSubType.bip47Notification &&
|
||||
storedTx?.type == isar_models.TransactionType.incoming) {
|
||||
// probably safe to assume this is an incoming tx as it is a utxo
|
||||
// belonging to this wallet. The extra check may be redundant but
|
||||
// just in case...
|
||||
|
||||
shouldBlock = true;
|
||||
blockReason = "Incoming paynym notification transaction.";
|
||||
isar_models.TransactionSubType.bip47Notification) {
|
||||
if (storedTx?.type == isar_models.TransactionType.incoming) {
|
||||
shouldBlock = true;
|
||||
blockReason = "Incoming paynym notification transaction.";
|
||||
} else if (storedTx?.type == isar_models.TransactionType.outgoing) {
|
||||
shouldBlock = true;
|
||||
blockReason = "Paynym notification change output. Incautious "
|
||||
"handling of change outputs from notification transactions "
|
||||
"may cause unintended loss of privacy.";
|
||||
}
|
||||
}
|
||||
|
||||
final vout = jsonUTXO["tx_pos"] as int;
|
||||
|
|
Loading…
Reference in a new issue