diff --git a/.github/workflows/govulncheck.yml b/.github/workflows/govulncheck.yml index d02d78055b..b40d1d78d2 100644 --- a/.github/workflows/govulncheck.yml +++ b/.github/workflows/govulncheck.yml @@ -22,7 +22,7 @@ jobs: FILES: | go.mod go.sum - - uses: golang/govulncheck-action@v1.0.2 + - uses: golang/govulncheck-action@v1.0.3 id: govulncheck if: env.GIT_DIFF with: diff --git a/.github/workflows/release-umee.yml b/.github/workflows/release-umee.yml index a6e35f04d5..6acd409bcb 100644 --- a/.github/workflows/release-umee.yml +++ b/.github/workflows/release-umee.yml @@ -35,7 +35,7 @@ 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 @@ -43,7 +43,7 @@ jobs: 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 diff --git a/x/auction/keeper/rewards.go b/x/auction/keeper/rewards.go index 1ce4914c1b..6e7c8086c7 100644 --- a/x/auction/keeper/rewards.go +++ b/x/auction/keeper/rewards.go @@ -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)