Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if not USER_ONLINE:
return
mpub = wallet_obj.serialize_b58(private=False)
wallet_name = get_blockcypher_walletname_from_mpub(
mpub=mpub,
subchain_indices=[0, 1],
)
verbose_print('Wallet Name: %s' % wallet_name)
verbose_print('API Key: %s' % BLOCKCYPHER_API_KEY)
coin_symbol = coin_symbol_from_mkey(mpub)
wallet_details = get_wallet_balance(
wallet_name=wallet_name,
api_key=BLOCKCYPHER_API_KEY,
coin_symbol=coin_symbol,
)
verbose_print(wallet_details)
puts('-' * 70 + '\n')
balance_str = 'Balance: %s' % (
format_crypto_units(
input_quantity=wallet_details['final_balance'],
input_type='satoshi',
output_type=UNIT_CHOICE,
coin_symbol=coin_symbol,
print_cs=True,
))
puts(colored.green(balance_str))
if not USER_ONLINE:
return
mpub = wallet_obj.serialize_b58(private=False)
wallet_name = get_blockcypher_walletname_from_mpub(
mpub=mpub,
subchain_indices=[0, 1],
)
verbose_print('Wallet Name: %s' % wallet_name)
verbose_print('API Key: %s' % BLOCKCYPHER_API_KEY)
coin_symbol = coin_symbol_from_mkey(mpub)
wallet_details = get_wallet_balance(
wallet_name=wallet_name,
api_key=BLOCKCYPHER_API_KEY,
coin_symbol=coin_symbol,
)
verbose_print(wallet_details)
puts('-' * 70 + '\n')
balance_str = 'Balance: %s' % (
format_crypto_units(
input_quantity=wallet_details['final_balance'],
input_type='satoshi',
output_type=UNIT_CHOICE,
coin_symbol=coin_symbol,
print_cs=True,
))
puts(colored.green(balance_str))