File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
app/src/main/java/to/bitkit/viewmodels Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -311,8 +311,17 @@ class AppViewModel @Inject constructor(
311311 }
312312
313313 private suspend fun handleOnchainTransactionReplaced (event : Event .OnchainTransactionReplaced ) {
314+ // If the replaced transaction was just boosted via RBF from within the app, we already show a
315+ // dedicated boost success toast; suppress the generic "transaction replaced" toast to avoid
316+ // flakiness/noise (notably in E2E flows).
317+ val shouldSuppressReplacedToast = activityRepo
318+ .getOnchainActivityByTxId(event.txid)
319+ ?.let { it.isBoosted && it.txType == PaymentType .SENT } == true
320+
314321 activityRepo.handleOnchainTransactionReplaced(event.txid, event.conflicts)
315- notifyTransactionReplaced(event)
322+ if (! shouldSuppressReplacedToast) {
323+ notifyTransactionReplaced(event)
324+ }
316325 }
317326
318327 private suspend fun handlePaymentFailed (event : Event .PaymentFailed ) {
You can’t perform that action at this time.
0 commit comments