Merge pull request #1343 from c9s/bhwu/max/remove-outdated-max-fields

FIX: [max] remove outdated margin fields
This commit is contained in:
gx578007 2023-10-18 15:41:33 +08:00 committed by GitHub
commit 5c8c66a740
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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