Skip to content

Commit

Permalink
refactor(TokenContract): Cambiar concat string por StringBuilder
Browse files Browse the repository at this point in the history
  • Loading branch information
dfleta committed Apr 11, 2024
1 parent 9d4a631 commit 454e251
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/main/java/enzinium/TokenContract.java
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,15 @@ public Map<PublicKey, Double> getBalances() {

@Override
public String toString() {
return "\n" + "name = " + name() + "\n" +
"symbol = " + symbol() + "\n" +
"totalSupply = " + totalSupply() + "\n" +
"owner PK = " + this.ownerPK.hashCode() + "\n";
StringBuilder contract = new StringBuilder();
return contract.append("\nname = ")
.append(this.name())
.append("\nsymbol = ")
.append(this.symbol())
.append("\ntotalSupply = ")
.append(this.totalSupply())
.append("\nowner PK = ")
.append(this.ownerPK.hashCode()).toString();
}

/**
Expand Down

0 comments on commit 454e251

Please sign in to comment.