Skip to content

Commit

Permalink
Merge pull request #10471 from vegaprotocol/estimate-position-fix
Browse files Browse the repository at this point in the history
Estimate position fix
  • Loading branch information
jeremyletang authored Jan 23, 2024
2 parents 921c4c9 + 4be9683 commit 762bbe2
Show file tree
Hide file tree
Showing 5 changed files with 1,858 additions and 1,850 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,9 @@
- [10454](https://github.com/vegaprotocol/vega/issues/10454) - Fix account resolver validation to include order margin account.
- [10451](https://github.com/vegaprotocol/vega/issues/10451) - Fix get update asset bundle.
- [10419](https://github.com/vegaprotocol/vega/issues/10419) - Block explorer database migration is slow.
- [10431](https://github.com/vegaprotocol/vega/issues/10431) - Fix source staleness validation.
- [10431](https://github.com/vegaprotocol/vega/issues/10431) - Fix source staleness validation.
- [10419](https://github.com/vegaprotocol/vega/issues/10419) - Block explorer database migration is slow.
- [10470](https://github.com/vegaprotocol/vega/issues/10470) - Mark non-optional parameters as required and update documentation strings.

## 0.73.0

Expand Down
3 changes: 3 additions & 0 deletions datanode/api/trading_data_v2.go
Original file line number Diff line number Diff line change
Expand Up @@ -3227,6 +3227,9 @@ func (t *TradingDataServiceV2) EstimatePosition(ctx context.Context, req *v2.Est

dMarginFactor := num.DecimalZero()
if req.MarginMode == types.MarginModeIsolatedMargin {
if req.MarginFactor == nil {
return nil, formatE(ErrMissingMarginFactor, errors.New("margin factor are required with isolated margin"))
}
dMarginFactor, err = num.DecimalFromString(*req.MarginFactor)
if err != nil {
return nil, formatE(ErrMissingMarginFactor, err)
Expand Down
Loading

0 comments on commit 762bbe2

Please sign in to comment.