fix one nip19 test bug.

This commit is contained in:
fiatjaf
2025-07-10 23:01:36 -03:00
parent 7289da9c72
commit dcd505712a

View File

@@ -18,8 +18,7 @@ func TestEncodeNsec(t *testing.T) {
skh := "3bf0c63fcb93463407af97a5e5ee64fa883d107ef9e558472c4eb9aaaefa459d" skh := "3bf0c63fcb93463407af97a5e5ee64fa883d107ef9e558472c4eb9aaaefa459d"
var sk [32]byte var sk [32]byte
hex.Decode(sk[:], []byte(skh)) hex.Decode(sk[:], []byte(skh))
nsec, err := EncodeNsec(sk) nsec := EncodeNsec(sk)
assert.NoError(t, err)
assert.Equal(t, "nsec180cvv07tjdrrgpa0j7j7tmnyl2yr6yr7l8j4s3evf6u64th6gkwsgyumg0", nsec, "produced an unexpected nsec string") assert.Equal(t, "nsec180cvv07tjdrrgpa0j7j7tmnyl2yr6yr7l8j4s3evf6u64th6gkwsgyumg0", nsec, "produced an unexpected nsec string")
} }