Skip to content

Commit

Permalink
update transactions delete api
Browse files Browse the repository at this point in the history
  • Loading branch information
charymalloju committed Nov 11, 2024
1 parent 7422df3 commit f83ed49
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions server/handler/transactions.go
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,14 @@ func (h *Handler) DeleteTransaction(c echo.Context) error {
})
}

_, err = h.DB.Exec("UPDATE transactions SET signatures='[]'::jsonb WHERE multisig_address=$1", address)
if err != nil {
return c.JSON(http.StatusBadRequest, model.ErrorResponse{
Status: "error",
Message: err.Error(),
})
}

return c.JSON(http.StatusOK, model.SuccessResponse{
Status: "transaction deleted",
})
Expand Down

0 comments on commit f83ed49

Please sign in to comment.