Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 29 additions & 25 deletions src/pages/native/BalanceInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -191,35 +191,39 @@ export default {
}
},
async loadCoinList() {
const coins = await this.$store.$api.getTableRows({
code: 'tokenmanager',
limit: '1000',
scope: 'tokenmanager',
table: 'tokens',
});
try {
const coins = await this.$store.$api.getTableRows({
code: 'tokenmanager',
limit: '1000',
scope: 'tokenmanager',
table: 'tokens',
});

filtered.forEach((token) => {
const [precision, symbol] = token.token_symbol.split(',');
const account = token.contract_account;
if (account === 'eosio.token' && symbol === 'TLOS') {
return;
}
coins.rows.forEach((token) => {
const [precision, symbol] = token.token_symbol.split(',');
const account = token.contract_account;
if (account === 'eosio.token' && symbol === 'TLOS') {
return;
}

const name = token.token_name;
const icon = token.logo_sm;
const amount = 0;
const price = 0;
const name = token.token_name;
const icon = token.logo_sm;
const amount = 0;
const price = 0;

this.coins.push({
account,
name,
symbol,
amount,
price,
icon,
precision,
this.coins.push({
account,
name,
symbol,
amount,
price,
icon,
precision,
});
});
});
} catch (error) {
console.error('Error loading coins:', error);
}
},
async loadPrices() {
const tlosUsdDataPoints = await this.$store.$api.getTableRows({
Expand Down