Skip to content

Commit dcba9c5

Browse files
committed
refactor: clean up code formatting for consistency and readability
1 parent 646fb9e commit dcba9c5

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

governance/xc_admin/packages/xc_admin_common/src/programs/core/core_functions.ts

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -219,9 +219,6 @@ export function getConfig(
219219
);
220220

221221
// Third pass: Extract mapping accounts and permission data
222-
const rawConfig: RawConfig = { mappingAccounts: [] };
223-
224-
// Process mapping accounts
225222
const processedProducts = new Map<string, boolean>();
226223
const mappingAccounts = accounts
227224
.filter(
@@ -250,22 +247,19 @@ export function getConfig(
250247
};
251248
});
252249

253-
rawConfig.mappingAccounts = mappingAccounts;
254-
255250
// Find permission account if it exists
256251
const permissionAccount = accounts.find(
257252
(account) =>
258253
parsedBaseDataMap.get(account.pubkey.toBase58())?.type ===
259254
AccountType.Permission,
260255
);
261256

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+
};
269263
}
270264

271265
/**

0 commit comments

Comments
 (0)