You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
asyncbalance(accountName: NameType,symbolCode?: Asset.SymbolCodeType,contractName?: NameType): Promise<Asset>{constcontract=awaitthis.getContract(contractName)consttable=contract.table('accounts',accountName)lettableQueryif(symbolCode){tableQuery=table.get(String(symbolCode),{index_position: 'primary'})}else{tableQuery=table.get()}returntableQuery.then((accountBalance)=>{if(!accountBalance){thrownewError(`Account ${accountName} does not exist.`)}if(symbolCode&&!accountBalance.balance.symbol.code.equals(symbolCode)){thrownewError(`Symbol '${symbolCode}' does not exist.`)}returnaccountBalance?.balance}).catch((err)=>{thrownewError(`Failed to fetch balance for ${accountName}: ${err}`)})}
Thx
The text was updated successfully, but these errors were encountered:
The balance function does not allow all currencies associated with an account to be displayed.
Only the first currency in the list is visible
Thx
The text was updated successfully, but these errors were encountered: