mirror of
https://github.com/sparrowwallet/drongo.git
synced 2024-12-25 17:46:44 +00:00
always use master wallet for testing if payment was sent to child, add postmix check
This commit is contained in:
parent
74d2bfec24
commit
30aff11908
1 changed files with 6 additions and 1 deletions
|
@ -129,13 +129,18 @@ public class WalletTransaction {
|
||||||
return isWalletSend(StandardAccount.WHIRLPOOL_PREMIX, payment);
|
return isWalletSend(StandardAccount.WHIRLPOOL_PREMIX, payment);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isPostmixSend(Payment payment) {
|
||||||
|
return isWalletSend(StandardAccount.WHIRLPOOL_POSTMIX, payment);
|
||||||
|
}
|
||||||
|
|
||||||
public boolean isBadbankSend(Payment payment) {
|
public boolean isBadbankSend(Payment payment) {
|
||||||
return isWalletSend(StandardAccount.WHIRLPOOL_BADBANK, payment);
|
return isWalletSend(StandardAccount.WHIRLPOOL_BADBANK, payment);
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isWalletSend(StandardAccount childAccount, Payment payment) {
|
private boolean isWalletSend(StandardAccount childAccount, Payment payment) {
|
||||||
if(getWallet() != null) {
|
if(getWallet() != null) {
|
||||||
return isWalletSend(getWallet().getChildWallet(childAccount), payment);
|
Wallet masterWallet = getWallet().isMasterWallet() ? getWallet() : getWallet().getMasterWallet();
|
||||||
|
return isWalletSend(masterWallet.getChildWallet(childAccount), payment);
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in a new issue