Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
golangisfun123 committed Nov 7, 2024
1 parent f6c9020 commit 1fbfbfa
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions contrib/opbot/botmd/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ func (b *Bot) rfqLookupCommand() *slacker.CommandDefinition {
func (b *Bot) rfqRefund() *slacker.CommandDefinition {
return &slacker.CommandDefinition{
Command: "refund <tx>",
Description: "TESTING TESTING a quote request",
Description: "refund a quote request",
Examples: []string{"refund 0x1234"},
Handler: func(ctx *slacker.CommandContext) {
tx := stripLinks(ctx.Request().Param("tx"))
Expand Down Expand Up @@ -313,6 +313,7 @@ func (b *Bot) rfqRefund() *slacker.CommandDefinition {
return
}

//nolint: gosec
_, err = ctx.Response().Reply(fmt.Sprintf("refund submitted: %s", toTXSlackLink(status.TxHash().String(), uint32(rawRequest.Bridge.OriginChainID))))

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

View check run for this annotation

Codecov / codecov/patch

contrib/opbot/botmd/commands.go#L317

Added line #L317 was not covered by tests
if err != nil {
log.Println(err)
Expand All @@ -332,11 +333,12 @@ func (b *Bot) makeFastBridge(ctx context.Context, req *internal.GetRFQByTxIDResp
return nil, fmt.Errorf("error fetching rfq contracts: %w", err)
}

chainClient, err := b.rpcClient.GetChainClient(ctx, int(req.Bridge.OriginChainID))
chainClient, err := b.rpcClient.GetChainClient(ctx, req.Bridge.OriginChainID)

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

View check run for this annotation

Codecov / codecov/patch

contrib/opbot/botmd/commands.go#L336

Added line #L336 was not covered by tests
if err != nil {
return nil, fmt.Errorf("error getting chain client: %w", err)
}

//nolint: gosec
contractAddress, ok := contracts.Contracts[uint32(req.Bridge.OriginChainID)]

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

View check run for this annotation

Codecov / codecov/patch

contrib/opbot/botmd/commands.go#L342

Added line #L342 was not covered by tests
if !ok {
return nil, errors.New("contract address not found")
Expand Down

0 comments on commit 1fbfbfa

Please sign in to comment.