@@ -99,9 +99,9 @@ fun SpendingAmountScreen(
9999 .replace(" {amount}" , " $max " ),
100100 )
101101 }
102- val quarterAmount = min(quarter, max)
103- viewModel.updateLimits(quarterAmount )
104- amountInputViewModel.setSats(quarterAmount , currencies)
102+ val cappedQuarter = min(quarter, max)
103+ viewModel.updateLimits(cappedQuarter )
104+ amountInputViewModel.setSats(cappedQuarter , currencies)
105105 },
106106 onClickMaxAmount = {
107107 val newAmountSats = uiState.maxAllowedToSend
@@ -165,7 +165,6 @@ private fun SpendingAmountNodeRunning(
165165 modifier = Modifier
166166 .padding(horizontal = 16 .dp)
167167 .fillMaxSize()
168- .imePadding()
169168 .testTag(" SpendingAmount" )
170169 ) {
171170 val amountUiState by amountInputViewModel.uiState.collectAsStateWithLifecycle()
@@ -225,15 +224,11 @@ private fun SpendingAmountNodeRunning(
225224 modifier = Modifier .testTag(" SpendingAmountMax" )
226225 )
227226 }
228- HorizontalDivider ()
229227
228+ HorizontalDivider ()
230229 VerticalSpacer (16 .dp)
231- NumberPad (
232- viewModel = amountInputViewModel,
233- modifier = Modifier .fillMaxWidth()
234- )
235230
236- VerticalSpacer ( 8 .dp )
231+ NumberPad (viewModel = amountInputViewModel )
237232
238233 PrimaryButton (
239234 text = stringResource(R .string.common__continue),
@@ -247,13 +242,13 @@ private fun SpendingAmountNodeRunning(
247242 }
248243}
249244
250- @Preview(showBackground = true )
245+ @Preview(showSystemUi = true )
251246@Composable
252247private fun Preview () {
253248 AppThemeSurface {
254249 Content (
255250 isNodeRunning = true ,
256- uiState = TransferToSpendingUiState (),
251+ uiState = TransferToSpendingUiState (maxAllowedToSend = 158_234 , balanceAfterFee = 158_234 ),
257252 amountInputViewModel = previewAmountInputViewModel(),
258253 currencies = CurrencyState (),
259254 onBackClick = {},
@@ -265,13 +260,13 @@ private fun Preview() {
265260 }
266261}
267262
268- @Preview(showBackground = true , device = NEXUS_5 )
263+ @Preview(showSystemUi = true , device = NEXUS_5 )
269264@Composable
270265private fun PreviewSmall () {
271266 AppThemeSurface {
272267 Content (
273268 isNodeRunning = true ,
274- uiState = TransferToSpendingUiState (),
269+ uiState = TransferToSpendingUiState (maxAllowedToSend = 158_234 , balanceAfterFee = 158_234 ),
275270 amountInputViewModel = previewAmountInputViewModel(),
276271 currencies = CurrencyState (),
277272 onBackClick = {},
@@ -283,7 +278,7 @@ private fun PreviewSmall() {
283278 }
284279}
285280
286- @Preview(showBackground = true , device = NEXUS_5 )
281+ @Preview(showSystemUi = true , device = NEXUS_5 )
287282@Composable
288283private fun PreviewInitializing () {
289284 AppThemeSurface {
0 commit comments