# SPDX-License-Identifier: BSD-3-Clause # Copyright (c) 2021, The Wownero Project. from typing import Dict from enum import Enum class WowletState(Enum): IDLE = ["walletList", "walletClosed", "walletOpenedError", "walletCreatedError"] OPENED = ["walletOpened"] BOOTSTRAP = ["refreshSync"] SYNCHRONIZED = ["synchronized", "transactionError"] CREATING_TX = ["transactionStarted"] WALLET_OPERATIONAL = [WowletState.OPENED, WowletState.BOOTSTRAP, WowletState.SYNCHRONIZED] def decorator_parametrized(dec): def layer(*args, **kwargs): def repl(view_func): return dec(args[0], view_func, *args[1:], **kwargs) return repl return layer