File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
app/src/main/java/to/bitkit/viewmodels Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -852,7 +852,7 @@ class AppViewModel @Inject constructor(
852852
853853 if (
854854 amountSats > BigDecimal .valueOf(walletRepo.balanceState.value.totalSats.toLong())
855- .times(BigDecimal (0.5 )).toLong().toUInt() &&
855+ .times(BigDecimal (MAX_BALANCE_FRACTION )).toLong().toUInt() &&
856856 SanityWarning .OVER_HALF_BALANCE !in _sendUiState .value.confirmedWarnings
857857 ) {
858858 _sendUiState .update {
@@ -873,7 +873,7 @@ class AppViewModel @Inject constructor(
873873 if (
874874 totalFee > BigDecimal .valueOf(
875875 amountSats.toLong()
876- ).times(BigDecimal (0.5 )).toLong().toUInt() &&
876+ ).times(BigDecimal (MAX_FEE_AMOUNT_RATIO )).toLong().toUInt() &&
877877 SanityWarning .FEE_OVER_HALF_VALUE !in _sendUiState .value.confirmedWarnings
878878 ) {
879879 _sendUiState .update {
@@ -1406,6 +1406,8 @@ class AppViewModel @Inject constructor(
14061406 private const val TAG = " AppViewModel"
14071407 private const val SEND_AMOUNT_WARNING_THRESHOLD = 100.0
14081408 private const val TEN_USD = 10
1409+ private const val MAX_BALANCE_FRACTION = 0.5
1410+ private const val MAX_FEE_AMOUNT_RATIO = 0.5
14091411 }
14101412}
14111413
You can’t perform that action at this time.
0 commit comments