*pokt-rpc-endpoints needs to be imported dynamically
This commit is contained in:
parent
d0b65f4dc2
commit
b9bb588a35
|
@ -1,10 +1,14 @@
|
|||
import chainNetworks from "@lumeweb/pokt-rpc-endpoints";
|
||||
let chainNetworks: networks;
|
||||
|
||||
dynImport("@lumeweb/pokt-rpc-endpoints").then(
|
||||
(module) => (chainNetworks = module as any)
|
||||
);
|
||||
|
||||
type networks = { [net: string]: string };
|
||||
|
||||
export function maybeMapChainId(chain: string): string | boolean {
|
||||
if (chain in chainNetworks) {
|
||||
return (chainNetworks as networks)[chain];
|
||||
return chainNetworks[chain];
|
||||
}
|
||||
|
||||
if (
|
||||
|
|
Loading…
Reference in New Issue