Skip to content

Commit e903419

Browse files
committed
fix: cap onchain send amount to balance
Made-with: Cursor
1 parent a246edc commit e903419

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

app/src/main/java/to/bitkit/viewmodels/AppViewModel.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1169,7 +1169,10 @@ class AppViewModel @Inject constructor(
11691169
}
11701170
}
11711171

1172-
SendMethod.ONCHAIN -> amount > Defaults.dustLimit.toULong()
1172+
SendMethod.ONCHAIN -> {
1173+
val maxSendable = walletRepo.balanceState.value.maxSendOnchainSats
1174+
amount > Defaults.dustLimit.toULong() && amount <= maxSendable
1175+
}
11731176
}
11741177
}
11751178

0 commit comments

Comments
 (0)