rooch-network / rooch

VApp Container with Move Language for Bitcoin ecosystem
https://rooch.network
Apache License 2.0
162 stars 85 forks source link

[rooch-portal] Fix client error: Add null checks and input validation #2591

Closed nlyrthiia closed 1 month ago

nlyrthiia commented 2 months ago

Summary

With or without connect wallet, Nullish Checks and Input Validation are not handled for key values resulting in constant error messages from the client, and Handling Invalid Inputs is not handled when extractCoinInfoContent is retrieved resulting in incorrect requests and incorrect return values.

11831725672003_ pic 11841725680876_ pic 11851725680903_ pic 12191725727894_ pic 12211725728489_ pic

Fix:

Add Nullish Checks to all relevant values and Input Validation and Handling Invalid Inputs to methods to enhance code fault tolerance, reduce user-client anomalies, and reduce invalid requests sent.

12241725729991_ pic

vercel[bot] commented 2 months ago

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

Name Status Preview Comments Updated (UTC)
rooch ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 16, 2024 1:21am
rooch-portal ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 16, 2024 1:21am
rooch-portal-v2.1 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 16, 2024 1:21am
jolestar commented 2 months ago

@wow-sven @jojoo-eth Please help review.