You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
691 B
25 lines
691 B
# 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
|