File tree Expand file tree Collapse file tree 1 file changed +6
-12
lines changed
governance/xc_admin/packages/xc_admin_common/src/programs/core Expand file tree Collapse file tree 1 file changed +6
-12
lines changed Original file line number Diff line number Diff line change @@ -219,9 +219,6 @@ export function getConfig(
219
219
) ;
220
220
221
221
// Third pass: Extract mapping accounts and permission data
222
- const rawConfig : RawConfig = { mappingAccounts : [ ] } ;
223
-
224
- // Process mapping accounts
225
222
const processedProducts = new Map < string , boolean > ( ) ;
226
223
const mappingAccounts = accounts
227
224
. filter (
@@ -250,22 +247,19 @@ export function getConfig(
250
247
} ;
251
248
} ) ;
252
249
253
- rawConfig . mappingAccounts = mappingAccounts ;
254
-
255
250
// Find permission account if it exists
256
251
const permissionAccount = accounts . find (
257
252
( account ) =>
258
253
parsedBaseDataMap . get ( account . pubkey . toBase58 ( ) ) ?. type ===
259
254
AccountType . Permission ,
260
255
) ;
261
256
262
- if ( permissionAccount ) {
263
- rawConfig . permissionAccount = parsePermissionData (
264
- permissionAccount . account . data ,
265
- ) ;
266
- }
267
-
268
- return rawConfig ;
257
+ return {
258
+ mappingAccounts,
259
+ ...( permissionAccount && {
260
+ permissionAccount : parsePermissionData ( permissionAccount . account . data ) ,
261
+ } ) ,
262
+ } ;
269
263
}
270
264
271
265
/**
You can’t perform that action at this time.
0 commit comments