Conversation
* feat: hardcoded chains for keplr * chore: self review
* chore: savepoint * chore: savepoint * feat: erc20 bridge * chore: self review * fix: devnet url * feat: add devnet * chore: self review * fix: addresses * feat: tokens fetcher * chore: savepoint * chore: api for tokens * fix: bridge allowance * chore: savepoint * feat: use bridge state * chore: self review * fix: balances from sepolia * chore: prettier * fix: explorer for devnet * feat: https * feat: token deployment page * fix: rpc url * fix: balances and token deployment * chore: cleanup logs * feat: logs parser * feat: correct handle remote token address * chore: self review * chore: precommit hook * chore: handle allowance with timers * chore: savepoint * feat: l2 to l1 orders list * chore: self review for bridge tokens/links * chore: self review * feat: correct devnet configs for time to prove checks * chore: correct chain switch for proving * chore: correct finilize steps * chore: review * feat: self review UI for bridge page * fix: header btns for bridge page * fix: reloading timers * chore: self review * chore: replace local storage usage * chore: review comments
* feat: upd wagmi lib * fix: build providers
* feat: restore withdraw by tx hash * chore: savecommit * feat: recover page with order creation * fix: linter issues * fix: types * fix: upd addresses * Potential fix for code scanning alert no. 390: Useless assignment to local variable Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> Signed-off-by: Rinat Fihtengolts <9-b-rinat@rambler.ru> --------- Signed-off-by: Rinat Fihtengolts <9-b-rinat@rambler.ru> Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
* fix: approve btn disable and chains in header * chore: savepoint refactored bridge page * feat: share by url support
* feat: use new testethic * chore: savepoint * chore: upd addresses * fix: build * fix: search tokens * chore: self review * fix: allowance checking * fix: bridge * chore: savepoint
* fix: pre release fixes * chore: savepoint * chore: reset token on chain id change * fix: validators count * fix: chain switch problem * fix: links
* fix: decrease RPC calls * fix: rename ISLM to ETH
* fix: correct chain switch on bridge page * chore: error block styles * fix: handle back chain switch
* chore: savepoint * chore: savepoint * feat: testethiq faucet support
This reverts commit 03a6f13.
* feat: add chart * feat: anon view for waitlist * chore: fix chain id * feat: add points and tooltip * feat: use recharts * fix: price chart token symbol * chore: applications price * fix: price value * chore: format
* feat: add chart * feat: anon view for waitlist * chore: fix chain id * feat: add points and tooltip * feat: use recharts * fix: price chart token symbol * chore: applications price * fix: price value * chore: format * feat: mint/burn page * chore: use testing node
| return undefined; | ||
| } | ||
|
|
||
| const message = error instanceof Error ? error.message : String(error || ''); |
Check warning
Code scanning / CodeQL
Useless conditional Warning
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI about 17 hours ago
In general, to fix this style of issue you remove conditionals whose branches are unreachable under the established type and control‑flow constraints, simplifying the expression while preserving behavior for all actually possible inputs.
Here, after if (!error) { return undefined; }, error is guaranteed to be truthy and of type Error. Thus error instanceof Error is always true, and String(error || '') is never used. The best fix is to:
- Replace the ternary on line 24 with direct access to
error.message. - Optionally use a non‑null assertion to satisfy TypeScript that
erroris non‑nullable at that point (or rely on control flow narrowing, depending on compiler settings).
Concretely, in libs/burn-waitlist/src/lib/mint-page.tsx, change line 24 from:
const message = error instanceof Error ? error.message : String(error || '');to:
const message = (error as Error).message;or, if strictNullChecks narrowing is active, simply:
const message = error.message;No new imports or helper methods are required.
| @@ -21,7 +21,7 @@ | ||
| return undefined; | ||
| } | ||
|
|
||
| const message = error instanceof Error ? error.message : String(error || ''); | ||
| const message = (error as Error).message; | ||
|
|
||
| if (!message || message.trim() === '') { | ||
| return undefined; |
| import { useMemo } from 'react'; | ||
| import { Button } from '@haqq/shell-ui-kit'; | ||
| import { ModalInput } from '@haqq/shell-ui-kit'; | ||
| import { formatUnits } from 'viem'; |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI about 17 hours ago
In general, unused imports should be removed to improve readability and avoid unnecessary dependencies in the bundle. Here, the best fix is to delete the unused formatUnits named import from the viem package in participation-form.tsx.
Concretely, edit libs/burn-waitlist/src/lib/components/participation-form.tsx and remove the line import { formatUnits } from 'viem'; (line 6). No other code changes are needed, as formatUnits is not referenced anywhere in the provided component. No additional methods, imports, or definitions are required to implement this change.
| @@ -3,7 +3,6 @@ | ||
| import { useMemo } from 'react'; | ||
| import { Button } from '@haqq/shell-ui-kit'; | ||
| import { ModalInput } from '@haqq/shell-ui-kit'; | ||
| import { formatUnits } from 'viem'; | ||
| import { FundsSource } from '../constants/waitlist-config'; | ||
| import { WaitlistBalances } from './waitlist-balances'; | ||
| import type { WaitlistBalancesResponse } from '../hooks/use-waitlist-balances'; |
| import { WaitlistBalances } from './waitlist-balances'; | ||
| import type { WaitlistBalancesResponse } from '../hooks/use-waitlist-balances'; | ||
| import { formatEthDecimal } from '@haqq/shell-shared'; | ||
| import { formatEthDecimal, formatNumberWithSuffix } from '@haqq/shell-shared'; |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI about 17 hours ago
To fix the problem, remove the unused named import formatNumberWithSuffix from the import statement, leaving only the actually used formatEthDecimal. This avoids changing any runtime behavior while satisfying the linter/static analyzer.
Concretely:
- In
libs/burn-waitlist/src/lib/components/participation-form.tsx, locate the import on line 10. - Change
import { formatEthDecimal, formatNumberWithSuffix } from '@haqq/shell-shared';toimport { formatEthDecimal } from '@haqq/shell-shared';. - No additional methods, definitions, or imports are required.
| @@ -7,7 +7,7 @@ | ||
| import { FundsSource } from '../constants/waitlist-config'; | ||
| import { WaitlistBalances } from './waitlist-balances'; | ||
| import type { WaitlistBalancesResponse } from '../hooks/use-waitlist-balances'; | ||
| import { formatEthDecimal, formatNumberWithSuffix } from '@haqq/shell-shared'; | ||
| import { formatEthDecimal } from '@haqq/shell-shared'; | ||
|
|
||
| export interface ParticipationFormProps { | ||
| amount: string; |
| mintHaqqByApplication: mintHaqqByApplicationTx, | ||
| isPending: isMintingByApp, | ||
| isConfirming: isConfirmingMintByApp, | ||
| isSuccess: isMintByAppSuccess, |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI about 17 hours ago
To fix the issue, we should remove the unused isMintByAppSuccess binding from the object destructuring of useMintHaqqByApplication. This eliminates the unused variable without altering any actual behavior, since it was never referenced.
Concretely:
- In
libs/burn-waitlist/src/lib/waitlist-page.tsx, locate the destructuring assignment fromuseMintHaqqByApplication(lines ~191–198). - Remove
isSuccess: isMintByAppSuccess,from that destructuring. - No new imports, methods, or definitions are required; we only simplify the existing destructure.
| @@ -192,7 +192,6 @@ | ||
| mintHaqqByApplication: mintHaqqByApplicationTx, | ||
| isPending: isMintingByApp, | ||
| isConfirming: isConfirmingMintByApp, | ||
| isSuccess: isMintByAppSuccess, | ||
| hash: mintByAppHash, | ||
| error: mintByAppError, | ||
| } = useMintHaqqByApplication(); |
| isPending: isMintingByApp, | ||
| isConfirming: isConfirmingMintByApp, | ||
| isSuccess: isMintByAppSuccess, | ||
| hash: mintByAppHash, |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI about 17 hours ago
In general, the fix is to remove the unused binding from the destructuring assignment so that only actually used properties are pulled from useMintHaqqByApplication(). This avoids unused-variable warnings without affecting runtime behavior.
Concretely, in libs/burn-waitlist/src/lib/waitlist-page.tsx, locate the destructuring of useMintHaqqByApplication() around line 191–198. Remove hash: mintByAppHash, from this destructuring while leaving the other bindings (mintHaqqByApplicationTx, isPending, isConfirming, isSuccess, error) intact. No new imports or helper functions are needed.
| @@ -193,7 +193,6 @@ | ||
| isPending: isMintingByApp, | ||
| isConfirming: isConfirmingMintByApp, | ||
| isSuccess: isMintByAppSuccess, | ||
| hash: mintByAppHash, | ||
| error: mintByAppError, | ||
| } = useMintHaqqByApplication(); | ||
|
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Description
Related Issue
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: