Commit 71308f3
authored
fix: correct pending send transaction amount display (#2170)
## What changed (plus any additional context for devs)
- Fixed an issue in `ActivityValue.tsx` by refactoring how we handle transaction changes:
- Renamed `changeAsset` to `changeWithAsset` to better reflect that we're storing the entire change object, not just the asset
- Updated the logic to access the asset property from the change object
- Enhanced transaction building in the Send page:
- Added proper raw amount conversion for asset transactions
- Improved how assets are handled in pending transactions by using `parseUserAssetBalances`
- Ensured consistent asset formatting in transaction changes
## What to test
- Send tokens and verify the transaction appears correctly in activity
- Check that transaction values display properly in the activity list
- Verify that NFT transactions show the correct asset information
- Test sending various token amounts and confirm the raw amounts are calculated correctly
- Ensure transaction direction is properly displayed in the activity feed
<!-- start pr-codex -->
---
## PR-Codex overview
This PR updates the version numbers in `manifest.json` and `package.json` to `1.5.179`. It also refines the logic in `ActivityValue.tsx` for handling asset changes and introduces new utility functions in `index.tsx` for converting amounts and parsing user asset balances in transaction handling.
### Detailed summary
- Updated version in `manifest.json` from `1.5.178` to `1.5.179`.
- Updated version in `package.json` from `1.5.178` to `1.5.179`.
- Renamed variable `changeAsset` to `changeWithAsset` in `ActivityValue.tsx`.
- Improved logic for determining asset changes in `ActivityValue.tsx`.
- Added `convertAmountToRawAmount` and `parseUserAssetBalances` imports in `index.tsx`.
- Modified `buildPendingTransaction` function to use `rawAmount` and `changeAsset`.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->1 parent 723f50d commit 71308f3
File tree
4 files changed
+27
-9
lines changed- src/entries/popup/pages
- home/Activity
- send
- static
4 files changed
+27
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
111 | | - | |
| 111 | + | |
112 | 112 | | |
113 | | - | |
114 | | - | |
| 113 | + | |
| 114 | + | |
115 | 115 | | |
116 | | - | |
| 116 | + | |
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
| 50 | + | |
49 | 51 | | |
50 | 52 | | |
51 | 53 | | |
| |||
298 | 300 | | |
299 | 301 | | |
300 | 302 | | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
301 | 318 | | |
302 | 319 | | |
303 | 320 | | |
304 | 321 | | |
305 | 322 | | |
306 | 323 | | |
307 | | - | |
308 | | - | |
| 324 | + | |
| 325 | + | |
309 | 326 | | |
310 | 327 | | |
311 | | - | |
| 328 | + | |
312 | 329 | | |
313 | 330 | | |
314 | 331 | | |
| |||
333 | 350 | | |
334 | 351 | | |
335 | 352 | | |
| 353 | + | |
336 | 354 | | |
337 | 355 | | |
338 | 356 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
| 71 | + | |
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| |||
0 commit comments