Skip to content

Commit

Permalink
encoded bounty tilte
Browse files Browse the repository at this point in the history
  • Loading branch information
elraphty committed Nov 6, 2024
1 parent f57ac7a commit a3f9975
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions handlers/bounty.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"io"
"log"
"net/http"
"net/url"
"strconv"
"sync"
"time"
Expand Down Expand Up @@ -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
Expand All @@ -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)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit a3f9975

Please sign in to comment.