Update nostr gem, switch to Ruby for bech32 encoding
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing

This commit is contained in:
2024-01-15 12:37:41 +03:00
parent 1a5a2177b4
commit b4f0c60ea0
9 changed files with 32 additions and 22 deletions

View File

@@ -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