Skip to content

Commit

Permalink
[goreleaser]
Browse files Browse the repository at this point in the history
  • Loading branch information
golangisfun123 committed Nov 4, 2024
1 parent 077bc51 commit 134cbf5
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
12 changes: 10 additions & 2 deletions contrib/opbot/botmd/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (
"github.com/slack-go/slack"
"github.com/slack-io/slacker"
"github.com/synapsecns/sanguine/contrib/opbot/signoz"
"github.com/synapsecns/sanguine/core"
"github.com/synapsecns/sanguine/core/retry"
"github.com/synapsecns/sanguine/ethergo/chaindata"
"github.com/synapsecns/sanguine/ethergo/client"
Expand Down Expand Up @@ -343,8 +344,15 @@ func (b *Bot) rfqRefund() *slacker.CommandDefinition {
}
return

Check warning on line 345 in contrib/opbot/botmd/commands.go

View check run for this annotation

Codecov / codecov/patch

contrib/opbot/botmd/commands.go#L339-L345

Added lines #L339 - L345 were not covered by tests
}

isRelayed, err := fastBridgeContractDest.BridgeRelays(nil, [32]byte(common.Hex2Bytes(rawRequest.TxID)))
txBz, err := core.BytesToArray(common.Hex2Bytes(rawRequest.TxID))
if err != nil {
_, err := ctx.Response().Reply("error converting tx id")
if err != nil {
log.Println(err)
}
return

Check warning on line 353 in contrib/opbot/botmd/commands.go

View check run for this annotation

Codecov / codecov/patch

contrib/opbot/botmd/commands.go#L347-L353

Added lines #L347 - L353 were not covered by tests
}
isRelayed, err := fastBridgeContractDest.BridgeRelays(nil, txBz)
if err != nil {
_, err := ctx.Response().Reply("error fetching bridge relays")
if err != nil {
Expand Down
8 changes: 8 additions & 0 deletions core/bytes.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,11 @@ func BytesToJSONString(bz []byte) (string, error) {

return string(formattedJSON), nil
}
func BytesToArray(bz []byte) ([32]byte, error) {

Check failure on line 28 in core/bytes.go

View workflow job for this annotation

GitHub Actions / Lint (core)

exported: exported function BytesToArray should have comment or be unexported (revive)
var bytes [32]byte
if len(bz) != 32 {
return bytes, fmt.Errorf("invalid length of bytes: %d", len(bz))
}
copy(bytes[:], bz)
return bytes, nil

Check warning on line 34 in core/bytes.go

View check run for this annotation

Codecov / codecov/patch

core/bytes.go#L28-L34

Added lines #L28 - L34 were not covered by tests
}

0 comments on commit 134cbf5

Please sign in to comment.