Updated on 2026-08-14
This commit is contained in:
parent
8163b80ad3
commit
8c165ef891
7 changed files with 12 additions and 3 deletions
|
|
@ -63,6 +63,11 @@ class DefaultLearn2earnInteractor(
|
|||
return awardAmount
|
||||
}
|
||||
|
||||
override fun getAwardNetworkName(): String {
|
||||
val networkId = promotion.getPromotionInfo().awardPaymentToken.networkId
|
||||
return userWalletManager.getNativeTokenForNetwork(networkId).name
|
||||
}
|
||||
|
||||
@Throws(IllegalArgumentException::class)
|
||||
override suspend fun requestAward(): Result<Unit> {
|
||||
val awardCurrency = getCurrencyForAward()
|
||||
|
|
|
|||
|
|
@ -21,6 +21,8 @@ interface Learn2earnInteractor : WebViewRedirectHandler {
|
|||
|
||||
fun getAwardAmount(): Int
|
||||
|
||||
fun getAwardNetworkName(): String
|
||||
|
||||
@Throws(IllegalArgumentException::class)
|
||||
suspend fun requestAward(): Result<Unit>
|
||||
|
||||
|
|
|
|||
|
|
@ -81,6 +81,7 @@ class Learn2earnViewModel @Inject constructor(
|
|||
.hideDialog()
|
||||
}
|
||||
val successDialog = MainScreenState.Dialog.Claimed(
|
||||
networkFullName = interactor.getAwardNetworkName(),
|
||||
onOk = onHideDialog,
|
||||
onDismissRequest = onHideDialog,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ private fun ClaimedDialog(dialog: MainScreenState.Dialog.Claimed) {
|
|||
Text(text = stringResource(id = R.string.common_success))
|
||||
},
|
||||
text = {
|
||||
Text(text = stringResource(id = R.string.main_promotion_credited))
|
||||
Text(text = stringResource(id = R.string.main_promotion_credited, dialog.networkFullName))
|
||||
},
|
||||
confirmButton = {
|
||||
TextButton(
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@ data class MainScreenState(
|
|||
sealed class Dialog {
|
||||
|
||||
data class Claimed(
|
||||
val networkFullName: String,
|
||||
val onOk: () -> Unit,
|
||||
val onDismissRequest: () -> Unit,
|
||||
) : Dialog()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue