Skip to content

Commit

Permalink
fix type errors
Browse files Browse the repository at this point in the history
  • Loading branch information
storywithoutend committed Sep 20, 2023
1 parent 0fbb5ac commit a2970e8
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
3 changes: 2 additions & 1 deletion public/locales/en/transactionFlow.json
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,8 @@
"editRoles": {
"views": {
"main": {
"title": "Edit roles"
"title": "Edit roles",
"noneSet": "None set"
},
"editRole": {
"title": "Change {{role}}",
Expand Down
2 changes: 1 addition & 1 deletion src/transaction-flow/input/EditRoles/EditRoles.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,6 @@ describe('EditRoles', () => {
// Eth-record remove
await userEvent.click(within(screen.getByTestId('role-card-eth-record')).getByTestId('role-card-change-button'))
await userEvent.click(screen.getByRole('button', {name: 'action.remove'}))
expect(within(screen.getByTestId('role-card-eth-record')).getByText('None set')).toBeVisible()
expect(within(screen.getByTestId('role-card-eth-record')).getByText('input.editRoles.views.main.noneSet')).toBeVisible()
})
})
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { useTranslation } from 'react-i18next'
import styled, { css } from 'styled-components'

import { Space, Typography, mq } from '@ensdomains/thorin'
Expand Down Expand Up @@ -44,10 +45,11 @@ type Props = {
}

export const NoneSetAvatarWithIdentifier = ({ dirty = false, size = '10' }: Props) => {
const { t } = useTranslation('transactionFlow')
return (
<Container>
<Wrapper $size={size} $dirty={dirty} />
<Typography fontVariant="bodyBold">None set</Typography>
<Typography fontVariant="bodyBold">{t('input.editRoles.views.main.noneSet')}</Typography>
</Container>
)
}
4 changes: 3 additions & 1 deletion src/transaction-flow/input/SyncManager/SyncManager-flow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ const SyncManager = ({ data: { name }, dispatch, onDismiss }: Props) => {
const baseCanSynManager = checkCanSyncManager({
address: account.address,
nameType: nameType.data,
details,
registrant: details.ownerData?.registrant,
owner: details.ownerData?.owner,
dnsOwner: details.dnsOwner,
})

const syncType = nameType.data?.startsWith('dns') ? 'dns' : 'eth'
Expand Down

0 comments on commit a2970e8

Please sign in to comment.