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
…fter request creation
…ssage confirmation time
| } | ||
|
|
||
| // Handle error objects without message property | ||
| 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 28 days ago
In general, to fix a “useless conditional” you should remove any redundant boolean checks or fallback expressions that cannot change the result given the surrounding control flow and types. Here, the earlier if (!error) guard ensures error is always truthy from that point on, so error || '' can never produce ''. We still want the behavior “if it’s an Error, use its message; otherwise convert the value to string”, but we don’t need the useless || '' for that.
The best minimal fix is to change line 44 from:
const message = error instanceof Error ? error.message : String(error || '');to:
const message = error instanceof Error ? error.message : String(error);This keeps the same observable behavior for all values that can actually reach this line, removes the statically useless || '', and addresses CodeQL’s complaint. No imports, new methods, or other definitions are needed, and no surrounding logic has to change. The change is confined to libs/burn-waitlist/src/lib/waitlist-page.tsx within the sanitizeErrorMessage function.
| @@ -41,7 +41,7 @@ | ||
| } | ||
|
|
||
| // Handle error objects without message property | ||
| const message = error instanceof Error ? error.message : String(error || ''); | ||
| const message = error instanceof Error ? error.message : String(error); | ||
|
|
||
| if (!message || message.trim() === '') { | ||
| return undefined; |
|
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: