use xhex everywhere.
This commit is contained in:
@@ -2,7 +2,6 @@ package blossom
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/hex"
|
||||
"fmt"
|
||||
|
||||
"fiatjaf.com/nostr"
|
||||
@@ -16,7 +15,7 @@ func (c *Client) List(ctx context.Context) ([]BlobDescriptor, error) {
|
||||
}
|
||||
|
||||
bds := make([]BlobDescriptor, 0, 100)
|
||||
err = c.httpCall(ctx, "GET", "list/"+hex.EncodeToString(pubkey[:]), "", func() string {
|
||||
err = c.httpCall(ctx, "GET", "list/"+nostr.HexEncodeToString(pubkey[:]), "", func() string {
|
||||
return c.authorizationHeader(ctx, func(evt *nostr.Event) {
|
||||
evt.Tags = append(evt.Tags, nostr.Tag{"t", "list"})
|
||||
})
|
||||
|
||||
@@ -3,7 +3,6 @@ package blossom
|
||||
import (
|
||||
"context"
|
||||
"crypto/sha256"
|
||||
"encoding/hex"
|
||||
"fmt"
|
||||
"io"
|
||||
"mime"
|
||||
@@ -47,7 +46,7 @@ func (c *Client) UploadBlob(ctx context.Context, file io.ReadSeeker, contentType
|
||||
err = c.httpCall(ctx, "PUT", "upload", contentType, func() string {
|
||||
return c.authorizationHeader(ctx, func(evt *nostr.Event) {
|
||||
evt.Tags = append(evt.Tags, nostr.Tag{"t", "upload"})
|
||||
evt.Tags = append(evt.Tags, nostr.Tag{"x", hex.EncodeToString(hash[:])})
|
||||
evt.Tags = append(evt.Tags, nostr.Tag{"x", nostr.HexEncodeToString(hash[:])})
|
||||
})
|
||||
}, file, size, &bd)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user