Merge branch 'mononaut/acceleration-viz' into nymkappa/accelerator-soft-launch

This commit is contained in:
nymkappa
2023-08-03 15:43:28 +09:00
74 changed files with 1191 additions and 468 deletions

View File

@@ -67,7 +67,8 @@ export class ElectrsApiService {
}
getPubKeyAddress$(pubkey: string): Observable<Address> {
return this.getScriptHash$('41' + pubkey + 'ac').pipe(
const scriptpubkey = (pubkey.length === 130 ? '41' : '21') + pubkey + 'ac';
return this.getScriptHash$(scriptpubkey).pipe(
switchMap((scripthash: ScriptHash) => {
return of({
...scripthash,

View File

@@ -96,7 +96,7 @@ export class MiningService {
share: parseFloat((poolStat.blockCount / stats.blockCount * 100).toFixed(2)),
lastEstimatedHashrate: (poolStat.blockCount / stats.blockCount * stats.lastEstimatedHashrate / hashrateDivider).toFixed(2),
emptyBlockRatio: (poolStat.emptyBlocks / poolStat.blockCount * 100).toFixed(2),
logo: `/resources/mining-pools/` + poolStat.name.toLowerCase().replace(' ', '').replace('.', '') + '.svg',
logo: `/resources/mining-pools/` + poolStat.slug + '.svg',
...poolStat
};
});

View File

@@ -113,7 +113,7 @@ export class WebsocketService {
this.stateService.connectionState$.next(2);
}
if (this.stateService.connectionState$.value === 1) {
if (this.stateService.connectionState$.value !== 2) {
this.stateService.connectionState$.next(2);
}