Commit e860bba
authored
Support hex transaction types in fromTransactionType (#861)
## Changes
- Linear: https://linear.app/thirdweb/issue/INF-171/
- Here is the problem being solved.
- Here are the changes made.
## How this PR will be tested
- [ ] Open the dashboard and click X. Result: A modal should appear.
- [ ] Call the /foo/bar API. Result: Returns 200 with "baz" in the response body.
## Output
(Example: Screenshot/GIF for UI changes, cURL output for API changes)
<!-- start pr-codex -->
---
## PR-Codex overview
This PR modifies the `src/shared/utils/sdk.ts` file by enhancing the `fromTransactionType` function and removing the `toTransactionType` function, streamlining transaction type handling.
### Detailed summary
- Added `hexToNumber` and `isHex` imports from `thirdweb`.
- Updated `fromTransactionType` to convert hex transaction types using `hexToNumber`.
- Removed the entire `toTransactionType` function.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->1 parent eef9c43 commit e860bba
File tree
1 file changed
+2
-10
lines changed1 file changed
+2
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
0 commit comments