Update nostr gem, switch to Ruby for bech32 encoding
This commit is contained in:
@@ -205,4 +205,14 @@ RSpec.describe User, type: :model do
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe "#nostr_pubkey_bech32" do
|
||||
before do
|
||||
user.update! nostr_pubkey: "07e188a1ff87ce171d517b8ed2bb7a31b1d3453a0db3b15379ec07b724d232f3"
|
||||
end
|
||||
|
||||
it "encodes the hexadecimal pubkey to bech32" do
|
||||
expect(user.nostr_pubkey_bech32).to eq("npub1qlsc3g0lsl8pw8230w8d9wm6xxcax3f6pkemz5measrmwfxjxteslf2hac")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user