Error handling
function pay() {
if(typeof window.webln === 'undefined')
return;
try {
await window.webln.enable();
await window.webln.sendPayment(...);
}
catch(err) {
console.log(error);
}
}Last updated
Was this helpful?