types: call debt()

This commit is contained in:
c9s 2022-07-26 11:44:57 +08:00
parent 79fe49f66f
commit 9787b867ac
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54

View File

@ -42,7 +42,7 @@ func (b Balance) Total() fixedpoint.Value {
// Net returns the net asset value (total - debt)
func (b Balance) Net() fixedpoint.Value {
total := b.Total()
return total.Sub(b.Borrowed).Sub(b.Interest)
return total.Sub(b.Debt())
}
func (b Balance) Debt() fixedpoint.Value {