Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouop0 committed Jun 19, 2024
1 parent 2af31be commit 5ce61c4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/handler/disputeGame.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package handler
import (
"encoding/hex"
"fmt"

Check failure on line 5 in internal/handler/disputeGame.go

View workflow job for this annotation

GitHub Actions / Run golangci-lint

File is not `gofumpt`-ed (gofumpt)
"github.com/optimism-java/dispute-explorer/pkg/log"
"math/big"

Check failure on line 7 in internal/handler/disputeGame.go

View workflow job for this annotation

GitHub Actions / Run golangci-lint

File is not `gofumpt`-ed (gofumpt)

"github.com/ethereum/go-ethereum/accounts/abi/bind"
Expand Down Expand Up @@ -46,13 +47,14 @@ func filterAddAndRemove(ctx *svc.ServiceContext, evt *schema.SyncEvent) error {
return fmt.Errorf("[FilterDisputeContractAndAdd] event data to DisputeGameResolved err: %s", err)
}
var game schema.DisputeGame
err = ctx.DB.Where(" contract_address = ? ", evt.ContractAddress).First(&game).Error
err = ctx.DB.Where(" game_address = ? ", evt.ContractAddress).First(&game).Error
if err != nil {
return fmt.Errorf("[FilterDisputeContractAndAdd] resolved event find game err: %s", err)
}
game.Status = disputeResolved.Status
ctx.DB.Save(game)
blockchain.RemoveContract(evt.ContractAddress)
log.Infof("resolve event remove %s", evt.ContractAddress)
}
disputeGameMove := event.DisputeGameMove{}
if evt.EventName == disputeGameMove.Name() && evt.EventHash == disputeGameMove.EventHash().String() {
Expand Down

0 comments on commit 5ce61c4

Please sign in to comment.