Skip to content

Commit

Permalink
add rfq [goreleaser]
Browse files Browse the repository at this point in the history
  • Loading branch information
trajan0x committed Jul 5, 2024
1 parent 97b4106 commit 7a71c2d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions contrib/opbot/botmd/botmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ type Bot struct {
}

// NewBot creates a new bot server.
func NewBot(handler metrics.Handler, cfg config.Config) Bot {
func NewBot(handler metrics.Handler, cfg config.Config) *Bot {

Check warning on line 32 in contrib/opbot/botmd/botmd.go

View check run for this annotation

Codecov / codecov/patch

contrib/opbot/botmd/botmd.go#L32

Added line #L32 was not covered by tests
server := slacker.NewClient(cfg.SlackBotToken, cfg.SlackAppToken)
bot := Bot{
handler: handler,
Expand All @@ -48,7 +48,7 @@ func NewBot(handler metrics.Handler, cfg config.Config) Bot {
bot.addMiddleware(bot.tracingMiddleware(), bot.metricsMiddleware())
bot.addCommands(bot.traceCommand(), bot.rfqLookupCommand(), bot.rfqRefund())

Check warning on line 49 in contrib/opbot/botmd/botmd.go

View check run for this annotation

Codecov / codecov/patch

contrib/opbot/botmd/botmd.go#L49

Added line #L49 was not covered by tests

return bot
return &bot

Check warning on line 51 in contrib/opbot/botmd/botmd.go

View check run for this annotation

Codecov / codecov/patch

contrib/opbot/botmd/botmd.go#L51

Added line #L51 was not covered by tests
}

func (b *Bot) addMiddleware(middlewares ...slacker.CommandMiddlewareHandler) {
Expand Down
2 changes: 1 addition & 1 deletion services/rfq/api/rest/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ const (
QuoteRoute = "/quotes"
// AckRoute is the API endpoint for handling relay ack related requests.
AckRoute = "/ack"
// ContractsRoute is the API endpoint for returning a list fo contracts
// ContractsRoute is the API endpoint for returning a list fo contracts.
ContractsRoute = "/contracts"
cacheInterval = time.Minute
)
Expand Down
2 changes: 1 addition & 1 deletion services/rfq/relayer/relapi/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ func (h *Handler) GetTxRetry(c *gin.Context) {
c.JSON(http.StatusOK, resp)
}

// GetQuoteRequestByTxID gets the quote request by tx id.
func (h *Handler) GetQuoteRequestByTxID(c *gin.Context) {
txIDStr := c.Query("id")
if txIDStr == "" {
Expand All @@ -167,7 +168,6 @@ func (h *Handler) GetQuoteRequestByTxID(c *gin.Context) {
QuoteRequestRaw: common.Bytes2Hex(quoteRequest.RawRequest),
}
c.JSON(http.StatusOK, resp)

}

// Withdraw withdraws tokens from the relayer.
Expand Down

0 comments on commit 7a71c2d

Please sign in to comment.