diff --git a/handlers/bounty.go b/handlers/bounty.go index d4d269d79..43e38ed80 100644 --- a/handlers/bounty.go +++ b/handlers/bounty.go @@ -7,6 +7,7 @@ import ( "io" "log" "net/http" + "net/url" "strconv" "sync" "time" @@ -612,7 +613,8 @@ func (h *bountyHandler) MakeBountyPayment(w http.ResponseWriter, r *http.Request // Get Bounty Assignee assignee := h.db.GetPersonByPubkey(bounty.Assignee) - memoText := fmt.Sprintf("Payment For: %ss", bounty.Title) + memoData := fmt.Sprintf("Payment For: %ss", bounty.Title) + memoText := url.QueryEscape(memoData) now := time.Now() // If the v2contactkey is present @@ -625,7 +627,7 @@ func (h *bountyHandler) MakeBountyPayment(w http.ResponseWriter, r *http.Request bodyData := utils.BuildV2KeysendBodyData(amount, assignee.OwnerPubKey, assignee.OwnerRouteHint, memoText) jsonBody := []byte(bodyData) - fmt.Println("Payment Body Data", bodyData) + log.Println("Payment Body Data", bodyData) req, _ := http.NewRequest(http.MethodPost, url, bytes.NewBuffer(jsonBody)) req.Header.Set("x-admin-token", config.V2BotToken) @@ -800,7 +802,7 @@ func (h *bountyHandler) MakeBountyPayment(w http.ResponseWriter, r *http.Request bodyData := utils.BuildKeysendBodyData(amount, assignee.OwnerPubKey, assignee.OwnerRouteHint, memoText) jsonBody := []byte(bodyData) - fmt.Println("Payment Body Data", bodyData) + log.Println("Payment Body Data", bodyData) req, _ := http.NewRequest(http.MethodPost, url, bytes.NewBuffer(jsonBody)) req.Header.Set("x-user-token", config.RelayAuthKey)