Skip to content

Commit dbbe482

Browse files
committed
refactor: remove unused code
1 parent 7cb60e5 commit dbbe482

File tree

1 file changed

+50
-112
lines changed

1 file changed

+50
-112
lines changed

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

Lines changed: 50 additions & 112 deletions
Original file line numberDiff line numberDiff line change
@@ -146,123 +146,61 @@ private fun OnChainDescription(
146146
horizontalArrangement = Arrangement.spacedBy(16.dp),
147147
modifier = Modifier.height(IntrinsicSize.Min)
148148
) {
149-
if (uiState.payMethod == SendMethod.ONCHAIN) {
150-
Column(
151-
modifier = Modifier
152-
.fillMaxHeight()
153-
.weight(1f)
154-
.clickable { onEvent(SendEvent.SpeedAndFee) }
155-
.padding(top = 16.dp)
156-
) {
157-
Caption13Up(text = stringResource(R.string.label_speed), color = Colors.White64)
158-
Spacer(modifier = Modifier.height(8.dp))
159-
Row(
160-
verticalAlignment = Alignment.CenterVertically,
161-
horizontalArrangement = Arrangement.spacedBy(4.dp),
162-
) {
163-
Icon(
164-
painterResource(R.drawable.ic_speed_normal),
165-
contentDescription = null,
166-
tint = Colors.Brand,
167-
modifier = Modifier.size(16.dp)
168-
)
169-
BodySSB(text = "Normal (₿ 210)") //TODO GET FROM STATE
170-
Icon(
171-
painterResource(R.drawable.ic_pencil_simple),
172-
contentDescription = null,
173-
tint = Colors.White,
174-
modifier = Modifier.size(16.dp)
175-
)
176-
}
177-
Spacer(modifier = Modifier.weight(1f))
178-
HorizontalDivider(modifier = Modifier.padding(vertical = 16.dp))
179-
}
180-
Column(
181-
modifier = Modifier
182-
.fillMaxHeight()
183-
.weight(1f)
184-
.clickable { onEvent(SendEvent.SpeedAndFee) }
185-
.padding(top = 16.dp)
149+
Column(
150+
modifier = Modifier
151+
.fillMaxHeight()
152+
.weight(1f)
153+
.clickable { onEvent(SendEvent.SpeedAndFee) }
154+
.padding(top = 16.dp)
155+
) {
156+
Caption13Up(text = stringResource(R.string.label_speed), color = Colors.White64)
157+
Spacer(modifier = Modifier.height(8.dp))
158+
Row(
159+
verticalAlignment = Alignment.CenterVertically,
160+
horizontalArrangement = Arrangement.spacedBy(4.dp),
186161
) {
187-
Caption13Up(text = stringResource(R.string.label_confirms_in), color = Colors.White64)
188-
Spacer(modifier = Modifier.height(8.dp))
189-
Row(
190-
verticalAlignment = Alignment.CenterVertically,
191-
horizontalArrangement = Arrangement.spacedBy(4.dp),
192-
) {
193-
Icon(
194-
painterResource(R.drawable.ic_clock),
195-
contentDescription = null,
196-
tint = Colors.Brand,
197-
modifier = Modifier.size(16.dp)
198-
)
199-
BodySSB(text = "± 20-60 minutes") //TODO GET FROM STATE
200-
}
201-
Spacer(modifier = Modifier.weight(1f))
202-
HorizontalDivider(modifier = Modifier.padding(vertical = 16.dp))
162+
Icon(
163+
painterResource(R.drawable.ic_speed_normal),
164+
contentDescription = null,
165+
tint = Colors.Brand,
166+
modifier = Modifier.size(16.dp)
167+
)
168+
BodySSB(text = "Normal (₿ 210)") //TODO GET FROM STATE
169+
Icon(
170+
painterResource(R.drawable.ic_pencil_simple),
171+
contentDescription = null,
172+
tint = Colors.White,
173+
modifier = Modifier.size(16.dp)
174+
)
203175
}
204-
} else {
205-
Column(
206-
modifier = Modifier
207-
.fillMaxHeight()
208-
.weight(1f)
209-
.padding(top = 16.dp)
176+
Spacer(modifier = Modifier.weight(1f))
177+
HorizontalDivider(modifier = Modifier.padding(vertical = 16.dp))
178+
}
179+
Column(
180+
modifier = Modifier
181+
.fillMaxHeight()
182+
.weight(1f)
183+
.clickable { onEvent(SendEvent.SpeedAndFee) }
184+
.padding(top = 16.dp)
185+
) {
186+
Caption13Up(text = stringResource(R.string.label_confirms_in), color = Colors.White64)
187+
Spacer(modifier = Modifier.height(8.dp))
188+
Row(
189+
verticalAlignment = Alignment.CenterVertically,
190+
horizontalArrangement = Arrangement.spacedBy(4.dp),
210191
) {
211-
Caption13Up(text = stringResource(R.string.label_speed), color = Colors.White64)
212-
Spacer(modifier = Modifier.height(8.dp))
213-
Row(
214-
verticalAlignment = Alignment.CenterVertically,
215-
horizontalArrangement = Arrangement.spacedBy(4.dp),
216-
) {
217-
Icon(
218-
painterResource(R.drawable.ic_speed_normal),
219-
contentDescription = null,
220-
tint = Colors.Brand,
221-
modifier = Modifier.size(16.dp)
222-
) //TODO GET FROM STATE
223-
BodySSB(text = "Instant (±$0.01)") //TODO GET FROM STATE
224-
Icon(
225-
painterResource(R.drawable.ic_pencil_simple),
226-
contentDescription = null,
227-
tint = Colors.White,
228-
modifier = Modifier.size(16.dp)
229-
)
230-
}
231-
Spacer(modifier = Modifier.weight(1f))
232-
HorizontalDivider(modifier = Modifier.padding(vertical = 16.dp))
233-
}
234-
uiState.decodedInvoice?.expirySeconds?.let { expirySeconds ->
235-
Column(
236-
modifier = Modifier
237-
.fillMaxHeight()
238-
.weight(1f)
239-
.padding(top = 16.dp)
240-
) {
241-
val invoiceExpiryTimestamp = expirySeconds.let {
242-
Instant.now().plusSeconds(it.toLong()).formatted(DatePattern.INVOICE_EXPIRY)
243-
}
244-
Caption13Up(
245-
text = stringResource(R.string.label_invoice_expiration),
246-
color = Colors.White64
247-
)
248-
Spacer(modifier = Modifier.height(8.dp))
249-
Row(
250-
verticalAlignment = Alignment.CenterVertically,
251-
horizontalArrangement = Arrangement.spacedBy(4.dp),
252-
) {
253-
Icon(
254-
painterResource(R.drawable.ic_clock),
255-
contentDescription = null,
256-
tint = Colors.Brand,
257-
modifier = Modifier.size(16.dp)
258-
)
259-
BodySSB(text = invoiceExpiryTimestamp)
260-
}
261-
Spacer(modifier = Modifier.weight(1f))
262-
HorizontalDivider(modifier = Modifier.padding(vertical = 16.dp))
263-
}
192+
Icon(
193+
painterResource(R.drawable.ic_clock),
194+
contentDescription = null,
195+
tint = Colors.Brand,
196+
modifier = Modifier.size(16.dp)
197+
)
198+
BodySSB(text = "± 20-60 minutes") //TODO GET FROM STATE
264199
}
200+
Spacer(modifier = Modifier.weight(1f))
201+
HorizontalDivider(modifier = Modifier.padding(vertical = 16.dp))
265202
}
203+
266204
}
267205
}
268206
}

0 commit comments

Comments
 (0)