We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 68a7c71 commit 3f1ca57Copy full SHA for 3f1ca57
1 file changed
src/CPK.ts
@@ -330,11 +330,7 @@ class CPK {
330
if (!this.#contract) {
331
throw new Error('CPK contract uninitialized')
332
}
333
- const modules = await this.#contract.call('getModules', [])
334
- const selectedModules = modules.filter(
335
- (module: Address) => module.toLowerCase() === moduleAddress.toLowerCase()
336
- )
337
- return selectedModules.length > 0
+ return await this.#contract.call('isModuleEnabled', [moduleAddress])
338
339
340
async enableModule(moduleAddress: Address): Promise<TransactionResult> {
0 commit comments