File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
app/src/main/java/to/bitkit/viewmodels Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -83,6 +83,7 @@ import to.bitkit.models.NewTransactionSheetType
8383import to.bitkit.models.Suggestion
8484import to.bitkit.models.Toast
8585import to.bitkit.models.TransactionSpeed
86+ import to.bitkit.models.safe
8687import to.bitkit.models.toActivityFilter
8788import to.bitkit.models.toTxType
8889import to.bitkit.repositories.ActivityRepo
@@ -1479,11 +1480,7 @@ class AppViewModel @Inject constructor(
14791480 }
14801481
14811482 val buffer = 2uL
1482- val amountToEstimate = if (maxSendLightning > buffer) {
1483- maxSendLightning - buffer
1484- } else {
1485- maxSendLightning
1486- }
1483+ val amountToEstimate = maxSendLightning.safe() - buffer.safe()
14871484
14881485 val feeResult = lightningRepo.estimateRoutingFeesForAmount(
14891486 bolt11 = bolt11,
You can’t perform that action at this time.
0 commit comments