mirror of
https://github.com/sparrowwallet/drongo.git
synced 2024-12-26 01:56:44 +00:00
add master wallet reference
This commit is contained in:
parent
cc32285d58
commit
7dca0d0c39
1 changed files with 9 additions and 0 deletions
|
@ -24,6 +24,7 @@ public class Wallet {
|
||||||
public static final String ALLOW_DERIVATIONS_MATCHING_OTHER_SCRIPT_TYPES_PROPERTY = "com.sparrowwallet.allowDerivationsMatchingOtherScriptTypes";
|
public static final String ALLOW_DERIVATIONS_MATCHING_OTHER_SCRIPT_TYPES_PROPERTY = "com.sparrowwallet.allowDerivationsMatchingOtherScriptTypes";
|
||||||
|
|
||||||
private String name;
|
private String name;
|
||||||
|
private Wallet masterWallet;
|
||||||
private Network network = Network.get();
|
private Network network = Network.get();
|
||||||
private PolicyType policyType;
|
private PolicyType policyType;
|
||||||
private ScriptType scriptType;
|
private ScriptType scriptType;
|
||||||
|
@ -140,6 +141,14 @@ public class Wallet {
|
||||||
this.birthDate = birthDate;
|
this.birthDate = birthDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Wallet getMasterWallet() {
|
||||||
|
return masterWallet;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMasterWallet(Wallet masterWallet) {
|
||||||
|
this.masterWallet = masterWallet;
|
||||||
|
}
|
||||||
|
|
||||||
public synchronized WalletNode getNode(KeyPurpose keyPurpose) {
|
public synchronized WalletNode getNode(KeyPurpose keyPurpose) {
|
||||||
WalletNode purposeNode;
|
WalletNode purposeNode;
|
||||||
Optional<WalletNode> optionalPurposeNode = purposeNodes.stream().filter(node -> node.getKeyPurpose().equals(keyPurpose)).findFirst();
|
Optional<WalletNode> optionalPurposeNode = purposeNodes.stream().filter(node -> node.getKeyPurpose().equals(keyPurpose)).findFirst();
|
||||||
|
|
Loading…
Reference in a new issue