I figured out a hack to be able to zap with any lightning wallet you want in the primal web app. Open up the dev console and paste this code:

window.webln.sendPayment = (invoice) => Promise.resolve(console.log(invoice))

Then whenever you click the zap button it prints the lightning invoice for the zap in the dev console instead of opening Alby. Copy and paste the invoice into whatever lightning wallet you want.

You can even save it as a JavaScript bookmarklet. Use this as the URL:

javascript:(function(){window.webln.sendPayment=(invoice)=>Promise.resolve(console.log(invoice))})();

Reply to this note

Please Login to reply.

Discussion

This is peak nostr UX

They’re taking forever just to display a QR code so we can zap with other wallets. I got tired of waiting and was too lazy to make a chrome extension. 😂

Yo check this out. I took it to the next level. I got it to display the zap invoice as QR code in a modal 😂.

https://gist.github.com/SamSamskies/e778e2d7e99bf4cc25c8281e29ed01d7

Here’s the updated bookmarklet

javascript:(function(){window.webln.sendPayment=(invoice)=>fetch(`https://api.qrserver.com/v1/create-qr-code/?data=$%7Binvoice%7D&size=400x400&margin=15%60).then(response=%3Eresponse.blob()).then(blob=%3E%7Bconst qrCodeUrl=URL.createObjectURL(blob);const modal=document.createElement('div');modal.style.position='fixed';modal.style.top='0';modal.style.left='0';modal.style.width='100%';modal.style.height='100%';modal.style.background='rgba(0, 0, 0, 0.5)';modal.style.display='flex';modal.style.justifyContent='center';modal.style.alignItems='center';const img=document.createElement('img');img.src=qrCodeUrl;img.style.width='400px';img.style.height='400px';modal.appendChild(img);document.body.appendChild(modal);modal.onclick=()=>{modal.remove();};});})();

I made a gist since that didn’t render correctly https://gist.github.com/SamSamskies/f0c8c9ac58db3c52d2fbc8f1a9d06b2e

Worx if you save it as tampermonkey script too.

Try the updated version

nostr:note19dtgkapuqa37mkrnc0r9alsertjzs2jg8nxm7gvv9l4q6h0fv6rq0sr5f2

Dope.

Seems like a lot of work. I mean I like primal and I hate the fact that you need to use their wallet to zap people but honestly if you do it “the primal way” it is extremely convenient. But this is a cool work around.

The web app is not the primal way though. They are currently using WebLN cause that’s the quick and easy solution. So only choice is to zap with Alby unless you use my hack.

I have only ever used the iPhone app. I didn’t know you could do it through Abby. I do like having options though. The more options the better. I was using Damus for a long time but I hated the fact that you could not zap notes in the iPhone app so I switched to coracle for a long time but the app quality was not quite as nice as some others. I have yet to find that perfect fit for the way I want things to be. Primal is as close as I can get right now. So this is a great workaround. Thanks for your hard work.

You can zap notes in Damus. Use this script https://zap.army to turn zaps back on and come back 😀

Wow. That’s crazy! I will give it a shot.