withdrawal failure links to withdrawal form
This commit is contained in:
parent
f6028d441c
commit
cb9922b373
|
@ -5,6 +5,7 @@ import InputGroup from 'react-bootstrap/InputGroup'
|
||||||
import InvoiceStatus from '../../components/invoice-status'
|
import InvoiceStatus from '../../components/invoice-status'
|
||||||
import { useRouter } from 'next/router'
|
import { useRouter } from 'next/router'
|
||||||
import { WITHDRAWL } from '../../fragments/wallet'
|
import { WITHDRAWL } from '../../fragments/wallet'
|
||||||
|
import Link from 'next/link'
|
||||||
|
|
||||||
export default function Withdrawl () {
|
export default function Withdrawl () {
|
||||||
return (
|
return (
|
||||||
|
@ -39,6 +40,11 @@ function LoadWithdrawl () {
|
||||||
return <WithdrawlSkeleton status='loading' />
|
return <WithdrawlSkeleton status='loading' />
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const TryMaxFee = () =>
|
||||||
|
<Link href='/wallet?type=withdraw' passHref>
|
||||||
|
<a className='text-reset text-underline'><small className='ml-3'>try increasing max fee</small></a>
|
||||||
|
</Link>
|
||||||
|
|
||||||
let status = 'pending'
|
let status = 'pending'
|
||||||
let variant = 'default'
|
let variant = 'default'
|
||||||
switch (data.withdrawl.status) {
|
switch (data.withdrawl.status) {
|
||||||
|
@ -55,11 +61,11 @@ function LoadWithdrawl () {
|
||||||
variant = 'failed'
|
variant = 'failed'
|
||||||
break
|
break
|
||||||
case 'PATHFINDING_TIMEOUT':
|
case 'PATHFINDING_TIMEOUT':
|
||||||
status = <>timed out finding route <small className='ml-3'>try increasing max fee</small></>
|
status = <>timed out finding route <TryMaxFee /></>
|
||||||
variant = 'failed'
|
variant = 'failed'
|
||||||
break
|
break
|
||||||
case 'ROUTE_NOT_FOUND':
|
case 'ROUTE_NOT_FOUND':
|
||||||
status = <>no route <small className='ml-3'>try increasing max fee</small></>
|
status = <>no route <TryMaxFee /></>
|
||||||
variant = 'failed'
|
variant = 'failed'
|
||||||
break
|
break
|
||||||
case 'UNKNOWN_FAILURE':
|
case 'UNKNOWN_FAILURE':
|
||||||
|
|
Loading…
Reference in New Issue