Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Pending Status persists for all successful transactions #989

Merged
merged 1 commit into from
Mar 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class AccountsViewModel(application: Application, val repo: AccountRepo, val act
private fun loadActions(account: Account, type: String) = viewModelScope.launch(Dispatchers.IO) {
institutionActions.postValue(
if (type == HoverAction.P2P) actionRepo.getTransferActions(account.institutionId!!, account.countryAlpha2!!)
else actionRepo.getActions(account.institutionId!!, account.countryAlpha2!!, type)
else actionRepo.getActions(account.institutionId, account.countryAlpha2!!, type)
)
}

Expand Down
1 change: 1 addition & 0 deletions app/src/main/java/com/hover/stax/database/AppDatabase.kt
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ abstract class AppDatabase : RoomDatabase() {
AppDatabase::class.java,
"stax.db"
)
.enableMultiInstanceInvalidation()
.setJournalMode(JournalMode.WRITE_AHEAD_LOGGING)
.addMigrations(
Migrations.M23_24,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,11 @@ class SimViewModel(private val listSimsUseCase: ListSimsUseCase, val application
fetchSims()
}
}

loadSims()
}

private fun loadSims() {
fetchSims()

simReceiver?.let {
LocalBroadcastManager.getInstance(application)
.registerReceiver(it, IntentFilter(Utils.getPackage(application) + ".NEW_SIM_INFO_ACTION"))
Expand Down