Skip to content

Commit

Permalink
Merge branch 'hotfix/v0.9.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
blewater committed Dec 9, 2020
1 parent b8499a7 commit 7407879
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions x/market/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -532,9 +532,6 @@ func (k Keeper) GetInstruments(ctx sdk.Context) (instrs []types.MarketData) {
// includes synthetic pairs, last order timestamp and calculates the best price
// for the pair.
func (k Keeper) GetAllInstruments(ctx sdk.Context) []*types.MarketData {
// Two decimals
const decimalsToTruncate = 100

coins := k.sk.GetSupply(ctx).GetTotal().Sort()
n := len(coins)
// n instruments producing n*(n-1) pairs below
Expand All @@ -558,11 +555,7 @@ func (k Keeper) GetAllInstruments(ctx sdk.Context) []*types.MarketData {
// fill in best price
bestPlan := k.createExecutionPlan(ctx, destination, source)
if !bestPlan.DestinationCapacity().IsZero() {
truncated := bestPlan.Price.
MulInt64(decimalsToTruncate).
TruncateDec().
QuoInt64(decimalsToTruncate)
instrLst[idx].BestPrice = &truncated
instrLst[idx].BestPrice = &bestPlan.Price
}

// fill in last order price, timestamp
Expand Down

0 comments on commit 7407879

Please sign in to comment.