mirror of
https://github.com/sparrowwallet/drongo.git
synced 2024-12-26 18:16:45 +00:00
add wallet hierarchy-aware convenience naming methods
This commit is contained in:
parent
46e4413cf6
commit
debafd42e8
1 changed files with 17 additions and 1 deletions
|
@ -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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue