Skip to content

Commit

Permalink
Merge branch 'main' into robert/v6.5-testing
Browse files Browse the repository at this point in the history
  • Loading branch information
robert-zaremba committed Jun 6, 2024
2 parents 4e7a578 + d9a8202 commit 221e817
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/govulncheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
FILES: |
go.mod
go.sum
- uses: golang/[email protected].2
- uses: golang/[email protected].3
id: govulncheck
if: env.GIT_DIFF
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-umee.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ jobs:
make proto-update-swagger-docs
- name: goreleaser test-build
uses: goreleaser/goreleaser-action@v5
uses: goreleaser/goreleaser-action@v6
if: github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'Enable:ReleaseBuild')
with:
version: latest
args: build --rm-dist --skip-validate # skip validate skips initial sanity checks in order to be able to fully run
env:
TM_VERSION: ${{ env.TM_VERSION }}
- name: Release
uses: goreleaser/goreleaser-action@v5
uses: goreleaser/goreleaser-action@v6
if: startsWith(github.ref, 'refs/tags/')
with:
version: latest
Expand Down
25 changes: 13 additions & 12 deletions x/auction/keeper/rewards.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,20 +82,21 @@ func (k Keeper) rewardsBid(msg *auction.MsgRewardsBid) error {
sender, err := sdk.AccAddressFromBech32(msg.Sender)
util.Panic(err)

if !bytes.Equal(sender, lastBid.Bidder) {
returned := coin.UmeeInt(lastBid.Amount)
if err = k.sendFromModule(lastBid.Bidder, returned); err != nil {
return err
}
if err = k.sendToModule(sender, msg.Amount); err != nil {
return err
}
} else {
diff := msg.Amount.SubAmount(lastBid.Amount)
if err = k.sendToModule(sender, diff); err != nil {
return err
toAuction := msg.Amount
if lastBid != nil {
if bytes.Equal(sender, lastBid.Bidder) {
// bidder updates his last bid: send only diff
toAuction = msg.Amount.SubAmount(lastBid.Amount)
} else {
returned := coin.UmeeInt(lastBid.Amount)
if err = k.sendFromModule(lastBid.Bidder, returned); err != nil {
return err
}
}
}
if err = k.sendToModule(sender, toAuction); err != nil {
return err
}

bid := auction.Bid{Bidder: sender, Amount: msg.Amount.Amount}
return store.SetValue(k.store, key, &bid, keyMsg)
Expand Down

0 comments on commit 221e817

Please sign in to comment.