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

feat: refact assets #1492

Merged
merged 22 commits into from
Sep 21, 2024
Merged

feat: refact assets #1492

merged 22 commits into from
Sep 21, 2024

Conversation

LuizAsFight
Copy link
Contributor

@LuizAsFight LuizAsFight commented Sep 19, 2024

Summary

Refactors all assets related code of application, aiming to have stable formatting and always correct asset address + decimal config depending on current network chainId.

The previous implementation was made to work always with same chainId, thus needed to upgrade now to support multi chainId

Changes

  • fixed formatting and decimals config all over the app
  • never use mocked chainId
  • Send screen: enable sending unknown tokens as well
  • improve logic of add/edit assets to change inside asset networks as well
  • include hooks and helpers to deal with assets
    • useFuelAsset, getAssetFuelCurrentChain, getFuelAssetByAssetId
  • fix bugs when formatting / creating values with zero units (unknown tokens)
  • make all unknown tokens / assets use default as zero units
  • upgrade database to remove assetId from primaryKey of assets table
  • fix flaky e2e ReportError test

@LuizAsFight LuizAsFight merged commit 76c88c4 into master Sep 21, 2024
15 checks passed
@LuizAsFight LuizAsFight deleted the lf/feat/refact-assets branch September 21, 2024 18:11
LuizAsFight pushed a commit that referenced this pull request Sep 25, 2024
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to master, this PR
will be updated.


# Releases
## @fuels/[email protected]

### Minor Changes

- [#1492](#1492)
[`76c88c40`](76c88c4)
Thanks [@LuizAsFight](https://github.com/LuizAsFight)! - pump

### Patch Changes

- [#1494](#1494)
[`9c7f3b1a`](9c7f3b1)
Thanks [@LeoCourbassier](https://github.com/LeoCourbassier)! - - Added
pnpm build to the publish action, ensuring "dist" folder will be
published

## [email protected]

### Minor Changes

- [#1492](#1492)
[`76c88c40`](76c88c4)
Thanks [@LuizAsFight](https://github.com/LuizAsFight)! - refactor assets
related code of application

### Patch Changes

- [#1493](#1493)
[`4bd3f8f7`](4bd3f8f)
Thanks [@arthurgeron](https://github.com/arthurgeron)! - Improve design
of alerts in submitted transactions

- [#1492](#1492)
[`76c88c40`](76c88c4)
Thanks [@LuizAsFight](https://github.com/LuizAsFight)! - fix bugs when
formatting / creating values with zero units (unknown tokens)

- [#1492](#1492)
[`76c88c40`](76c88c4)
Thanks [@LuizAsFight](https://github.com/LuizAsFight)! - make all
unknown tokens / assets use default as zero units

- [#1498](#1498)
[`698c272c`](698c272)
Thanks [@arthurgeron](https://github.com/arthurgeron)! - Avoid
duplicating instances of injected Content Script

- [#1492](#1492)
[`76c88c40`](76c88c4)
Thanks [@LuizAsFight](https://github.com/LuizAsFight)! - include hooks
and helpers to deal with assets, like `useFuelAsset`,
`getAssetFuelCurrentChain`, `getFuelAssetByAssetId`

- [#1492](#1492)
[`76c88c40`](76c88c4)
Thanks [@LuizAsFight](https://github.com/LuizAsFight)! - Send screen:
enable sending unknown tokens as well

- [#1492](#1492)
[`76c88c40`](76c88c4)
Thanks [@LuizAsFight](https://github.com/LuizAsFight)! - upgrade
database to remove assetId from primaryKey of assets table

- Updated dependencies
\[[`698c272c`](698c272)]:
    -   @fuel-wallet/[email protected]

## @fuel-wallet/[email protected]

### Patch Changes

- [#1498](#1498)
[`698c272c`](698c272)
Thanks [@arthurgeron](https://github.com/arthurgeron)! - Fixed extension
not being detected as installed after inactivity period.

## @fuel-wallet/[email protected]

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
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.

refact assets Transaction screen should show no units format for Unknown assets
2 participants