From a20a73a8d81a3d2b7b13b7d90e923737199ed840 Mon Sep 17 00:00:00 2001 From: Antonio Navarro Perez Date: Thu, 7 Jul 2022 18:44:35 +0200 Subject: [PATCH] Use IDFromBytes --- client/putipns.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/putipns.go b/client/putipns.go index f0a5064..2e2aaff 100644 --- a/client/putipns.go +++ b/client/putipns.go @@ -9,7 +9,7 @@ import ( ) func (fp *Client) PutIPNS(ctx context.Context, id []byte, record []byte) error { - _, err := peer.IDFromString(string(id)) + _, err := peer.IDFromBytes(id) if err != nil { return errors.Wrap(err, "invalid peer ID") } @@ -26,7 +26,7 @@ type PutIPNSAsyncResult struct { } func (fp *Client) PutIPNSAsync(ctx context.Context, id []byte, record []byte) (<-chan PutIPNSAsyncResult, error) { - _, err := peer.IDFromString(string(id)) + _, err := peer.IDFromBytes(id) if err != nil { return nil, errors.Wrap(err, "invalid peer ID") }