Skip to content

fix: strip balance from token snapshot - #881

Merged
raul-oliveira merged 1 commit into
release-candidatefrom
fix/strip-balance-from-token-snapshot
Jun 2, 2026
Merged

fix: strip balance from token snapshot#881
raul-oliveira merged 1 commit into
release-candidatefrom
fix/strip-balance-from-token-snapshot

Conversation

@raul-oliveira

@raul-oliveira raul-oliveira commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Acceptance Criteria

  • remove the token balance from token metadata when saving to async storage

Security Checklist

  • Make sure you do not include new dependencies in the project unless strictly necessary and do not include dev-dependencies as production ones. More dependencies increase the possibility of one of them being hijacked and affecting us.

Summary by CodeRabbit

  • New Features

    • Enhanced transaction confirmation flow with improved feedback during processing.
    • Transaction history now automatically refreshes when cache is invalidated.
  • Bug Fixes

    • Fixed Address Mode visibility in settings.
  • Localization

    • Updated translations and messaging across Danish, Portuguese (BR), and Russian.

Version: Updated to 0.39.0-rc.3

@raul-oliveira raul-oliveira self-assigned this Jun 2, 2026
@raul-oliveira
raul-oliveira changed the base branch from master to release-candidate June 2, 2026 13:19
@coderabbitai

coderabbitai Bot commented Jun 2, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

Failed to post review comments

📝 Walkthrough

Walkthrough

This PR releases v0.39.0-rc.3 with a significant refactoring of the send transaction flow. Version metadata is bumped across all platforms, token version fields are propagated through import and storage logic, and SendConfirmScreen is refactored to build transactions on-screen with phase-based UI instead of computing fees upfront in SendAmountInput. Localization files are updated to reflect the new UI messaging. Several supporting UI fixes are also applied.

Changes

v0.39.0-rc.3 Release with Send Flow Refactoring

Layer / File(s) Summary
Release Metadata Versioning
android/app/build.gradle, ios/HathorMobile.xcodeproj/project.pbxproj, package.json
Android versionCode 124→127 and versionName 0.38.0→0.39.0-rc.3; iOS CURRENT_PROJECT_VERSION 1.0.0→0.3.0 and MARKETING_VERSION 0.38.0→0.39.0; package.json version 0.38.0→0.39.0-rc.3.
Localization Updates
locale/da/texts.po, locale/pt-br/texts.po, locale/ru-ru/texts.po, locale/texts.pot
All locale files updated with new source reference locations and new/updated message keys for send confirmation, token creation, main screen, and token swap flows; new loading, building, and error messages introduced with mostly pending translations.
Token Version Propagation
src/sagas/tokenImport.js, src/sagas/tokens.js
Token import saga captures and propagates version field in unregistered token discovery, new token detection, and batch import. Token storage saga reduces persisted metadata to only uid, name, symbol, and version via stripTokenMetadata helper and SNAPSHOT_TOKEN_CONFIG_FIELDS.
Send Flow Refactoring
src/screens/SendAmountInput.js, src/screens/SendConfirmScreen.js
SendAmountInput removes fee-calculation logic and wallet dependencies, passing only amount/address/token to SendConfirmScreen. SendConfirmScreen refactored to build transaction on mount with phase-based UI (BUILDING→ERROR/READY), error mapping, FeedbackModal overlays, and updated PIN/signing flow using pre-built transactions.
Supporting UI Changes
src/screens/MainScreen.js, src/screens/CreateTokenConfirm.js, src/components/AmountTextInput.js, src/screens/Settings.js
MainScreen listens for invalidated history and refetches on status change; CreateTokenConfirm applies width-stretch style to AmountTextInput; AmountTextInput documentation clarifies parent-width requirements; Settings switches "Address Mode" conditional to singleAddressEnabled.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Suggested reviewers

  • pedroferreira1
  • andreabadesso
  • tuliomir

Poem

🐰 A rabbit hops through version bumps,
Transaction flows in building jumps,
From SendAmountInput's lighter load,
To SendConfirmScreen's phase-gated road,
With token versions safely stored,
Release 0.39 is now assured!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: stripping balance from token snapshots stored in async storage, which directly relates to the core refactoring in tokens.js and the acceptance criteria.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/strip-balance-from-token-snapshot

Warning

Tools execution failed with the following error:

Failed to run tools: 13 INTERNAL: Received RST_STREAM with code 2 (Internal server error)


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@tuliomir tuliomir moved this from Todo to In Review (WIP) in Hathor Network Jun 2, 2026
@raul-oliveira raul-oliveira changed the title Fix/strip balance from token snapshot fix: strip balance from token snapshot Jun 2, 2026
@raul-oliveira
raul-oliveira merged commit c2569c0 into release-candidate Jun 2, 2026
2 checks passed
@github-project-automation github-project-automation Bot moved this from In Review (WIP) to Waiting to be deployed in Hathor Network Jun 2, 2026
@raul-oliveira raul-oliveira moved this from Waiting to be deployed to Done in Hathor Network Jun 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants