Commit bfbd0ca
Fix the hash badge's unreachable IPFS URL check
The gateway-aware validity check in NFTHashStatus sat behind
'originalUri' in nftPreview, but NFTPreviewState has no originalUri
field, so the guard always returned early: isValidURI stayed true, the
'URL is not valid' badge never showed for unfetchable ipfs URIs, and
the ipfsToGatewayUrl path was dead code (Bugbot, PR Chia-Network#3029).
The check now validates nftPreview.uri directly. Message precedence is
unchanged: a file that already verified from the cache still reports
'Hash matches' - the URL branch is only reached for unverified states,
which is exactly when an unfetchable URI is the thing worth reporting.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017NXWAjaHb9SFafLeguTHd81 parent 862ad56 commit bfbd0ca
1 file changed
Lines changed: 9 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
41 | 43 | | |
42 | 44 | | |
43 | 45 | | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
53 | 52 | | |
54 | 53 | | |
55 | 54 | | |
| |||
0 commit comments