Skip to content

Commit 5b8a086

Browse files
authored
Merge pull request #49 from synonymdev/tweaks
Input fixes
2 parents 6571082 + 4024954 commit 5b8a086

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/components/input-group/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ export default ({
9292
<div className={'custom-input-container'}>
9393
{type === 'number' ? (
9494
<NumberFormat
95+
inputMode='numeric'
9596
className={'custom-input'}
9697
thousandSeparator={' '}
9798
id={id}

src/pages/public/configure/index.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,10 @@ function ConfigurePage(): JSX.Element {
152152
errors.localBalance = `Max spending balance is ${numberWithSpaces(
153153
max_chan_spending
154154
)} sats ($${max_chan_spending_usd})`;
155+
} else if (Number(localBalance) + Number(remoteBalance) > product.max_channel_size) {
156+
errors.localBalance = `Total channel capacity is ${numberWithSpaces(
157+
product.max_channel_size
158+
)} sats`;
155159
} else if (Number(localBalance) < product.min_channel_size) {
156160
// TODO remove this check if the min spending cap check is removed from API
157161
errors.localBalance = `Minimum spending capacity is ${numberWithSpaces(

0 commit comments

Comments
 (0)