max amount for alby
This commit is contained in:
parent
7efc86427d
commit
52de4a253e
@ -153,7 +153,8 @@ export function WithdrawlForm () {
|
|||||||
try {
|
try {
|
||||||
const provider = await requestProvider()
|
const provider = await requestProvider()
|
||||||
const { paymentRequest: invoice } = await provider.makeInvoice({
|
const { paymentRequest: invoice } = await provider.makeInvoice({
|
||||||
defaultMemo: `Withdrawal for @${me.name} on SN`
|
defaultMemo: `Withdrawal for @${me.name} on SN`,
|
||||||
|
maximumAmount: Math.max(me.sats - MAX_FEE_DEFAULT, 0)
|
||||||
})
|
})
|
||||||
const { data } = await createWithdrawl({ variables: { invoice, maxFee: MAX_FEE_DEFAULT } })
|
const { data } = await createWithdrawl({ variables: { invoice, maxFee: MAX_FEE_DEFAULT } })
|
||||||
router.push(`/withdrawals/${data.createWithdrawl.id}`)
|
router.push(`/withdrawals/${data.createWithdrawl.id}`)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user