Method
assertChainId
(
network: { chainId: string },
connection: ApiPromiseConnection,
)
Source from the content-addressed store, hash-verified
| 400 | |
| 401 | // Polkadot uses genesis hash instead of chainId |
| 402 | protected assertChainId( |
| 403 | network: { chainId: string }, |
| 404 | connection: ApiPromiseConnection, |
| 405 | ): void { |
| 406 | if (network.chainId !== connection.networkMeta.genesisHash) { |
| 407 | throw new MetadataMismatchError( |
| 408 | 'ChainId', |
| 409 | network.chainId, |
| 410 | connection.networkMeta.genesisHash, |
| 411 | ); |
| 412 | } |
| 413 | } |
| 414 | } |
Tested by
no test coverage detected