FIX: [max] remove outdated margin fields

This commit is contained in:
gx578007 2023-10-17 15:45:55 +08:00
parent d50e50991e
commit 10daeab1cb
2 changed files with 2 additions and 4 deletions

View File

@ -664,8 +664,8 @@ func (e *Exchange) queryBalances(ctx context.Context, walletType maxapi.WalletTy
Currency: cur,
Available: b.Balance,
Locked: b.Locked,
NetAsset: b.Balance.Add(b.Locked).Sub(b.Debt),
Borrowed: b.Borrowed,
NetAsset: b.Balance.Add(b.Locked).Sub(b.Principal).Sub(b.Interest),
Borrowed: b.Principal,
Interest: b.Interest,
}
}

View File

@ -25,9 +25,7 @@ type Account struct {
Locked fixedpoint.Value `json:"locked"`
// v3 fields for M wallet
Debt fixedpoint.Value `json:"debt"`
Principal fixedpoint.Value `json:"principal"`
Borrowed fixedpoint.Value `json:"borrowed"`
Interest fixedpoint.Value `json:"interest"`
// v2 fields