@@ -15,13 +15,17 @@ import React, {
1515import { ErrorBoundary } from "react-error-boundary" ;
1616import * as ts from "typescript" ;
1717import type { Network } from "@/lib/types/network" ;
18- import { MultiAddress , paseo , roc , wnd } from "@polkadot-api/descriptors" ;
18+ import { MultiAddress , paseo , wnd , ksm , acala , paseoassethub , popnetworkpaseo } from "@polkadot-api/descriptors" ;
1919import { getWsProvider } from "polkadot-api/ws-provider/web" ;
2020import { withPolkadotSdkCompat } from "polkadot-api/polkadot-sdk-compat" ;
2121import { createClient } from "polkadot-api" ;
2222import { useWallet } from '@/hooks/useWallet' ;
2323import { useTheme } from "@/lib/theme/ThemeProvider" ;
2424import { getInjectedExtensions , connectInjectedExtension } from "polkadot-api/pjs-signer" ;
25+ import { getSmProvider } from "polkadot-api/sm-provider" ;
26+ import { chainSpec } from "polkadot-api/chains/polkadot" ;
27+ import { startFromWorker } from "polkadot-api/smoldot/from-worker" ;
28+ import { createConvictionVotingSdk } from "@polkadot-api/sdk-governance" ;
2529
2630const ALLOWED_MODULES : Record < string , unknown > = {
2731 react : React ,
@@ -32,11 +36,14 @@ const ALLOWED_MODULES: Record<string, unknown> = {
3236 } ,
3337 "polkadot-api/ws-provider/web" : { getWsProvider } ,
3438 "polkadot-api/polkadot-sdk-compat" : { withPolkadotSdkCompat } ,
35- "@polkadot-api/descriptors" : { paseo, roc , wnd, MultiAddress } ,
39+ "@polkadot-api/descriptors" : { paseo, ksm , acala , wnd, paseoassethub , MultiAddress, popnetworkpaseo } ,
3640 "polkadot-api" : { createClient } ,
3741 "@/hooks/useWallet" : { useWallet } ,
3842 "@/lib/theme/ThemeProvider" : { useTheme } ,
39- "polkadot-api/pjs-signer" : { getInjectedExtensions, connectInjectedExtension }
43+ "polkadot-api/pjs-signer" : { getInjectedExtensions, connectInjectedExtension } ,
44+ "polkadot-api/chains/polkadot" : { getSmProvider, chainSpec } ,
45+ "polkadot-api/smoldot/from-worker" : { startFromWorker } ,
46+ "@polkadot-api/sdk-governance" : { createConvictionVotingSdk } ,
4047} ;
4148
4249const COMPILER_OPTIONS : ts . CompilerOptions = {
@@ -297,8 +304,7 @@ const evaluateComponent = (code: string, network?: Network) => {
297304 useLayoutEffect,
298305 useImperativeHandle,
299306 } ;
300-
301- // Inject network data into the global scope
307+
302308 const networkCode = network ? `
303309 // Inject network data from props
304310 const __network__ = ${ JSON . stringify ( network ) } ;
0 commit comments