Beispiel #1
0
async def withdraw_bulk(*args, **kwargs):
    try:
        WithdrawValidator.validate_withdraw(kwargs)
    except Exception as e:
        return WithdrawValidator.error_400(str(e))

    try:
        request = await withdraw_handler.withdraw_bulk(*args, **kwargs)
    except Exception as e:
        return WithdrawValidator.error_500(str(e))
    return request
Beispiel #2
0
async def send_to_cold_wallet(*args, **kwargs):
    try:
        WithdrawValidator.validate_withdraw(kwargs)
        WithdrawValidator.validate_cold_wallet_address(kwargs)
    except Exception as e:
        return WithdrawValidator.error_400(str(e))

    try:
        request = await withdraw_handler.withdraw(*args, **kwargs)
    except Exception as e:
        return WithdrawValidator.error_500(str(e))
    return request