Skip to content

fix: loading modal and token amount size - #884

Merged
raul-oliveira merged 3 commits into
masterfrom
raul-oliveira/feat/fix-delayed-modal-create-token
Jun 30, 2026
Merged

fix: loading modal and token amount size#884
raul-oliveira merged 3 commits into
masterfrom
raul-oliveira/feat/fix-delayed-modal-create-token

Conversation

@raul-oliveira

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

Copy link
Copy Markdown
Contributor

Acceptance Criteria

  • preparing your transaction modal should appear right after the pin screen is dismissed (either success or cancel/error)
  • amount size should be stable while interacting with the pin screen and the create token button

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.
Simulator.Screen.Recording.-.iPhone.17.-.2026-06-02.at.18.19.36.mov

Summary by CodeRabbit

  • Bug Fixes

    • Improved error handling with clearer error messages during token creation.
    • Fixed button disabled state management throughout the token creation workflow.
  • New Features

    • Added visual feedback displaying transaction preparation status.
    • Enhanced transaction submission feedback with dedicated status modal.
  • Style

    • Adjusted input field layout for improved visual consistency.

@raul-oliveira
raul-oliveira requested a review from tuliomir June 2, 2026 21:00
@raul-oliveira raul-oliveira self-assigned this Jun 2, 2026
@raul-oliveira raul-oliveira moved this from Todo to In Progress (Done) in Hathor Network Jun 2, 2026
@coderabbitai

coderabbitai Bot commented Jun 2, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@raul-oliveira, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 53 minutes and 55 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate.

For paid Pro and Pro+ PR reviews, CodeRabbit uses rolling per-developer review limits. Reviews become available again as older review attempts age out of the rolling limit window.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b6e7247f-8e96-4f01-bc65-11cf00d6bebb

📥 Commits

Reviewing files that changed from the base of the PR and between 252ca6f and d21b246.

📒 Files selected for processing (6)
  • locale/da/texts.po
  • locale/pt-br/texts.po
  • locale/ru-ru/texts.po
  • locale/texts.pot
  • src/components/SendTransactionFeedbackModal.js
  • src/screens/CreateTokenConfirm.js
📝 Walkthrough

Walkthrough

CreateTokenConfirm refactors modal state management by replacing a single modal/modalType state variable with two dedicated state holders (showFeedbackModal and showSendTransactionModal). The transaction flow now uses async/await with explicit error handling, renders appropriate feedback modals, and updates button disabled logic accordingly.

Changes

Token creation modal state and transaction flow refactoring

Layer / File(s) Summary
State and imports
src/screens/CreateTokenConfirm.js
New Spinner import and two separate React state hooks (showFeedbackModal, showSendTransactionModal) replace the previous single modal/modalType state variable.
Transaction preparation and flow control
src/screens/CreateTokenConfirm.js
executeCreate is refactored to show an immediate non-dismissible build spinner, perform auth renewal and transaction preparation with async/await, and route completion to either SendTransactionModal on success or error feedback on failure. onError clears modal state and shows error FeedbackModal; exitScreen clears send modal before navigation; isCreatingToken consolidates busy state for button disabling.
Modal rendering and UI polish
src/screens/CreateTokenConfirm.js
Conditional rendering of FeedbackModal and SendTransactionFeedbackModal replaces previous modal/modalType logic; AmountTextInput receives alignSelf: 'stretch' styling; "Create token" button disabled state uses the new isCreatingToken flag.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • pedroferreira1
  • tuliomir

Poem

🐰 A modal state, once tangled and tight,
Now splits in two, both centered just right—
Feedback and mining, each gets its own space,
While async/await keeps errors in place.
The token creation dance flows smooth and clean,
Two states for the UI, the best ever seen! 🎉

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title addresses two specific changes: loading modal behavior and token amount size. Both are confirmed in the summary—modal state management was refactored and AmountTextInput received alignSelf styling. The title accurately reflects the main fixes in the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch raul-oliveira/feat/fix-delayed-modal-create-token

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.

@raul-oliveira
raul-oliveira force-pushed the raul-oliveira/feat/fix-delayed-modal-create-token branch from 252ca6f to eb80bb5 Compare June 2, 2026 21:19
@raul-oliveira raul-oliveira moved this from In Progress (Done) to In Progress (WIP) in Hathor Network Jun 8, 2026
@raul-oliveira raul-oliveira moved this from In Progress (WIP) to In Progress (Done) in Hathor Network Jun 10, 2026
- Remove sendTransaction listeners and guard promise handlers on unmount to avoid setState on an unmounted component and listener leaks
- Trim repetitive comments in SendTransactionFeedbackModal and CreateTokenConfirm

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@raul-oliveira
raul-oliveira force-pushed the raul-oliveira/feat/fix-delayed-modal-create-token branch from 244e2b6 to 6961a84 Compare June 23, 2026 21:15
Comment thread locale/pt-br/texts.po
#: src/screens/CreateTokenConfirm.js:155
#: src/screens/CreateTokenConfirm.js:151
msgid "Building the transaction"
msgstr "Criando a transação"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

suggestion(non-blocking): I would prefer Construindo than Criando. It's closer to the original word used.

@tuliomir tuliomir moved this from In Progress (Done) to In Review (Done) in Hathor Network Jun 29, 2026
@github-project-automation github-project-automation Bot moved this from In Review (Done) to In Review (WIP) in Hathor Network Jun 29, 2026
@raul-oliveira
raul-oliveira merged commit 1a6dbc7 into master Jun 30, 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 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Waiting to be deployed

Development

Successfully merging this pull request may close these issues.

3 participants