MCPcopy
hub / github.com/BlueWallet/BlueWallet / processTextForInvoice

Function processTextForInvoice

screen/lnd/ScanLNDInvoice.tsx:266–280  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

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) {

Callers 2

onBlurFunction · 0.85
onChangeTextFunction · 0.85

Calls 3

processInvoiceFunction · 0.85
isLnurlMethod · 0.80
isLightningAddressMethod · 0.80

Tested by

no test coverage detected