Updated on 2026-08-14

This commit is contained in:
Tangem 2025-04-16 19:53:59 +05:00
parent 464fb0db73
commit 840687b699
5 changed files with 31 additions and 12 deletions

View file

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