mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2026-08-10 08:37:05 +00:00
allow multisig wallets with many (up to 50) keystores
This commit is contained in:
@@ -898,7 +898,7 @@ public class AppServices {
|
||||
|
||||
Platform.runLater(() -> {
|
||||
if(!Window.getWindows().isEmpty()) {
|
||||
List<File> walletFiles = allWallets.stream().filter(walletTabData -> walletTabData.getWallet().getMasterWallet() == null).map(walletTabData -> walletTabData.getStorage().getWalletFile()).collect(Collectors.toList());
|
||||
List<File> walletFiles = allWallets.stream().filter(walletTabData -> walletTabData.getWallet().getMasterWallet() == null).map(walletTabData -> walletTabData.getStorage().getWalletFile()).filter(File::exists).collect(Collectors.toList());
|
||||
Config.get().setRecentWalletFiles(Config.get().isLoadRecentWallets() ? walletFiles : Collections.emptyList());
|
||||
}
|
||||
});
|
||||
|
||||
@@ -142,6 +142,11 @@ public class SettingsController extends WalletFormController implements Initiali
|
||||
multisigControl.lowValueProperty().addListener((observable, oldValue, threshold) -> {
|
||||
EventManager.get().post(new SettingsChangedEvent(walletForm.getWallet(), SettingsChangedEvent.Type.MUTLISIG_THRESHOLD));
|
||||
});
|
||||
multisigControl.highValueProperty().addListener((observable, oldValue, newValue) -> {
|
||||
if(newValue.doubleValue() == multisigControl.getMax() && newValue.doubleValue() <= 49.0) {
|
||||
multisigControl.setMax(newValue.doubleValue() + 1.0);
|
||||
}
|
||||
});
|
||||
|
||||
multisigFieldset.managedProperty().bind(multisigFieldset.visibleProperty());
|
||||
|
||||
@@ -223,6 +228,7 @@ public class SettingsController extends WalletFormController implements Initiali
|
||||
if(wallet.getPolicyType().equals(PolicyType.SINGLE)) {
|
||||
totalKeystores.setValue(1);
|
||||
} else if(wallet.getPolicyType().equals(PolicyType.MULTI)) {
|
||||
multisigControl.setMax(Math.max(multisigControl.getMax(), wallet.getKeystores().size()));
|
||||
multisigControl.lowValueProperty().set(wallet.getDefaultPolicy().getNumSignaturesRequired());
|
||||
multisigControl.highValueProperty().set(wallet.getKeystores().size());
|
||||
totalKeystores.bind(multisigControl.highValueProperty());
|
||||
|
||||
Reference in New Issue
Block a user