Skip to content

Commit 351b09d

Browse files
committed
refactor: pass currencies to numberpad
1 parent 9837318 commit 351b09d

File tree

4 files changed

+8
-15
lines changed

4 files changed

+8
-15
lines changed

app/src/main/java/to/bitkit/ui/screens/transfer/external/ExternalAmountScreen.kt

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,10 @@ private fun Content(
162162
HorizontalDivider()
163163
VerticalSpacer(16.dp)
164164

165-
NumberPad(viewModel = amountInputViewModel)
165+
NumberPad(
166+
viewModel = amountInputViewModel,
167+
currencies = currencies,
168+
)
166169

167170
PrimaryButton(
168171
text = stringResource(R.string.common__continue),
@@ -177,6 +180,8 @@ private fun Content(
177180
}
178181

179182
@Preview(showSystemUi = true)
183+
@Preview(showSystemUi = true, device = "id:pixel_9_pro_xl", name = "Large")
184+
@Preview(showSystemUi = true, device = NEXUS_5, name = "Small")
180185
@Composable
181186
private fun Preview() {
182187
AppThemeSurface {
@@ -186,14 +191,3 @@ private fun Preview() {
186191
)
187192
}
188193
}
189-
190-
@Preview(showSystemUi = true, device = NEXUS_5)
191-
@Composable
192-
private fun PreviewSmall() {
193-
AppThemeSurface {
194-
Content(
195-
amountState = ExternalNodeContract.UiState.Amount(max = 429_327),
196-
amountInputViewModel = previewAmountInputViewModel(),
197-
)
198-
}
199-
}

app/src/main/java/to/bitkit/ui/screens/wallets/receive/EditInvoiceScreen.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,6 @@ fun EditInvoiceContent(
256256
currencies = currencies,
257257
availableHeight = maxHeight,
258258
modifier = Modifier
259-
.fillMaxWidth()
260259
.testTag("ReceiveNumberField")
261260
)
262261

app/src/main/java/to/bitkit/ui/screens/wallets/receive/ReceiveAmountScreen.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,9 +188,9 @@ private fun ReceiveAmountContent(
188188

189189
NumberPad(
190190
viewModel = amountInputViewModel,
191+
currencies = currencies,
191192
availableHeight = maxHeight,
192193
modifier = Modifier
193-
.fillMaxWidth()
194194
.testTag("ReceiveNumberPad")
195195
)
196196

app/src/main/java/to/bitkit/ui/screens/wallets/send/SendAmountScreen.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,9 +265,9 @@ private fun SendAmountNodeRunning(
265265

266266
NumberPad(
267267
viewModel = amountInputViewModel,
268+
currencies = currencies,
268269
availableHeight = maxHeight,
269270
modifier = Modifier
270-
.fillMaxWidth()
271271
.testTag("SendAmountNumberPad")
272272
)
273273

0 commit comments

Comments
 (0)