fix: convert the stored hex key to bytes before nip44 getConversationKey
nostr-tools 2.23 (noble-curves v2) no longer accepts hex strings, so every nip44.encrypt/decrypt failed with "expected Uint8Array, got type=string". Adds nip44 tests.
This commit is contained in:
@@ -38,7 +38,7 @@ function getSharedSecret(sk, peer) {
|
||||
let key = secretsCache.get(peer)
|
||||
|
||||
if (!key) {
|
||||
key = nip44.v2.utils.getConversationKey(sk, peer)
|
||||
key = nip44.v2.utils.getConversationKey(hexToBytes(sk), peer)
|
||||
secretsCache.set(peer, key)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user