mirror of
https://github.com/sparrowwallet/drongo.git
synced 2024-11-02 18:26:43 +00:00
ensure deep copy of child wallets
This commit is contained in:
parent
f407547c47
commit
729c3a1435
1 changed files with 5 additions and 1 deletions
|
@ -1139,7 +1139,11 @@ public class Wallet extends Persistable {
|
|||
Wallet copy = new Wallet(name);
|
||||
copy.setId(getId());
|
||||
copy.setMasterWallet(masterWallet);
|
||||
copy.setChildWallets(childWallets);
|
||||
for(Wallet childWallet : childWallets) {
|
||||
Wallet copyChildWallet = childWallet.copy();
|
||||
copyChildWallet.setMasterWallet(copy);
|
||||
copy.childWallets.add(copyChildWallet);
|
||||
}
|
||||
copy.setPolicyType(policyType);
|
||||
copy.setScriptType(scriptType);
|
||||
copy.setDefaultPolicy(defaultPolicy.copy());
|
||||
|
|
Loading…
Reference in a new issue