Skip to content

Commit

Permalink
feat: add amoy to useAuth hook (#875)
Browse files Browse the repository at this point in the history
* feat: add amoy to useAuth hook
  • Loading branch information
braianj authored Jul 22, 2024
1 parent be9216d commit b05ec7e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
5 changes: 5 additions & 0 deletions src/hooks/useAuth.stories.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,11 @@ export const ConnectExample = () => {
value: ChainId.MATIC_MAINNET,
text: 'MATIC_MAINNET',
},
{
key: ChainId.MATIC_AMOY,
value: ChainId.MATIC_AMOY,
text: 'MATIC_AMOY',
},
]}
/>
</div>
Expand Down
1 change: 1 addition & 0 deletions src/hooks/useAuth.utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export const chains = [
ChainId.ETHEREUM_SEPOLIA,
ChainId.MATIC_MAINNET,
ChainId.MATIC_MUMBAI,
ChainId.MATIC_AMOY,
]

export enum AuthEvent {
Expand Down
8 changes: 4 additions & 4 deletions src/utils/api/Catalyst.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,10 @@ describe('utils/api/Catalyst', () => {
test(`should return an instance of a Catalyst`, async () => {
const catalyst = Catalyst.getInstance()
const profile = await catalyst.getProfile(
'0x05d48ee3e815bf376fc79d283301cfdef872e280'
'0xd9b96b5dc720fc52bede1ec3b40a930e15f70ddd'
)
expect((profile?.ethAddress || '').toLowerCase()).toEqual(
'0x05d48ee3e815bf376fc79d283301cfdef872e280'
'0xd9b96b5dc720fc52bede1ec3b40a930e15f70ddd'
)
})
})
Expand All @@ -102,12 +102,12 @@ describe('utils/api/Catalyst', () => {
test(`should return an instance of a Catalyst`, async () => {
const catalyst = Catalyst.getInstance()
const profiles = await catalyst.getProfiles([
'0x05d48ee3e815bf376fc79d283301cfdef872e280',
'0xd9b96b5dc720fc52bede1ec3b40a930e15f70ddd',
])
expect(Array.isArray(profiles)).toBe(true)
expect(profiles.length).toBe(1)
expect((profiles[0]?.ethAddress || '').toLowerCase()).toEqual(
'0x05d48ee3e815bf376fc79d283301cfdef872e280'
'0xd9b96b5dc720fc52bede1ec3b40a930e15f70ddd'
)
})
})
Expand Down

0 comments on commit b05ec7e

Please sign in to comment.