add wallet hierarchy-aware convenience naming methods

This commit is contained in:
Craig Raw 2021-07-30 14:15:08 +02:00
parent 46e4413cf6
commit debafd42e8

View file

@ -61,6 +61,22 @@ public class Wallet extends Persistable {
return name; return name;
} }
public String getFullName() {
if(isMasterWallet()) {
return name;
}
return getMasterWallet().getName() + "-" + name;
}
public String getMasterName() {
if(isMasterWallet()) {
return name;
}
return getMasterWallet().getName();
}
public void setName(String name) { public void setName(String name) {
this.name = name; this.name = name;
} }
@ -1233,6 +1249,6 @@ public class Wallet extends Persistable {
@Override @Override
public String toString() { public String toString() {
return getName(); return getFullName();
} }
} }