Fix verification bottomsheet not updating

This commit is contained in:
valere 2023-04-05 12:12:40 +02:00
parent b704b64255
commit b45b90dcdf
2 changed files with 6 additions and 2 deletions

View file

@ -173,6 +173,7 @@ internal class RustVerificationService @Inject constructor(
Timber.d("## Verification: start for $sender")
// update the request as the start updates it's state
verificationListenersHolder.dispatchRequestUpdated(request)
verificationListenersHolder.dispatchTxUpdated(transaction)
} else {
// This didn't originate from a request, so tell our listeners that
@ -322,6 +323,9 @@ internal class RustVerificationService @Inject constructor(
if (sas != null) {
verificationListenersHolder.dispatchTxAdded(sas)
// we need to update the request as the state mapping depends on the
// sas or qr beeing started
verificationListenersHolder.dispatchRequestUpdated(request)
sas.transactionId
} else {
Timber.w("Failed to start verification with method $method")

View file

@ -166,8 +166,8 @@ class UserVerificationViewModel @AssistedInject constructor(
)
}
}
it.getTransaction()?.let {
val dClass = it.toDataClass()
it.getTransaction()?.let { transaction ->
val dClass = transaction.toDataClass()
if (dClass != null) {
setState {
copy(