Skip to content

Commit d8465b3

Browse files
committed
fix: handle potential empty address error
1 parent 059fd2c commit d8465b3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

app/src/main/java/to/bitkit/repositories/LightningRepo.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,9 @@ class LightningRepo @Inject constructor(
536536
channelId: String? = null,
537537
isMaxAmount: Boolean = false,
538538
): Result<Txid> =
539-
executeWhenNodeRunning("Send on-chain") {
539+
executeWhenNodeRunning("sendOnChain") {
540+
require(address.isNotEmpty()) { "Send address cannot be empty" }
541+
540542
val transactionSpeed = speed ?: settingsStore.data.first().defaultTransactionSpeed
541543
val satsPerVByte = getFeeRateForSpeed(transactionSpeed, feeRates).getOrThrow().toUInt()
542544

0 commit comments

Comments
 (0)