Bronze_Badges/seun-Choice-Coin-Python/helpers.py
def calculate_votes(addresses: list, client):
    """Calculate the result of a voting process."""
    results = []
    for addr in addresses:
        account_info = client.account_info(addr)
        assets = account_info.get("assets")

        for _asset in assets:
            if _asset["asset-id"] == ASSET_ID:
                amount = _asset.get("amount")
                results.append(amount)

    return results
Calculate the result of a voting process.
Calculate the result of a voting process.
Calculate the result of a voting process .
def calculate_votes(addresses: list, client):
    results = []
    for addr in addresses:
        account_info = client.account_info(addr)
        assets = account_info.get("assets")
        for _asset in assets:
            if _asset["asset-id"] == ASSET_ID:
                amount = _asset.get("amount")
                results.append(amount)
    return results
def calculate_votes ( addresses : list , client ) : results = [ ] for addr in addresses : account_info = client . account_info ( addr ) assets = account_info . get ( "assets" ) for _asset in assets : if _asset [ "asset-id" ] == ASSET_ID : amount = _asset . get ( "amount" ) results . append ( amount ) return results
Calculate the result of a voting process.
Calculate the result of a voting process .
"""Calculate the result of a voting process."""
addresses
list
client