mirror of
https://github.com/sparrowwallet/drongo.git
synced 2024-12-26 18:16:45 +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);
|
Wallet copy = new Wallet(name);
|
||||||
copy.setId(getId());
|
copy.setId(getId());
|
||||||
copy.setMasterWallet(masterWallet);
|
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.setPolicyType(policyType);
|
||||||
copy.setScriptType(scriptType);
|
copy.setScriptType(scriptType);
|
||||||
copy.setDefaultPolicy(defaultPolicy.copy());
|
copy.setDefaultPolicy(defaultPolicy.copy());
|
||||||
|
|
Loading…
Reference in a new issue