Ejemplo n.º 1
0
async def handle_Initialize(ctx: wire.Context, msg: Initialize) -> Features:
    if msg.state is None or msg.state != cache.get_state(
            prev_state=bytes(msg.state)):
        cache.clear()
        if msg.skip_passphrase:
            cache.set_passphrase("")
    return get_features()
Ejemplo n.º 2
0
async def handle_Initialize(ctx: wire.Context, msg: Initialize) -> Features:
    if msg.session_id is None or msg.session_id != cache.get_session_id():
        cache.clear()
    return get_features()
Ejemplo n.º 3
0
async def handle_ClearSession(ctx: wire.Context, msg: ClearSession) -> Success:
    cache.clear(keep_passphrase=True)
    return Success(message="Session cleared")
def wipe() -> None:
    config.wipe()
    cache.clear()