diff --git a/handlers/bounty.go b/handlers/bounty.go index 19c007540..8857ce9e6 100644 --- a/handlers/bounty.go +++ b/handlers/bounty.go @@ -6,7 +6,6 @@ import ( "fmt" "io" "log" - "math/rand" "net/http" "net/url" "os" @@ -15,6 +14,7 @@ import ( "time" "github.com/google/uuid" + "github.com/rs/xid" "github.com/go-chi/chi" "github.com/stakwork/sphinx-tribes/auth" @@ -626,8 +626,9 @@ func (h *bountyHandler) CreateOrEditBounty(w http.ResponseWriter, r *http.Reques } func generateUnlockCode() string { - rand.Seed(time.Now().UnixNano()) - return fmt.Sprintf("%06d", rand.Intn(1000000)) + // rand.Seed(time.Now().UnixNano()) + // return fmt.Sprintf("%06d", rand.Intn(1000000)) + return xid.New().String() } // DeleteBounty godoc