Skip to content

Commit

Permalink
stringer skips empty special assets
Browse files Browse the repository at this point in the history
  • Loading branch information
toteki committed Nov 8, 2023
1 parent 7f0659f commit 62002d2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion x/leverage/types/string.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ func (ap *AccountPosition) String() string {
collateral := []string{}
borrowed := []string{}
for _, wsp := range ap.specialPairs {
special = append(special, wsp.String())
if wsp.Borrow.IsPositive() || wsp.Collateral.IsPositive() {
special = append(special, wsp.String())
}
}
for _, c := range ap.collateralValue {
collateral = append(collateral, c.String())
Expand Down

0 comments on commit 62002d2

Please sign in to comment.