Updated on 2026-08-14

This commit is contained in:
Tangem 2025-05-15 16:37:06 +05:00
parent 139ca05985
commit 349d8fc7dd
6 changed files with 37 additions and 26 deletions

View file

@ -63,14 +63,19 @@ internal class DefaultOnrampTransactionRepository(
}.map(transactionConverter::convert)
}
override suspend fun updateTransactionStatus(txId: String, externalTxUrl: String, status: OnrampStatus.Status) =
withContext(dispatchers.io) {
val updatedTx = getTransactionById(txId)?.copy(
externalTxUrl = externalTxUrl,
status = status,
) ?: return@withContext
storeTransaction(updatedTx)
}
override suspend fun updateTransactionStatus(
txId: String,
externalTxId: String,
externalTxUrl: String,
status: OnrampStatus.Status,
) = withContext(dispatchers.io) {
val updatedTx = getTransactionById(txId)?.copy(
externalTxUrl = externalTxUrl,
externalTxId = externalTxId,
status = status,
) ?: return@withContext
storeTransaction(updatedTx)
}
override suspend fun removeTransaction(txId: String) {
withContext(dispatchers.io) {