File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -252,14 +252,17 @@ async function updateWalletConnectWhitelist(
252
252
}
253
253
254
254
export function getSpaceController ( space : string , network = NETWORK ) {
255
- const shibariumNetworkMap = {
256
- mainnet : '109' ,
257
- testnet : '157'
255
+ const tld = space . split ( '.' ) . slice ( - 1 ) [ 0 ] ;
256
+ const tldMapping = {
257
+ shib : {
258
+ mainnet : '109' ,
259
+ testnet : '157'
260
+ } ,
261
+ sonic : {
262
+ mainnet : '146'
263
+ }
258
264
} ;
265
+ const networkId = tldMapping [ tld ] ?. [ network ] ?? DEFAULT_NETWORK ;
259
266
260
- return snapshot . utils . getSpaceController (
261
- space ,
262
- space . endsWith ( '.shib' ) ? shibariumNetworkMap [ network ] : DEFAULT_NETWORK ,
263
- { broviderUrl }
264
- ) ;
267
+ return snapshot . utils . getSpaceController ( space , networkId , { broviderUrl } ) ;
265
268
}
You can’t perform that action at this time.
0 commit comments