Updated on 2026-08-14
This commit is contained in:
parent
f10002c0e5
commit
c3c4eaf1f6
2 changed files with 32 additions and 8 deletions
|
|
@ -80,14 +80,7 @@ internal class YieldSupplyNotificationsModel @Inject constructor(
|
|||
}
|
||||
}
|
||||
|
||||
if (notifications.any { it is NotificationUM.Error.TokenExceedsBalance }) {
|
||||
analyticsEventHandler.send(
|
||||
YieldSupplyAnalytics.NoticeNotEnoughFee(
|
||||
token = cryptoCurrencyStatus.currency.symbol,
|
||||
blockchain = cryptoCurrencyStatus.currency.network.name,
|
||||
),
|
||||
)
|
||||
}
|
||||
sendAnalytics(notifications, cryptoCurrencyStatus.currency)
|
||||
|
||||
uiState.update { notifications.toPersistentList() }
|
||||
|
||||
|
|
@ -97,6 +90,26 @@ internal class YieldSupplyNotificationsModel @Inject constructor(
|
|||
}.launchIn(modelScope)
|
||||
}
|
||||
|
||||
private fun sendAnalytics(notifications: List<NotificationUM>, currency: CryptoCurrency) {
|
||||
if (notifications.any { it is NotificationUM.Error.TokenExceedsBalance }) {
|
||||
analyticsEventHandler.send(
|
||||
YieldSupplyAnalytics.NoticeNotEnoughFee(
|
||||
token = currency.symbol,
|
||||
blockchain = currency.network.name,
|
||||
),
|
||||
)
|
||||
}
|
||||
|
||||
if (notifications.any { it is NotificationUM.Info.YieldSupplyHighNetworkFee }) {
|
||||
analyticsEventHandler.send(
|
||||
YieldSupplyAnalytics.NoticeHighFee(
|
||||
token = currency.symbol,
|
||||
blockchain = currency.network.name,
|
||||
),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
private fun openTokenDetails(cryptoCurrency: CryptoCurrency) {
|
||||
appRouter.push(
|
||||
AppRoute.CurrencyDetails(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue