Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- run: corepack enable
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version-file: .nvmrc
cache: pnpm
Expand All @@ -41,7 +41,7 @@ jobs:
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- run: corepack enable
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version-file: .nvmrc
cache: pnpm
Expand All @@ -59,7 +59,7 @@ jobs:
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- run: corepack enable
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version-file: .nvmrc
cache: pnpm
Expand All @@ -73,7 +73,7 @@ jobs:
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- run: corepack enable
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: 26
cache: pnpm
Expand All @@ -90,7 +90,7 @@ jobs:
with:
fetch-depth: 0
- run: corepack enable
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version-file: .nvmrc
cache: pnpm
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
24.21.0
24.22.2
6 changes: 4 additions & 2 deletions biome.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://biomejs.dev/schemas/2.5.13/schema.json",
"$schema": "https://biomejs.dev/schemas/2.6.4/schema.json",
"assist": { "actions": { "source": { "organizeImports": "on" } } },
"vcs": {
"clientKind": "git",
Expand All @@ -21,5 +21,7 @@
"quoteStyle": "single",
"semicolons": "asNeeded"
}
}
},
"markdown": { "formatter": { "enabled": false } },
"yaml": { "formatter": { "enabled": false } }
}
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"private": true,
"version": "2.6.0",
"type": "module",
"packageManager": "pnpm@12.4.2",
"packageManager": "pnpm@12.16.1",
"engines": {
"node": ">=24.15.0"
},
Expand Down Expand Up @@ -52,8 +52,8 @@
"graphql-request": "^7.4.0",
"next-themes": "^0.4.6",
"porto": "^0.2.37",
"react": "19.3.0",
"react-dom": "19.3.0",
"react": "19.3.1",
"react-dom": "19.3.1",
"react-error-boundary": "^6.1.5",
"react-jazzicon": "^1.0.4",
"react-number-format": "^5.4.5",
Expand All @@ -63,7 +63,7 @@
"zod": "^4.6.5"
},
"devDependencies": {
"@biomejs/biome": "2.5.13",
"@biomejs/biome": "2.6.4",
"@commitlint/cli": "^21.2.2",
"@commitlint/config-conventional": "^21.2.2",
"@graphql-codegen/cli": "^7.4.1",
Expand Down Expand Up @@ -96,7 +96,7 @@
"vite": "^8.3.0",
"vite-plugin-sitemap": "^0.8.2",
"vitest": "^5.0.1",
"vocs": "2.9.0",
"waku": "1.0.0-rc.0"
"vocs": "2.12.0",
"waku": "1.0.0-rc.4"
}
}
945 changes: 489 additions & 456 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

