mirror of
https://github.com/apotdevin/thunderhub.git
synced 2025-02-22 22:25:21 +01:00
fix: ๐ close channel params
This commit is contained in:
parent
bd9e224c28
commit
8bc1cbc591
1 changed files with 24 additions and 9 deletions
|
@ -86,7 +86,7 @@ export const CloseChannel = ({
|
||||||
<SubTitle>Are you sure you want to close the channel?</SubTitle>
|
<SubTitle>Are you sure you want to close the channel?</SubTitle>
|
||||||
<ColorButton
|
<ColorButton
|
||||||
fullWidth={true}
|
fullWidth={true}
|
||||||
disabled={loading}
|
disabled={loading || !amount}
|
||||||
loading={loading}
|
loading={loading}
|
||||||
withMargin={'16px 4px 4px'}
|
withMargin={'16px 4px 4px'}
|
||||||
color={'red'}
|
color={'red'}
|
||||||
|
@ -95,11 +95,9 @@ export const CloseChannel = ({
|
||||||
variables: {
|
variables: {
|
||||||
id: channelId,
|
id: channelId,
|
||||||
forceClose: isForce,
|
forceClose: isForce,
|
||||||
...(isType !== 'none'
|
...(isType === 'target'
|
||||||
? isType === 'fee'
|
? { target: amount }
|
||||||
? { tokens: amount }
|
: { tokens: amount }),
|
||||||
: { target: amount }
|
|
||||||
: {}),
|
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -146,10 +144,27 @@ export const CloseChannel = ({
|
||||||
<MultiButton>
|
<MultiButton>
|
||||||
{fetchFees &&
|
{fetchFees &&
|
||||||
!dontShow &&
|
!dontShow &&
|
||||||
renderButton(() => setIsType('none'), 'Auto', isType === 'none')}
|
renderButton(
|
||||||
{renderButton(() => setIsType('fee'), 'Fee', isType === 'fee')}
|
() => {
|
||||||
|
setAmount(0);
|
||||||
|
setIsType('none');
|
||||||
|
},
|
||||||
|
'Auto',
|
||||||
|
isType === 'none'
|
||||||
|
)}
|
||||||
{renderButton(
|
{renderButton(
|
||||||
() => setIsType('target'),
|
() => {
|
||||||
|
setAmount(0);
|
||||||
|
setIsType('fee');
|
||||||
|
},
|
||||||
|
'Fee',
|
||||||
|
isType === 'fee'
|
||||||
|
)}
|
||||||
|
{renderButton(
|
||||||
|
() => {
|
||||||
|
setAmount(0);
|
||||||
|
setIsType('target');
|
||||||
|
},
|
||||||
'Target',
|
'Target',
|
||||||
isType === 'target'
|
isType === 'target'
|
||||||
)}
|
)}
|
||||||
|
|
Loadingโฆ
Add table
Reference in a new issue