net asset should sub interest

This commit is contained in:
c9s 2022-05-04 18:56:46 +08:00
parent 5dd969fa6f
commit ef419f75ab
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54

View File

@ -31,8 +31,9 @@ func (b Balance) Net() fixedpoint.Value {
total := b.Total()
netAsset := b.NetAsset
if netAsset.IsZero() {
netAsset = total.Sub(b.Borrowed)
netAsset = total.Sub(b.Borrowed).Sub(b.Interest)
}
return netAsset
}