Show pool addresses in a scrollable div with href

This commit is contained in:
nymkappa
2022-02-11 19:10:29 +09:00
parent 9e64592aca
commit 763ea0ce6f
3 changed files with 26 additions and 5 deletions

View File

@@ -49,6 +49,13 @@ export class PoolComponent implements OnInit {
return this.apiService.getPoolStats$(this.poolId, params[1] ?? '1w');
}),
map((poolStats) => {
let regexes = '"';
for (const regex of JSON.parse(poolStats.pool.regexes)) {
regexes += regex + '", "';
}
poolStats.pool.regexes = regexes.slice(0, -3);
poolStats.pool.addresses = JSON.parse(poolStats.pool.addresses);
return Object.assign({
logo: `./resources/mining-pools/` + poolStats.pool.name.toLowerCase().replace(' ', '').replace('.', '') + '.svg'
}, poolStats);