mirror of
https://github.com/nbd-wtf/go-nostr.git
synced 2025-05-28 12:19:50 +02:00
small things.
This commit is contained in:
parent
0d5daf66bf
commit
b48d2249b9
@ -39,7 +39,7 @@ func ValidateAuthEvent(event *nostr.Event, challenge string, relayURL string) (p
|
||||
return "", false
|
||||
}
|
||||
|
||||
if event.Tags.GetFirst([]string{"challenge", challenge}) == nil {
|
||||
if event.Tags.FindWithValue("challenge", challenge) == nil {
|
||||
return "", false
|
||||
}
|
||||
|
||||
|
@ -104,7 +104,7 @@ func Decrypt(b64ciphertextWrapped string, conversationKey [32]byte) (string, err
|
||||
|
||||
decoded, err := base64.StdEncoding.DecodeString(b64ciphertextWrapped)
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("invalid base64")
|
||||
return "", fmt.Errorf("invalid base64: %w", err)
|
||||
}
|
||||
|
||||
if decoded[0] != version {
|
||||
|
@ -142,11 +142,11 @@ func loadWallet(
|
||||
for ie := range deletions {
|
||||
w.Lock()
|
||||
if !eosed {
|
||||
for _, tag := range ie.Event.Tags.All([]string{"e", ""}) {
|
||||
for tag := range ie.Event.Tags.FindAll("e") {
|
||||
w.pendingDeletions = append(w.pendingDeletions, tag[1])
|
||||
}
|
||||
} else {
|
||||
for _, tag := range ie.Event.Tags.All([]string{"e", ""}) {
|
||||
for tag := range ie.Event.Tags.FindAll("e") {
|
||||
w.removeDeletedToken(tag[1])
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user