Commit e749f18
authored
## Description
PR fix parsing for TokenProgram's Instruction at Inspector:
- Transfer
- TransferChecked
- SyncNative
Several improvements also been made:
- Display "Program" field for several cards in all modes
- - Extended information about the owner program
- Mock ALTs to not fetch them
- Improve tests for Instruction Cards
## Type of change
- [x] Bug fix
- [x] New feature
## Screenshots
BEFORE | AFTER | Link
-- | -- | --
<img width="1037" height="857" alt="image"
src="https://github.com/user-attachments/assets/04bac1bd-bb9d-4f36-b836-73235efdf11b"
/> | <img width="1012" height="900" alt="image"
src="https://github.com/user-attachments/assets/c72df96e-1cfb-4cf6-8197-f6ad6d375602"
/> |
[Link](http://localhost:3000/tx/28Z5go9RAfm8CywJHZ2kxXqyxmeAA4pacZgbKTourr4QjB7NpXozYwmctgDcR5qy5rFiGYSr4eizeMLt9BePQNRA/inspect)
<img width="1006" height="864" alt="image"
src="https://github.com/user-attachments/assets/ad674401-ccac-4f70-ae4b-31b01891e358"
/> | <img width="1008" height="872" alt="image"
src="https://github.com/user-attachments/assets/c13746d3-1e64-4096-97f1-63c0bd7394d0"
/> |
[Link](http://localhost:3000/tx/28Z5go9RAfm8CywJHZ2kxXqyxmeAA4pacZgbKTourr4QjB7NpXozYwmctgDcR5qy5rFiGYSr4eizeMLt9BePQNRA/inspect)
<img width="1044" height="132" alt="image"
src="https://github.com/user-attachments/assets/b7898021-9c5c-4be6-bed9-29bacfd0b219"
/> | <img width="1009" height="469" alt="image"
src="https://github.com/user-attachments/assets/e394e9c0-d56d-49ff-bee6-3880c3cf1f6a"
/> |
[Link](http://localhost:3000/tx/3b5pymMQPmkTje12xJLQrbnNWmEDE8CVZqEot8iPdT9gmFetDFBJfqgyCM9V3fiVYDkTwmCTAVE5bzKvDa8iZMJg/inspect#4)
## Testing
`pnpm t`
## Related Issues
[HOO-237](https://linear.app/solana-fndn/issue/HOO-237)
## Checklist
- [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] CI/CD checks pass
- [x] I have included screenshots for protocol screens (if applicable)
<!-- ELLIPSIS_HIDDEN -->
----
> [!IMPORTANT]
> Add support for parsing and displaying `Token::Transfer`,
`Token::TransferChecked`, and `Token::SyncNative` instructions in the
Inspector, with additional improvements and tests.
>
> - **Behavior**:
> - Add parsing for `Token::Transfer`, `Token::TransferChecked`, and
`Token::SyncNative` in `spl-token.parser.ts`.
> - Display "Program" field in `InspectorInstructionCard` and
`UnknownDetailsCard`.
> - **Components**:
> - Add `ProgramField` component in `ProgramField.tsx` for displaying
program information.
> - Update `BaseRawDetails` to handle loading state when `ix` is
undefined or has no keys.
> - **Tests**:
> - Add tests for `BaseInstructionCard`, `AccountsCard`,
`AssociatedTokenDetailsCard`, `ComputeBudgetDetailsCard`,
`SystemDetailsCard`, and `TokenDetailsCard`.
> - Add Storybook stories for `BaseRawDetails` and `ProgramField`.
> - **Misc**:
> - Mock accounts in `MockAccountsProvider.tsx` to avoid network
requests in tests.
> - Update `BUILD.md` with new route sizes and first load JS metrics.
>
> <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 1a80ba9. 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 29fe475 commit e749f18
File tree
41 files changed
+1168
-228
lines changed- .storybook
- __mocks__
- app
- __tests__
- stubs
- components
- common
- __tests__
- stories
- inspector
- __tests__
- associated-token
- instruction-parsers
- stories
- instruction
- __tests__
- associated-token
- token
- entities/instruction-card
- ui
- stories
- providers/accounts
- utils/__tests__
- bench
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
41 files changed
+1168
-228
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
0 commit comments