Commit 959d6fc
authored
feat: Hide unverified badge for trusted programs (#766)
## Description
Removed "unverified" badge for trusted programs.
## Type of change
<!-- Check the appropriate options that apply to this PR -->
- [x] Bug fix
- [x] New feature
- [ ] Protocol integration
- [ ] Documentation update
- [ ] Other (please describe):
## Screenshots
<img width="1195" height="315"
alt="localhost_3000_address_TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"
src="https://github.com/user-attachments/assets/149c6f2f-c10b-44d4-9bcb-f01a6e81b98e"
/>
## Testing
- Visit
http://localhost:3000/address/TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb
- See no "unverified" badge
## Related Issues
N/A
## Checklist
<!-- Verify that you have completed the following before requesting
review -->
- [x] My code follows the project's style guidelines
- [x] I have added tests that prove my fix/feature works
- [x] All tests pass locally and in CI
- [x] I have updated documentation as needed
- [x] CI/CD checks pass
- [x] I have included screenshots for protocol screens (if applicable)
- [ ] For security-related features, I have included links to related
information
<!-- ELLIPSIS_HIDDEN -->
----
> [!IMPORTANT]
> Hide "unverified" badge for trusted Solana programs in
`ProgramHeader.tsx` and add tests in `AccountHeader.spec.tsx`.
>
> - **Behavior**:
> - Hides "unverified" badge for trusted programs in `ProgramHeader.tsx`
using `PROGRAMS_SKIP_UNVERIFIED_BADGE`.
> - Trusted programs include 'Token Program', 'Token-2022 Program', and
'Associated Token Program'.
> - Badge still shown for non-trusted programs.
> - **Tests**:
> - Added tests in `AccountHeader.spec.tsx` to verify badge is hidden
for trusted programs and shown for others.
> - Utilizes `PROGRAMS_SKIP_UNVERIFIED_BADGE` for test cases.
> - **Misc**:
> - Added `PROGRAMS_SKIP_UNVERIFIED_BADGE` constant to
`ProgramHeader.tsx` to manage trusted programs.
>
> <sup>This description was created by </sup>[<img alt="Ellipsis"
src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=solana-foundation%2Fexplorer&utm_source=github&utm_medium=referral)<sup>
for c490914. You can
[customize](https://app.ellipsis.dev/solana-foundation/settings/summaries)
this summary. It will automatically update as commits are pushed.</sup>
<!-- ELLIPSIS_HIDDEN -->1 parent abe02ed commit 959d6fc
2 files changed
+55
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
157 | 158 | | |
158 | 159 | | |
159 | 160 | | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
160 | 200 | | |
161 | 201 | | |
162 | 202 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
16 | 26 | | |
17 | 27 | | |
18 | 28 | | |
| |||
28 | 38 | | |
29 | 39 | | |
30 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
31 | 44 | | |
32 | 45 | | |
33 | 46 | | |
34 | 47 | | |
35 | | - | |
| 48 | + | |
36 | 49 | | |
37 | 50 | | |
38 | 51 | | |
39 | 52 | | |
40 | 53 | | |
41 | | - | |
| 54 | + | |
42 | 55 | | |
43 | 56 | | |
44 | 57 | | |
| |||
0 commit comments