fix signing regression on psbts with external inputs

This commit is contained in:
Craig Raw 2024-04-30 11:55:28 +02:00
parent f1b246f0b0
commit 83719e7df2
2 changed files with 4 additions and 3 deletions

2
drongo

@ -1 +1 @@
Subproject commit 143d28166a9a0b28469d1c57c460718e71803029 Subproject commit d4bdd9f3853c4dde0dc2ebeb08b1cfea33265933

View file

@ -1386,8 +1386,9 @@ public class HeadersController extends TransactionFormController implements Init
@Subscribe @Subscribe
public void openWallets(OpenWalletsEvent event) { public void openWallets(OpenWalletsEvent event) {
if(id.getScene().getWindow().equals(event.getWindow()) && headersForm.getPsbt() != null && headersForm.getBlockTransaction() == null) { if(id.getScene().getWindow().equals(event.getWindow()) && headersForm.getPsbt() != null && headersForm.getBlockTransaction() == null) {
List<Wallet> availableWallets = event.getWallets().stream().filter(wallet -> wallet.canSignAllInputs(headersForm.getPsbt())).sorted(new WalletSignComparator()).collect(Collectors.toList()); List<Wallet> availableWallets = event.getWallets().stream().filter(wallet -> wallet.canSign(headersForm.getPsbt())).sorted(new WalletSignComparator()).collect(Collectors.toList());
if(availableWallets.isEmpty()) { List<Wallet> signingAllInputsWallets = event.getWallets().stream().filter(wallet -> wallet.canSignAllInputs(headersForm.getPsbt())).sorted(new WalletSignComparator()).collect(Collectors.toList());
if(availableWallets.isEmpty() || !availableWallets.equals(signingAllInputsWallets)) {
for(Wallet wallet : event.getWalletsMap().keySet()) { for(Wallet wallet : event.getWalletsMap().keySet()) {
if(wallet.isValid() && !wallet.getSigningKeystores(headersForm.getPsbt()).isEmpty()) { if(wallet.isValid() && !wallet.getSigningKeystores(headersForm.getPsbt()).isEmpty()) {
int currentGapLimit = wallet.getGapLimit(); int currentGapLimit = wallet.getGapLimit();