Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ describe('BTCWithdraw component', () => {
await waitFor(() => {
expect(checkbox).toBeChecked();
expect(screen.getByLabelText('feeRate')).toBeInTheDocument();
expect(screen.getByTestId('fee-rate-unit')).toHaveTextContent('perkw');
expect(screen.getByTestId('fee-rate-unit')).toHaveTextContent('Sat/vB');
});
});

Expand Down
29 changes: 16 additions & 13 deletions apps/frontend/src/components/cln/BTCWithdraw/BTCWithdraw.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -229,13 +229,14 @@ const BTCWithdraw = (props) => {
<AnimatePresence mode="wait">
{showCustomFeeRate ? (
<motion.div
key="custom"
initial={{ opacity: 0, scale: 0.95 }}
animate={{ opacity: 1, scale: 1 }}
exit={{ opacity: 0, scale: 0.9 }}
transition={{ type: "spring", stiffness: 500, damping: 30 }}
key="custom-fee-rate"
initial={{ opacity: 0, y: -10 }}
animate={{ opacity: 1, y: 0 }}
exit={{ opacity: 0, y: 10 }}
transition={{ duration: 0.2 }}
style={{ width: '100%' }}
>
<Col xs={12} style={{ display: showCustomFeeRate ? 'block' : 'none' }}>
<Col xs={12}>
<Form.Label className='text-dark'>Fee Rate*</Form.Label>
<InputGroup className={(feeRateHasError ? 'invalid ' : '')}>
<InputGroup.Text className='form-control-addon form-control-addon-left'>
Expand All @@ -252,9 +253,10 @@ const BTCWithdraw = (props) => {
value={feeRateValue}
onChange={feeRateChangeHandler}
onBlur={feeRateBlurHandler}
data-testid='fee-rate-input'
/>
<InputGroup.Text data-testid='fee-rate-unit' id='Fee Rate Unit' className='form-control-addon form-control-addon-right text-light'>
perkw
Sat/vB
</InputGroup.Text>
</InputGroup>
{(feeRateHasError) ?
Expand All @@ -264,13 +266,14 @@ const BTCWithdraw = (props) => {
</motion.div>
) : (
<motion.div
key="range"
initial={{ opacity: 0, scale: 0.95 }}
animate={{ opacity: 1, scale: 1 }}
exit={{ opacity: 0, scale: 0.9 }}
transition={{ type: "spring", stiffness: 500, damping: 30 }}
key="fee-rate-range"
initial={{ opacity: 0, y: -10 }}
animate={{ opacity: 1, y: 0 }}
exit={{ opacity: 0, y: 10 }}
transition={{ duration: 0.2 }}
style={{ width: '100%' }}
>
<Col xs={12} style={{ display: showCustomFeeRate ? 'none' : 'block' }}>
<Col xs={12}>
<FeerateRange tabIndex={4} selFeeRate={selFeeRate} selFeeRateChangeHandler={selFeeRateChangeHandler} />
</Col>
</motion.div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ describe('ChannelOpen component', () => {
await waitFor(() => {
expect(customFeeRateCheckbox).toBeChecked();
expect(screen.getByTestId('fee-rate-input')).toBeInTheDocument();
expect(screen.getByTestId('fee-rate-unit')).toHaveTextContent('perkw');
expect(screen.getByTestId('fee-rate-unit')).toHaveTextContent('Sat/vB');
});
});

Expand Down
3 changes: 1 addition & 2 deletions apps/frontend/src/components/cln/ChannelOpen/ChannelOpen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,6 @@ const ChannelOpen = (props) => {
data-testid='show-custom-fee-rate'
/>
</Col>

<AnimatePresence mode="wait">
{showCustomFeeRate ? (
<motion.div
Expand Down Expand Up @@ -267,7 +266,7 @@ const ChannelOpen = (props) => {
data-testid='fee-rate-input'
/>
<InputGroup.Text data-testid='fee-rate-unit' id='Fee Rate Unit' className='form-control-addon form-control-addon-right text-light'>
perkw
Sat/vB
</InputGroup.Text>
</InputGroup>
{(feeRateHasError) ?
Expand Down