Skip to content

Commit

Permalink
feat: Create new package safe-kit (safe-global#877)
Browse files Browse the repository at this point in the history
  • Loading branch information
yagopv authored Jun 25, 2024
1 parent 4b8db6d commit 3e362a5
Show file tree
Hide file tree
Showing 28 changed files with 497 additions and 394 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/sdk-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
files: packages/account-abstraction-kit/coverage/lcov.info
files: packages/safe-kit/coverage/lcov.info
packages/api-kit/coverage/lcov.info
packages/auth-kit/coverage/lcov.info
packages/onramp-kit/coverage/lcov.info
Expand Down
217 changes: 0 additions & 217 deletions packages/account-abstraction-kit/src/AccountAbstraction.test.ts

This file was deleted.

118 changes: 0 additions & 118 deletions packages/account-abstraction-kit/src/AccountAbstraction.ts

This file was deleted.

3 changes: 0 additions & 3 deletions packages/account-abstraction-kit/src/index.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ describe('MoneriumPack', () => {

it('should throw an exception if no instance of the protocol kit is passed as parameter', async () => {
// @ts-expect-error - Throw and exception
await expect(moneriumPack.init()).rejects.toThrowError(
await expect(moneriumPack.init()).rejects.toThrow(
'You need to provide an instance of the protocol kit'
)
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ describe('SafeMoneriumClient', () => {
protocolKit.getChainId = jest.fn().mockResolvedValueOnce(80001n)
expect(await safeMoneriumClient.getChain()).toBe('polygon')
protocolKit.getChainId = jest.fn().mockResolvedValueOnce(300n)
expect(safeMoneriumClient.getChain()).rejects.toThrowError('Chain not supported: 300')
expect(safeMoneriumClient.getChain()).rejects.toThrow('Chain not supported: 300')
})

it('should map the protocol kit chainId to the Monerium Network types', async () => {
Expand All @@ -296,6 +296,6 @@ describe('SafeMoneriumClient', () => {
protocolKit.getChainId = jest.fn().mockResolvedValueOnce(80001n)
expect(await safeMoneriumClient.getNetwork()).toBe('mumbai')
protocolKit.getChainId = jest.fn().mockResolvedValueOnce(300n)
expect(safeMoneriumClient.getNetwork()).rejects.toThrowError('Network not supported: 300')
expect(safeMoneriumClient.getNetwork()).rejects.toThrow('Network not supported: 300')
})
})
2 changes: 1 addition & 1 deletion packages/onramp-kit/src/packs/stripe/StripePack.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ describe('StripePack', () => {

await stripePack.init()

await expect(stripePack.open(openOptions)).rejects.toThrowError(error)
await expect(stripePack.open(openOptions)).rejects.toThrow(error)
})

it('should try to get the session if a sessionId is provided', async () => {
Expand Down
Loading

0 comments on commit 3e362a5

Please sign in to comment.