Merge remote-tracking branch 'brugeman/fix/nip46-main'
This commit is contained in:
@ -85,6 +85,9 @@ export default function useLoginHandler() {
|
||||
}
|
||||
} else if (key.startsWith("bunker://")) {
|
||||
const nip46 = new Nip46Signer(key);
|
||||
nip46.on("oauth", url => {
|
||||
window.open(url, CONFIG.appNameCapitalized, "width=600,height=800,popup=yes");
|
||||
});
|
||||
await nip46.init();
|
||||
|
||||
const loginPubkey = await nip46.getPubKey();
|
||||
|
@ -247,6 +247,9 @@ export function createPublisher(l: LoginSession) {
|
||||
const relayArgs = (l.remoteSignerRelays ?? []).map(a => `relay=${encodeURIComponent(a)}`);
|
||||
const inner = new PrivateKeySigner(unwrap(l.privateKeyData as KeyStorage).value);
|
||||
const nip46 = new Nip46Signer(`bunker://${unwrap(l.publicKey)}?${[...relayArgs].join("&")}`, inner);
|
||||
nip46.on("oauth", url => {
|
||||
window.open(url, CONFIG.appNameCapitalized, "width=600,height=800,popup=yes");
|
||||
});
|
||||
return new EventPublisher(nip46, unwrap(l.publicKey));
|
||||
}
|
||||
case LoginSessionType.Nip7os: {
|
||||
|
Reference in New Issue
Block a user