Skip to content

fix: rc errors on importing and sending fbt - #876

Merged
raul-oliveira merged 6 commits into
release-candidatefrom
fix/rc-errors-on-importing-and-sending-fbt
May 27, 2026
Merged

fix: rc errors on importing and sending fbt#876
raul-oliveira merged 6 commits into
release-candidatefrom
fix/rc-errors-on-importing-and-sending-fbt

Conversation

@raul-oliveira

@raul-oliveira raul-oliveira commented May 27, 2026

Copy link
Copy Markdown
Contributor

Acceptance Criteria

  • Fix the import tokens version (merge issue)
  • Should be able to build and send the transaction in the send tokens flow (HTR, Deposit and fee based tokens)
  • Should show a loading state before the review screen shows
  • The review screen should use the built tx when showing data

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

Release Notes

  • New Features

    • Transaction confirmation screen now displays real-time loading indicators with enhanced user feedback during transaction building and preparation.
  • Bug Fixes

    • Improved error handling for transaction build failures, providing specific and actionable error messages for fee-related and balance shortage issues.
  • Localization

    • Updated and refreshed translation strings for send operations, confirmations, and token swap workflows across supported languages.

Review Change Stack

@coderabbitai

coderabbitai Bot commented May 27, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 9fb6f97a-d09c-467b-93f0-90ca8659e164

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/rc-errors-on-importing-and-sending-fbt

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.

@raul-oliveira raul-oliveira moved this from Todo to In Progress (Done) in Hathor Network May 27, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
src/screens/SendConfirmScreen.js (1)

241-250: ⚡ Quick win

Use server-provided native token symbol in fee display UI.

This UI still formats fee with a library constant symbol. Please source the symbol from serverInfo.native_token.symbol and keep the constant only as fallback.

Based on learnings: Do not hardcode native token name/symbol in user-facing UI; use dynamic server info (serverInfo.native_token.symbol), with constant UID only as temporary fallback.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/screens/SendConfirmScreen.js` around lines 241 - 250, The fee UI
currently uses the constant nativeSymbol; update renderNetworkFeeValue to first
read the symbol from serverInfo.native_token.symbol and use that in the
displayed fee, falling back to the existing nativeSymbol constant only when
serverInfo or serverInfo.native_token.symbol is missing or falsy; modify the JSX
inside renderNetworkFeeValue (and any helper renderValue calls if they accept a
symbol param) to pass/display the dynamic symbol instead of the hardcoded
constant.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/sagas/tokenImport.js`:
- Line 55: fetchTokenDetails can return objects missing the required version
field (via the stored-token early return or UID fallback), which causes
registerToken and the batch import to fail; update fetchTokenDetails to ensure
it always returns an importable token object with a defined version (or
explicitly skip/refetch when version is absent) by: validating the returned
object before any early returns in fetchTokenDetails, adding logic to refetch or
derive version when missing (or return a sentinel to skip), and ensuring callers
like registerToken only receive objects with a defined version (or handle the
explicit skip sentinel) so the batch import won’t abort unexpectedly.

---

Nitpick comments:
In `@src/screens/SendConfirmScreen.js`:
- Around line 241-250: The fee UI currently uses the constant nativeSymbol;
update renderNetworkFeeValue to first read the symbol from
serverInfo.native_token.symbol and use that in the displayed fee, falling back
to the existing nativeSymbol constant only when serverInfo or
serverInfo.native_token.symbol is missing or falsy; modify the JSX inside
renderNetworkFeeValue (and any helper renderValue calls if they accept a symbol
param) to pass/display the dynamic symbol instead of the hardcoded constant.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 30f6fb7b-639f-480b-8ce7-cbb8dd5d976c

📥 Commits

Reviewing files that changed from the base of the PR and between bdbd24e and a7ca222.

📒 Files selected for processing (7)
  • locale/da/texts.po
  • locale/pt-br/texts.po
  • locale/ru-ru/texts.po
  • locale/texts.pot
  • src/sagas/tokenImport.js
  • src/screens/SendAmountInput.js
  • src/screens/SendConfirmScreen.js

Comment thread src/sagas/tokenImport.js
@raul-oliveira
raul-oliveira requested a review from tuliomir May 27, 2026 04:14
Comment thread src/screens/SendConfirmScreen.js Outdated
Comment on lines +123 to +133
const unsubscribe = navigation.addListener('beforeRemove', async (e) => {
if (sentSuccessfullyRef.current || releasedRef.current || !sendTx) {
return;
}
e.preventDefault();
releasedRef.current = true;
try { await sendTx.releaseUtxos(); } catch (err) { console.error(err); }
navigation.dispatch(e.data.action);
});
return unsubscribe;
}, [sendTx, navigation]);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thinking about this release here. After the user types the pin and the tx is sending, is not possible for the user to go back. But if the user taps the physical android back button, maybe this would release the utxos AND send the tx.

I don't think it's critical to change anything in this PR and @tuliomir has a task to review this physical back button handling, so maybe we should just mention this there.

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.

Referencing the #791 here for better visibility

Comment thread src/screens/SendConfirmScreen.js
Comment thread src/screens/SendConfirmScreen.js Outdated
Comment thread src/screens/SendConfirmScreen.js Outdated
@github-project-automation github-project-automation Bot moved this from In Progress (Done) to In Review (WIP) in Hathor Network May 27, 2026
@tuliomir tuliomir moved this from In Review (WIP) to In Review (Done) in Hathor Network May 27, 2026
@raul-oliveira
raul-oliveira merged commit ecfb0a3 into release-candidate May 27, 2026
2 checks passed
@github-project-automation github-project-automation Bot moved this from In Review (Done) to Waiting to be deployed in Hathor Network May 27, 2026
@raul-oliveira raul-oliveira mentioned this pull request May 27, 2026
6 tasks
@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