nip46: reword invalid pubkey hex messages.
This commit is contained in:
@@ -163,7 +163,7 @@ func (p *DynamicSigner) HandleRequest(ctx context.Context, event nostr.Event) (
|
||||
}
|
||||
thirdPartyPubkey, err := nostr.PubKeyFromHex(req.Params[0])
|
||||
if err != nil {
|
||||
resultErr = fmt.Errorf("first argument to 'nip44_encrypt' is not a valid pubkey string")
|
||||
resultErr = fmt.Errorf("first argument to 'nip44_encrypt' is not a valid pubkey hex")
|
||||
break
|
||||
}
|
||||
if p.AuthorizeEncryption != nil && !p.AuthorizeEncryption(ctx, event.PubKey) {
|
||||
@@ -185,7 +185,7 @@ func (p *DynamicSigner) HandleRequest(ctx context.Context, event nostr.Event) (
|
||||
}
|
||||
thirdPartyPubkey, err := nostr.PubKeyFromHex(req.Params[0])
|
||||
if err != nil {
|
||||
resultErr = fmt.Errorf("first argument to 'nip04_decrypt' is not a valid pubkey string")
|
||||
resultErr = fmt.Errorf("first argument to 'nip04_decrypt' is not a valid pubkey hex")
|
||||
break
|
||||
}
|
||||
if p.AuthorizeEncryption != nil && !p.AuthorizeEncryption(ctx, event.PubKey) {
|
||||
|
||||
@@ -117,7 +117,7 @@ func (p *StaticKeySigner) HandleRequest(_ context.Context, event nostr.Event) (
|
||||
}
|
||||
thirdPartyPubkey, err := nostr.PubKeyFromHex(req.Params[0])
|
||||
if err != nil {
|
||||
resultErr = fmt.Errorf("first argument to 'nip04_encrypt' is not a valid pubkey string")
|
||||
resultErr = fmt.Errorf("first argument to 'nip04_encrypt' is not a valid pubkey hex")
|
||||
break
|
||||
}
|
||||
plaintext := req.Params[1]
|
||||
@@ -140,7 +140,7 @@ func (p *StaticKeySigner) HandleRequest(_ context.Context, event nostr.Event) (
|
||||
}
|
||||
thirdPartyPubkey, err := nostr.PubKeyFromHex(req.Params[0])
|
||||
if err != nil {
|
||||
resultErr = fmt.Errorf("first argument to 'nip04_decrypt' is not a valid pubkey string")
|
||||
resultErr = fmt.Errorf("first argument to 'nip04_decrypt' is not a valid pubkey hex")
|
||||
break
|
||||
}
|
||||
ciphertext := req.Params[1]
|
||||
@@ -163,7 +163,7 @@ func (p *StaticKeySigner) HandleRequest(_ context.Context, event nostr.Event) (
|
||||
}
|
||||
thirdPartyPubkey, err := nostr.PubKeyFromHex(req.Params[0])
|
||||
if err != nil {
|
||||
resultErr = fmt.Errorf("first argument to 'nip04_encrypt' is not a valid pubkey string")
|
||||
resultErr = fmt.Errorf("first argument to 'nip04_encrypt' is not a valid pubkey hex")
|
||||
break
|
||||
}
|
||||
plaintext := req.Params[1]
|
||||
@@ -186,7 +186,7 @@ func (p *StaticKeySigner) HandleRequest(_ context.Context, event nostr.Event) (
|
||||
}
|
||||
thirdPartyPubkey, err := nostr.PubKeyFromHex(req.Params[0])
|
||||
if err != nil {
|
||||
resultErr = fmt.Errorf("first argument to 'nip04_decrypt' is not a valid pubkey string")
|
||||
resultErr = fmt.Errorf("first argument to 'nip04_decrypt' is not a valid pubkey hex")
|
||||
break
|
||||
}
|
||||
ciphertext := req.Params[1]
|
||||
|
||||
Reference in New Issue
Block a user