Describe the bug
When a user taps a transaction in the history list and navigates to SpecificTransactionsScreen, the transfer detail section never renders even for transactions that have a valid transferId. The screen loads, but the TransactionDetail card remains empty in every case.
This makes the detail screen almost useless for transfer transactions, since the sender/receiver information, reference number, and transfer metadata are never shown.
Root cause
In SpecificTransactionsViewModel.kt, the getAccountTransfer fetch was commented out during the self-service API migration with the note:
// TODO: below api not there for Self So Commented it
// transaction.transferId?.let { transferId ->
// accountRepository.getAccountTransfer(transferId)
// .onEach { result: DataState<TransferDetail> -> ... }
// .launchIn(viewModelScope)
// } ?: run {
// mutableStateFlow.update { it.copy(viewState = Content(transaction, null)) }
// }
However, AccountRepositoryImpl.getAccountTransfer() already routes through selfManager.accountTransfersApi:
override fun getAccountTransfer(transferId: Long): Flow<DataState<TransferDetail>> {
return selfManager.accountTransfersApi
.getAccountTransfer(transferId.toInt())
.asDataStateFlow().flowOn(ioDispatcher)
}
The self-service endpoint is available. The comment was added as a precaution during migration but was never revisited after the repository implementation was updated. The result is that STState.ViewState.Content always carries detail = null, and the TransactionDetail composable in SpecificTransactionsScreen is never shown to the user.
Steps to reproduce
- Log in with an account that has at least one transfer transaction in its history
- Navigate to the History tab
- Tap any transaction that shows as a transfer (CREDIT or DEBIT with a counterparty)
- Observe: the transfer detail card does not appear on
SpecificTransactionsScreen
Expected behavior
The TransactionDetail card should render with the full transfer detail - sender name, receiver name, reference number, and transfer amount fetched via accountRepository.getAccountTransfer(transferId).
Actual behavior
detail is always null. The transfer detail section is never shown regardless of the transaction type.
Environment
- Platform: Android / iOS (Kotlin Multiplatform)
- Feature module:
feature:history
- Affected screen:
SpecificTransactionsScreen
- Affected ViewModel:
SpecificTransactionsViewModel
Additional context
The UI layer already handles both states correctly - SpecificTransactionsScreen shows the TransactionDetail card when detail != null and skips it when null. No UI changes are needed. This is purely a ViewModel-level oversight from the self-service migration.
The fix is to uncomment and restore the getAccountTransfer flow inside handleTransferDetailReceive, since the backing API is already self-service compliant.
Describe the bug
When a user taps a transaction in the history list and navigates to
SpecificTransactionsScreen, the transfer detail section never renders even for transactions that have a validtransferId. The screen loads, but theTransactionDetailcard remains empty in every case.This makes the detail screen almost useless for transfer transactions, since the sender/receiver information, reference number, and transfer metadata are never shown.
Root cause
In
SpecificTransactionsViewModel.kt, thegetAccountTransferfetch was commented out during the self-service API migration with the note:However,
AccountRepositoryImpl.getAccountTransfer()already routes throughselfManager.accountTransfersApi:The self-service endpoint is available. The comment was added as a precaution during migration but was never revisited after the repository implementation was updated. The result is that
STState.ViewState.Contentalways carriesdetail = null, and theTransactionDetailcomposable inSpecificTransactionsScreenis never shown to the user.Steps to reproduce
SpecificTransactionsScreenExpected behavior
The
TransactionDetailcard should render with the full transfer detail - sender name, receiver name, reference number, and transfer amount fetched viaaccountRepository.getAccountTransfer(transferId).Actual behavior
detailis alwaysnull. The transfer detail section is never shown regardless of the transaction type.Environment
feature:historySpecificTransactionsScreenSpecificTransactionsViewModelAdditional context
The UI layer already handles both states correctly -
SpecificTransactionsScreenshows theTransactionDetailcard whendetail != nulland skips it whennull. No UI changes are needed. This is purely a ViewModel-level oversight from the self-service migration.The fix is to uncomment and restore the
getAccountTransferflow insidehandleTransferDetailReceive, since the backing API is already self-service compliant.