WalletConnect / web3modal

A single Web3 provider solution for all Wallets
https://web3modal.com
Apache License 2.0
4.67k stars 1.28k forks source link

chore: trim the query when searching for wallets #2167

Closed lukaisailovic closed 3 weeks ago

lukaisailovic commented 4 weeks ago

When searching for wallets we would send any whitespace as well which would present us with "no wallets" screen.

Made two changes:

vercel[bot] commented 4 weeks ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
web3modal-demo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 25, 2024 6:09pm
web3modal-gallery ✅ Ready (Inspect) Visit Preview Apr 25, 2024 6:09pm
web3modal-laboratory ✅ Ready (Inspect) Visit Preview Apr 25, 2024 6:09pm
lukaisailovic commented 4 weeks ago

Wondering if this should be inside of ApiController directly + test?

@tomiir Thats a good point. I think I will have to trim on the UI layer to not trigger additional requests (changed if condition).

Do you think we should add trimming to the controller in addition to the current logic?

chris13524 commented 4 weeks ago

+1 on a test for this

github-actions[bot] commented 3 weeks ago

Coverage Report for Coverage

Status Category Percentage Covered / Total
🔵 Lines 81.49% 2520 / 14979
🔵 Statements 81.49% 2520 / 14979
🔵 Functions 89.71% 122 / 509
🔵 Branches 119.62% 182 / 484
File Coverage
File Stmts % Branch % Funcs % Lines Uncovered Lines
Changed Files
packages/core/src/controllers/ApiController.ts 93.49% 75% 77.77% 93.49% 53-54, 117-118, 130, 220-224, 240-245
Generated in workflow #3323