Updated on 2026-08-14

This commit is contained in:
Tangem 2025-07-21 14:51:44 +05:00
parent 15e7df8d41
commit ed133dcd35
21 changed files with 464 additions and 119 deletions

View file

@ -31,6 +31,7 @@ interface SendNotificationsComponent {
val feeCryptoCurrencyStatus: CryptoCurrencyStatus,
val appCurrency: AppCurrency,
val notificationData: NotificationData,
val callback: ModelCallback,
) {
data class NotificationData(
val destinationAddress: String,
@ -44,4 +45,14 @@ interface SendNotificationsComponent {
}
interface Factory : ComponentFactory<Params, SendNotificationsComponent>
interface ModelCallback {
fun onFeeReload()
fun onAmountReduceTo(reduceTo: BigDecimal) {}
fun onAmountReduceBy(reduceBy: BigDecimal, reduceByDiff: BigDecimal) {}
fun onAmountIgnore() {}
}
}

View file

@ -1,13 +0,0 @@
package com.tangem.features.send.v2.api.feeselector
import kotlinx.coroutines.flow.Flow
data class FeeSelectorReloadData(val removeSuggestedFee: Boolean = false)
interface FeeSelectorReloadTrigger {
suspend fun triggerUpdate(data: FeeSelectorReloadData = FeeSelectorReloadData())
}
interface FeeSelectorReloadListener {
val reloadTriggerFlow: Flow<FeeSelectorReloadData>
}

View file

@ -0,0 +1,22 @@
package com.tangem.features.send.v2.api.subcomponents.feeSelector
import kotlinx.coroutines.flow.Flow
interface FeeSelectorCheckReloadTrigger {
/** Trigger return callback with check result */
suspend fun callbackCheckResult(isSuccess: Boolean)
/** Trigger fee check reload */
suspend fun triggerCheckUpdate()
}
interface FeeSelectorCheckReloadListener {
/**
* Flow triggers fee check reload before transaction.
* Usually after significant time after fee was updated last time
*/
val checkReloadTriggerFlow: Flow<Unit>
/** Flow return result of fee check update */
val checkReloadResultFlow: Flow<Boolean>
}

View file

@ -0,0 +1,15 @@
package com.tangem.features.send.v2.api.subcomponents.feeSelector
import com.tangem.features.send.v2.api.subcomponents.feeSelector.entity.FeeSelectorData
import kotlinx.coroutines.flow.Flow
interface FeeSelectorReloadTrigger {
/** Trigger fee update */
suspend fun triggerUpdate(feeData: FeeSelectorData = FeeSelectorData())
}
interface FeeSelectorReloadListener {
/** Flow triggers fee reload */
val reloadTriggerFlow: Flow<FeeSelectorData>
}

View file

@ -0,0 +1,5 @@
package com.tangem.features.send.v2.api.subcomponents.feeSelector.entity
data class FeeSelectorData(
val removeSuggestedFee: Boolean = false,
)