(text: string)
| 264 | }; |
| 265 | |
| 266 | const processTextForInvoice = (text: string): void => { |
| 267 | if ( |
| 268 | (text && text.toLowerCase().startsWith('lnb')) || |
| 269 | text.toLowerCase().startsWith('lightning:lnb') || |
| 270 | text.toLowerCase().startsWith('ark1') || |
| 271 | Lnurl.isLnurl(text) || |
| 272 | Lnurl.isLightningAddress(text) |
| 273 | ) { |
| 274 | processInvoice(text); |
| 275 | } else { |
| 276 | setDecoded(undefined); |
| 277 | setExpiresIn(undefined); |
| 278 | setDestination(text); |
| 279 | } |
| 280 | }; |
| 281 | |
| 282 | const shouldDisablePayButton = (): boolean => { |
| 283 | if (!decoded) { |
no test coverage detected