Updated on 2026-08-14

This commit is contained in:
Tangem 2020-10-21 17:05:02 +03:00
parent 298ef986b3
commit 8a408774b8
8 changed files with 33 additions and 6 deletions

View file

@ -50,6 +50,8 @@ sealed class WalletAction : Action {
object Failure : WalletAction()
}
object DisablePayId: WalletAction()
data class LoadArtwork(val card: Card, val artworkId: String?) : WalletAction() {
data class Success(val artwork: Artwork) : WalletAction()
object Failure : WalletAction()

View file

@ -176,6 +176,9 @@ private fun internalReduce(action: Action, state: AppState): WalletState {
is WalletAction.LoadPayId.NotCreated -> newState = newState.copy(
payIdData = PayIdData(PayIdState.NotCreated, null)
)
is WalletAction.DisablePayId -> newState = newState.copy(
payIdData = PayIdData(PayIdState.Disabled, null)
)
is WalletAction.CreatePayId, is WalletAction.CreatePayId.Failure ->
newState = newState.copy(
walletDialog = WalletDialog.CreatePayIdDialog(CreatingPayIdState.EnterPayId)