allow lightning address send callback to have query params

This commit is contained in:
keyan 2022-05-24 16:15:51 -05:00
parent 44f59f1f34
commit ba4644463f
2 changed files with 11 additions and 2 deletions

View File

@ -225,8 +225,11 @@ export default {
{ argumentName: 'amount' })
}
const callback = new URL(res1.callback)
callback.searchParams.append('amount', milliamount)
// call callback with amount
const res2 = await (await fetch(`${res1.callback}?amount=${milliamount}`)).json()
const res2 = await (await fetch(callback.toString())).json()
if (res2.status === 'ERROR') {
throw new Error(res2.reason)
}

View File

@ -62,7 +62,13 @@ export default function Header ({ sub }) {
</Nav.Link>
</Link>
<div className='position-relative'>
<NavDropdown className={styles.dropdown} title={<Link href={`/${me?.name}`} passHref><Nav.Link onClick={e => e.preventDefault()}>{`@${me?.name}`}</Nav.Link></Link>} alignRight>
<NavDropdown
className={styles.dropdown} title={
<Link href={`/${me?.name}`} passHref>
<Nav.Link className='p-0' onClick={e => e.preventDefault()}>{`@${me?.name}`}</Nav.Link>
</Link>
} alignRight
>
<Link href={'/' + me?.name} passHref>
<NavDropdown.Item>
profile