mirror of
https://github.com/pezkuwichain/pezkuwi-telemetry.git
synced 2026-04-30 20:08:00 +00:00
Subscribe to chains by genesis hash (#395)
* Handle subscription by hash in the frontend * Forward-ported backend changes * Fix unit tests * Remove unused `chains_by_label` * fmt * Updated but failing E2E tests * subscribe by genesis hash in tests * fmt * Copy `BlockHash` instead of returning a ref * Pin chains by genesisHash Co-authored-by: James Wilson <james@jsdw.me>
This commit is contained in:
@@ -88,7 +88,7 @@ export function secondsWithPrecision(num: number): string {
|
||||
|
||||
export interface HashData {
|
||||
tab?: string;
|
||||
chain?: Types.ChainLabel;
|
||||
chain?: Types.GenesisHash;
|
||||
}
|
||||
|
||||
export function getHashData(): HashData {
|
||||
@@ -99,7 +99,7 @@ export function getHashData(): HashData {
|
||||
}
|
||||
|
||||
const [tab, rawChain] = hash.substr(1).split('/');
|
||||
const chain = decodeURIComponent(rawChain) as Types.ChainLabel;
|
||||
const chain = decodeURIComponent(rawChain) as Types.GenesisHash;
|
||||
|
||||
return { tab, chain };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user