Skip to content

Zano assets and enhancements#9389

Merged
omurovch merged 2 commits into
version/0.50from
zano-assets
Jul 14, 2026
Merged

Zano assets and enhancements#9389
omurovch merged 2 commits into
version/0.50from
zano-assets

Conversation

@omurovch

@omurovch omurovch commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

#9194

Summary by CodeRabbit

  • Bug Fixes

    • Added a clear warning when the available balance is insufficient to cover transaction fees.
    • Prevented transactions from being submitted when fee funds are insufficient.
    • Improved fee validation for both native and non-native assets.
  • Improvements

    • Updated wallet functionality to support more accurate native asset balance and fee handling.

omurovch added 2 commits July 14, 2026 16:44
Zano fees are always paid in native ZANO, so when sending a
confidential asset (FUSD etc.) the amount validator alone cannot
catch an unaffordable fee: it checks the asset balance while the
fee draws from the ZANO balance. Compare the estimated fee against
the unlocked native balance (amount + fee for native sends), show
an error under the fee cell and disable Next. Mirrors the checks
already done in SendTransactionServiceZano for swaps.
@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 5538ffed-3ea3-49b6-bc5d-c2fc7969ba59

📥 Commits

Reviewing files that changed from the base of the PR and between 104fdab and 4b32556.

📒 Files selected for processing (5)
  • gradle/libs.versions.toml
  • walletkit/src/main/java/io/horizontalsystems/walletkit/core/Interfaces.kt
  • walletkit/src/main/java/io/horizontalsystems/walletkit/core/adapters/ZanoAdapter.kt
  • walletkit/src/main/java/io/horizontalsystems/walletkit/modules/send/zano/SendZanoScreen.kt
  • walletkit/src/main/java/io/horizontalsystems/walletkit/modules/send/zano/SendZanoViewModel.kt

📝 Walkthrough

Walkthrough

Zano send handling now exposes native-asset balance data, checks fee affordability in the view model, prevents sending when fees are insufficient, and displays a conditional fee caution. The ZanoKit version reference was also updated.

Changes

Zano fee handling

Layer / File(s) Summary
Adapter contract and version update
gradle/libs.versions.toml, walletkit/src/main/java/io/horizontalsystems/walletkit/core/Interfaces.kt, walletkit/src/main/java/io/horizontalsystems/walletkit/core/adapters/ZanoAdapter.kt
The ZanoKit version changed, and the adapter contract now exposes native-asset and native-balance properties implemented by ZanoAdapter.
Fee affordability state
walletkit/src/main/java/io/horizontalsystems/walletkit/modules/send/zano/SendZanoViewModel.kt
Fee cautions are computed using native versus non-native balance rules and prevent sending when fees are unaffordable.
Fee caution rendering
walletkit/src/main/java/io/horizontalsystems/walletkit/modules/send/zano/SendZanoScreen.kt
A conditional TextImportantError displays the fee caution title and description beneath the fee component.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant SendZanoScreen
  participant SendZanoViewModel
  participant ZanoAdapter
  SendZanoScreen->>SendZanoViewModel: createState()
  SendZanoViewModel->>ZanoAdapter: read native asset balance data
  ZanoAdapter-->>SendZanoViewModel: isNativeAsset and nativeAvailableBalance
  SendZanoViewModel-->>SendZanoScreen: SendZanoUiState with feeCaution
Loading

Possibly related PRs

Suggested reviewers: abdrasulov, rafaelekol

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title is related to the Zano changes, but it is too broad and generic to clearly summarize the main update. Use a more specific title such as "Add Zano fee affordability validation and update Zano kit version".
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
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.
✨ 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 zano-assets

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.

@omurovch
omurovch merged commit 4b32556 into version/0.50 Jul 14, 2026
2 checks passed
@omurovch
omurovch deleted the zano-assets branch July 14, 2026 11:12
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.

2 participants