Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: L2 transaction metadata decoding #7124

Merged
merged 9 commits into from
Jul 13, 2023

Conversation

cpl121
Copy link
Member

@cpl121 cpl121 commented Jul 7, 2023

Closes #7110

Summary

Modify the decode to parse the metadadata of l2 transactions. The old version is tried first, and if an error is received, the new version is tried.

Changelog

- Try the first version of the parse, if it has an error, try the second
- Update the decode to parse: `Gas budget`, `Parameters` and `Allowance`
- Differentiate between `Base Token`, `Native Token` and `NFTs` in `Allowance`

Testing

Platforms

  • Desktop
    • MacOS
    • Linux
    • Windows
  • Mobile
    • iOS
    • Android

Instructions

  • Make a transaction to an L2 account with Base Token, Native Token or NFT
  • Wait for the transaction to be successful
  • Click on the transaction
  • Check that the metadata field has the data correctly parsed

Example with Base Token Tx

image

Checklist

  • I have followed the contribution guidelines for this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or modified tests that prove my changes work as intended
  • I have verified that new and existing unit tests pass locally with my changes
  • I have verified that my latest changes pass CI workflows for testing and linting
  • I have made corresponding changes to the documentation

@cpl121 cpl121 marked this pull request as ready for review July 7, 2023 12:21
@brancoder brancoder self-requested a review July 12, 2023 10:48
Copy link
Collaborator

@brancoder brancoder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@begonaalvarezd begonaalvarezd merged commit d3502a1 into develop Jul 13, 2023
4 checks passed
@begonaalvarezd begonaalvarezd deleted the fix/L2-transaction-metadata-decoding branch July 13, 2023 11:19
begonaalvarezd added a commit that referenced this pull request Jul 13, 2023
* fix: L2 transaction metadata decoding

* fix: test with new parse layer 2 metadata

* perf: rename parseLayer2MetadataForTransferV1

* perf: modify the order between parse versions

* feat: add comments

* perf: unify parse layer versions in parseLayer2MetadataForTransfer

---------

Co-authored-by: Begoña Álvarez de la Cruz <balvarez@boxfish.studio>
begonaalvarezd added a commit that referenced this pull request Jul 18, 2023
* revert: undo cache deposit address (#7137)

* fix: comment (#7142)

* chore: bump version to 2.1.4-alpha-1 (#7143)

* fix: claiming smr (#6924)

* fix: use helper functions instead of checking if store variable exists

* chore: fix strict type checking

* feat: enhance message in error log

* fix: use isMobile helper function

* chore: add optional chaining

* fix: center receive address button (#7171)

* fix: L2 transaction metadata decoding (#7124)

* fix: L2 transaction metadata decoding

* fix: test with new parse layer 2 metadata

* perf: rename parseLayer2MetadataForTransferV1

* perf: modify the order between parse versions

* feat: add comments

* perf: unify parse layer versions in parseLayer2MetadataForTransfer

---------

Co-authored-by: Begoña Álvarez de la Cruz <balvarez@boxfish.studio>

* fix: crash in activity filters (#7184)

* fix: missing async from activity generation

* fix: amount filter

* perf: add AliasActivity type

* perf: improve status filter

* fix: test

---------

Co-authored-by: cpl121 <cpeon@boxfish.studio>

* feat: disable auto update in windows

* chore: bump version to 2.1.4-beta-1

* chore: bump version to 2.1.4

---------

Co-authored-by: cpl121 <100352899+cpl121@users.noreply.github.com>
Co-authored-by: Tuditi <45079109+Tuditi@users.noreply.github.com>
Co-authored-by: Marc Espín <mespinsanz@gmail.com>
Co-authored-by: cpl121 <cpeon@boxfish.studio>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Task]: Fix L2 transaction metadata decoding
4 participants