Skip to content

Commit

Permalink
Fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
LeonmanRolls committed Oct 24, 2024
1 parent 372d4a8 commit c2e6188
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
3 changes: 2 additions & 1 deletion public/locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@
"noPrimaryName": "No Primary Name",
"viewProfile": "View Profile",
"viewDetails": "View Details",
"register": "Register"
"register": "Register",
"myWallet": "My Wallet"
},
"name": {
"registered": "Registered",
Expand Down
11 changes: 6 additions & 5 deletions src/components/ConnectButton.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { useConnectModal } from '@usecapsule/rainbowkit'
import { Key, ReactNode, useEffect } from 'react'
import { Key, ReactNode } from 'react'
import { useTranslation } from 'react-i18next'
import styled, { css } from 'styled-components'
import type { Address } from 'viem'
import { useAccount, useDisconnect, useEnsAvatar } from 'wagmi'
import { Config, useDisconnect, useEnsAvatar } from 'wagmi'

import {
Button,
Expand All @@ -14,6 +14,7 @@ import {
mq,
PersonSVG,
Profile,
WalletSVG,
} from '@ensdomains/thorin'
import { DropdownItem } from '@ensdomains/thorin/dist/types/components/molecules/Dropdown/Dropdown'

Expand Down Expand Up @@ -107,7 +108,7 @@ const calculateTestId = (isTabBar: boolean | undefined, inHeader: boolean | unde
return 'connect-button'
}

const getIsCapsuleConnected = (wagmiState: any) => {
const getIsCapsuleConnected = (wagmiState: Config['state']) => {
const capsuleIntegratedConnection = Array.from(wagmiState.connections.values()).find(
(connection) => connection?.connector?.id === 'capsule-integrated',
)
Expand Down Expand Up @@ -197,9 +198,9 @@ const HeaderProfile = ({ address }: { address: Address }) => {
},
isCapsuleConnected
? {
label: 'Capsule',
label: t('wallet.myWallet'),
color: 'text',
icon: <CheckSVG />,
icon: <WalletSVG />,
wrapper: (children: ReactNode, key: Key) => (
<BaseLink href="https://connect.usecapsule.com/" key={key}>
{children}
Expand Down
2 changes: 1 addition & 1 deletion src/utils/query/loadCapsule.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { reconnect } from '@wagmi/core'
import { Connector, reconnect } from '@wagmi/core'

import { prefix, wagmiConfig } from './wagmi'

Expand Down

0 comments on commit c2e6188

Please sign in to comment.