Skip to content

Commit

Permalink
update isCashuToken (#229)
Browse files Browse the repository at this point in the history
  • Loading branch information
KKA11010 committed Sep 22, 2023
1 parent 2fc9864 commit 83feef6
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/util/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,13 @@ export async function getInvoiceFromLnurl(address: string, amount: number) {
export function isCashuToken(token: string) {
if (!token || !isStr(token)) { return }
token = token.trim()
const uriPrefixes = ['web+cashu://', 'cashu://', 'cashu:']
const uriPrefixes = [
'https://wallet.nutstash.app/#',
'https://wallet.cashu.me/?token=',
'web+cashu://',
'cashu://',
'cashu:'
]
uriPrefixes.forEach((prefix) => {
if (!token.startsWith(prefix)) { return }
token = token.slice(prefix.length).trim()
Expand Down

0 comments on commit 83feef6

Please sign in to comment.