Skip to content

Commit

Permalink
chore: fix merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
technicallyty committed Apr 25, 2022
1 parent 72d20b3 commit 9d648bf
Show file tree
Hide file tree
Showing 6 changed files with 170 additions and 171 deletions.
8 changes: 4 additions & 4 deletions x/ecocredit/server/marketplace/buy_direct.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ func (k Keeper) BuyDirect(ctx context.Context, req *marketplace.MsgBuyDirect) (*

// fill the order, updating balances and the sell order in state
if err = k.fillOrder(ctx, sellOrder, buyerAcc, creditOrderQty, coinCost, orderOptions{
autoRetire: !order.DisableAutoRetire,
canPartialFill: false,
batchDenom: batch.Denom,
retirementLocation: order.RetirementJurisdiction,
autoRetire: !order.DisableAutoRetire,
canPartialFill: false,
batchDenom: batch.Denom,
jurisdiction: order.RetirementJurisdiction,
}); err != nil {
return nil, fmt.Errorf("error filling order: %w", err)
}
Expand Down
4 changes: 2 additions & 2 deletions x/ecocredit/server/marketplace/buy_direct_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ func TestBuy_Decimal(t *testing.T) {
}

func buyDirect(s *baseSuite, buyer string, sellOrderId uint64, qty string, pricePerCredit *sdk.Coin, disableAutoRetire bool,
retirementLocation string) (*marketplace.MsgBuyDirectResponse, error) {
jurisdiction string) (*marketplace.MsgBuyDirectResponse, error) {
return s.k.BuyDirect(s.ctx, &marketplace.MsgBuyDirect{
Buyer: buyer,
Orders: []*marketplace.MsgBuyDirect_Order{
Expand All @@ -240,7 +240,7 @@ func buyDirect(s *baseSuite, buyer string, sellOrderId uint64, qty string, price
Quantity: qty,
BidPrice: pricePerCredit,
DisableAutoRetire: disableAutoRetire,
RetirementJurisdiction: retirementLocation,
RetirementJurisdiction: jurisdiction,
},
},
})
Expand Down
10 changes: 5 additions & 5 deletions x/ecocredit/server/marketplace/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ func isDenomAllowed(ctx sdk.Context, denom string, pk ecocredit.ParamKeeper) boo
}

type orderOptions struct {
autoRetire bool
canPartialFill bool
batchDenom string
retirementLocation string
autoRetire bool
canPartialFill bool
batchDenom string
jurisdiction string
}

// fillOrder moves credits and coins according to the order. It will:
Expand Down Expand Up @@ -163,7 +163,7 @@ func (k Keeper) fillOrder(ctx context.Context, sellOrder *api.SellOrder, buyerAc
Retirer: buyerAcc.String(),
BatchDenom: opts.batchDenom,
Amount: purchaseQty.String(),
Jurisdiction: opts.retirementLocation,
Jurisdiction: opts.jurisdiction,
}); err != nil {
return err
}
Expand Down
1 change: 0 additions & 1 deletion x/ecocredit/server/testsuite/query.go

This file was deleted.

Loading

0 comments on commit 9d648bf

Please sign in to comment.