35 changes: 15 additions & 20 deletions src/components/sharedComponents/TokenInput/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -132,20 +132,19 @@ const TokenInput: FC<Props> = ({
setAmountError(error?.message)
}

const CurrentToken = () =>
selectedToken ? (
<>
<Icon $iconSize={selectIconSize}>
<TokenLogo
size={selectIconSize}
token={selectedToken}
/>
</Icon>
{selectedToken.symbol}
</>
) : (
'Select'
)
const currentToken = selectedToken ? (
<>
<Icon $iconSize={selectIconSize}>
<TokenLogo
size={selectIconSize}
token={selectedToken}
/>
</Icon>
{selectedToken.symbol}
</>
) : (
'Select'
)

return singleToken && !selectedToken ? (
<div>When single token is true, a token is required.</div>
Expand Down Expand Up @@ -177,14 +176,10 @@ const TokenInput: FC<Props> = ({
value={amount}
/>
{singleToken ? (
<SingleToken>
<CurrentToken />
</SingleToken>
<SingleToken>{currentToken}</SingleToken>
) : (
<Dialog.Trigger asChild>
<DropdownButton>
<CurrentToken />
</DropdownButton>
<DropdownButton>{currentToken}</DropdownButton>
</Dialog.Trigger>
)}
</TopRow>
Expand Down
10 changes: 5 additions & 5 deletions src/components/sharedComponents/WalletStatusVerifier.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ const system = createSystem(defaultConfig)
const renderWithChakra = (ui: ReactNode) =>
render(<ChakraProvider value={system}>{ui}</ChakraProvider>)

const ChildComponent = () => {
const { address } = useWeb3StatusConnected()
return createElement('div', { 'data-testid': 'address' }, address)
}

describe('WalletStatusVerifier', () => {
beforeEach(() => {
vi.clearAllMocks()
Expand Down Expand Up @@ -187,11 +192,6 @@ describe('WalletStatusVerifier', () => {
web3Status: mockWeb3Status,
})

const ChildComponent = () => {
const { address } = useWeb3StatusConnected()
return createElement('div', { 'data-testid': 'address' }, address)
}

renderWithChakra(createElement(WalletStatusVerifier, null, createElement(ChildComponent)))

expect(screen.getByTestId('address')).toHaveTextContent('0xdeadbeef')
Expand Down
2 changes: 1 addition & 1 deletion src/utils/strings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export const getTruncatedHash = (hash: string, length = 6): string => {
const min = 1
const max = 16

return length < min ? min : length > max ? max : length
return Math.min(Math.max(length, min), max)
}

const sanitizedLength = sanitizeLength(length)
Expand Down
30 changes: 14 additions & 16 deletions src/utils/suspenseWrapper.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,16 @@ const SuspendedComponent = () => {
throw new Promise(() => {})
}

function makeErrorComponent(message: string) {
return function ErrorComponent() {
throw new Error(message)
}
const ErrorComponent = () => {
throw new Error('Fetch failed')
}

// Use an external flag so React 19 retries also throw (React retries after first throw
// before giving up to the error boundary, which would reset renderCount-based approaches)
const recoveryState = { shouldThrow: true }
const RecoveryComponent = () => {
if (recoveryState.shouldThrow) throw new Error('Persistent error')
return <div>Recovered</div>
}

describe('withSuspense', () => {
Expand All @@ -54,15 +60,15 @@ describe('withSuspense', () => {
})

it('shows default error message when component throws', async () => {
const Wrapped = withSuspense(makeErrorComponent('boom'))
const Wrapped = withSuspense(ErrorComponent)
wrap(<Wrapped />)
await waitFor(() => {
expect(screen.getByText('Something went wrong...')).toBeDefined()
})
})

it('shows custom errorFallback text when provided', async () => {
const Wrapped = withSuspense(makeErrorComponent('boom'))
const Wrapped = withSuspense(ErrorComponent)
wrap(<Wrapped errorFallback="Custom error text" />)
await waitFor(() => {
expect(screen.getByText('Custom error text')).toBeDefined()
Expand All @@ -84,7 +90,7 @@ describe('withSuspenseAndRetry', () => {
})

it('shows error message and Try Again button when component throws', async () => {
const Wrapped = withSuspenseAndRetry(makeErrorComponent('Fetch failed'))
const Wrapped = withSuspenseAndRetry(ErrorComponent)
wrap(<Wrapped />, true)
await waitFor(() => {
expect(screen.getByText('Fetch failed')).toBeDefined()
Expand All @@ -93,22 +99,14 @@ describe('withSuspenseAndRetry', () => {
})

it('resets error boundary when Try Again is clicked', async () => {
// Use an external flag so React 19 retries also throw (React retries after first throw
// before giving up to the error boundary, which would reset renderCount-based approaches)
const state = { shouldThrow: true }
const RecoveryComponent = () => {
if (state.shouldThrow) throw new Error('Persistent error')
return <div>Recovered</div>
}

const Wrapped = withSuspenseAndRetry(RecoveryComponent)
wrap(<Wrapped />, true)

await waitFor(() => {
expect(screen.getByText('Persistent error')).toBeDefined()
})

state.shouldThrow = false
recoveryState.shouldThrow = false
fireEvent.click(screen.getByText('Try Again'))

await waitFor(() => {
Expand Down
Loading