forked from rhinestonewtf/module-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add fallback to get installed modules
- Loading branch information
Showing
7 changed files
with
171 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
test/unit/account/account-types/erc7579-implementation/getInstalledModules.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { getAccount, getInstalledModules } from 'src' | ||
import { getClient } from 'src' | ||
import { MockAccountDeployed } from 'test/utils/mocks/account' | ||
import { MockClient } from 'test/utils/mocks/client' | ||
|
||
describe('Get installed modules', () => { | ||
// Setup | ||
const client = getClient(MockClient) | ||
const account = getAccount(MockAccountDeployed) | ||
|
||
it('Should return the installed modules', async () => { | ||
const installedModules = await getInstalledModules({ | ||
client, | ||
account, | ||
}) | ||
|
||
expect(installedModules.length).toBeGreaterThan(0) | ||
}) | ||
}) |
19 changes: 19 additions & 0 deletions
19
test/unit/account/account-types/safe/getInstalledModules.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { getAccount, getInstalledModules } from 'src' | ||
import { getClient } from 'src' | ||
import { MockSafeAccountDeployed } from 'test/utils/mocks/account' | ||
import { MockClient } from 'test/utils/mocks/client' | ||
|
||
describe('Get installed modules', () => { | ||
// Setup | ||
const client = getClient(MockClient) | ||
const account = getAccount(MockSafeAccountDeployed) | ||
|
||
it('Should return the installed modules', async () => { | ||
const installedModules = await getInstalledModules({ | ||
client, | ||
account, | ||
}) | ||
|
||
expect(installedModules.length).toBeGreaterThan(0) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters