Skip to content

Commit

Permalink
Merge pull request #11194 from vegaprotocol/fix_liquidation_strat
Browse files Browse the repository at this point in the history
fix: loading of liquidation strategy from proto with missing data
  • Loading branch information
jeremyletang authored Apr 25, 2024
2 parents ed8d9d5 + 886be1c commit 02c713b
Show file tree
Hide file tree
Showing 3 changed files with 21,696 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
- [11159](https://github.com/vegaprotocol/vega/issues/11159) - Reject stop orders with size override position for spot product.
- [11161](https://github.com/vegaprotocol/vega/issues/11161) - Add validation for time in force GFA in stop order submission.
- [11177](https://github.com/vegaprotocol/vega/issues/11177) - Adjust the formulas for reduced position to the spec update and fix handling of closed out position.
- [11193](https://github.com/vegaprotocol/vega/issues/11193) - Fix loading of liquidation strategy from proto with missing data.

## 0.75.0

Expand Down
3 changes: 3 additions & 0 deletions core/types/liquidation.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ func LiquidationStrategyFromProto(p *vegapb.LiquidationStrategy) (*LiquidationSt
if err != nil {
return nil, err
}
if p.DisposalSlippageRange == "" {
p.DisposalSlippageRange = "0"
}
slippage, err := num.DecimalFromString(p.DisposalSlippageRange)
if err != nil {
return nil, err
Expand Down
Loading

0 comments on commit 02c713b

Please sign in to comment.