mirror of
https://github.com/orionprotocol/sdk.git
synced 2026-03-15 14:42:38 +03:00
Exchanges / more error messages
This commit is contained in:
@@ -6,6 +6,8 @@ export default function isNetworkCodeInEnvironment(networkCode: string, env: str
|
||||
}
|
||||
const envInfo = envs[env];
|
||||
const envNetworks = envInfo?.networks;
|
||||
if (envNetworks === undefined) throw new Error('Env networks is undefined (isNetworkCodeInEnvironment)');
|
||||
|
||||
return Object.values(chains)
|
||||
.some((chain) => chain.code.toLowerCase() === networkCode.toLowerCase()
|
||||
&& chain.chainId in envNetworks);
|
||||
|
||||
Reference in New Issue
Block a user