Skip to content

Commit

Permalink
add conditin to delete api
Browse files Browse the repository at this point in the history
  • Loading branch information
charymalloju committed Nov 11, 2024
1 parent f83ed49 commit 43dc0dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/handler/transactions.go
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ func (h *Handler) DeleteTransaction(c echo.Context) error {
})
}

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

0 comments on commit 43dc0dc

Please sign in to comment.