Skip to content

Commit

Permalink
chore: fix linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
b00f committed Jan 2, 2025
1 parent 2f78b5c commit fe1d43b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions internal/engine/command/zealy/claim.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import (
"github.com/pagu-project/pagu/pkg/log"
)

func (c *ZealyCmd) claimHandler(caller *entity.User,
func (z *ZealyCmd) claimHandler(caller *entity.User,
cmd *command.Command, args map[string]string,
) command.CommandResult {
user, err := c.db.GetZealyUser(caller.PlatformUserID)
user, err := z.db.GetZealyUser(caller.PlatformUserID)
if err != nil {
return cmd.ErrorResult(err)
}
Expand All @@ -22,15 +22,15 @@ func (c *ZealyCmd) claimHandler(caller *entity.User,
}

address := args["address"]
txHash, err := c.wallet.TransferTransaction(address, "Pagu Zealy reward distribution", user.Amount)
txHash, err := z.wallet.TransferTransaction(address, "Pagu Zealy reward distribution", user.Amount)
if err != nil {
log.Error("error in transfer zealy reward", "err", err)
transferErr := fmt.Errorf("failed to transfer zealy reward. Please make sure the address is valid")

return cmd.ErrorResult(transferErr)
}

if err = c.db.UpdateZealyUser(caller.PlatformUserID, txHash); err != nil {
if err = z.db.UpdateZealyUser(caller.PlatformUserID, txHash); err != nil {
return cmd.ErrorResult(err)
}

Expand Down

0 comments on commit fe1d43b

Please sign in to comment.