Skip to content

feat(wallet): implement Maya sell convert and order preview flow#772

Merged
romchornyi merged 79 commits into
feat/mayafrom
feat/maya-conversion-order-preview
Jun 10, 2026
Merged

feat(wallet): implement Maya sell convert and order preview flow#772
romchornyi merged 79 commits into
feat/mayafrom
feat/maya-conversion-order-preview

Conversation

@romchornyi

@romchornyi romchornyi commented May 27, 2026

Copy link
Copy Markdown
Contributor

Issue being fixed or feature implemented

This PR implements the Maya sell conversion flow and order preview experience for iOS, including amount entry, quote handling, destination input, and transaction confirmation UX.

What was done?

  • Implemented Maya conversion flow with support for entering amount in:
    • fiat
    • DASH
    • selected destination crypto
  • Added auto-sync between crypto and fiat values when amount changes.
  • Added Max amount handling based on current DASH wallet balance.
  • Implemented destination coin selection flow:
    • coin icons shown
    • halted coins shown as disabled/non-selectable
  • Implemented destination address step:
    • clipboard support
    • exchange source support (where available)
    • validation triggered on continue flow
  • Implemented Order Preview flow with:
    • source and destination amounts
    • fee breakdown
    • totals (with/without fees)
    • destination address
    • execution network display
    • 10s submit window with countdown in button label
    • refresh quote action after countdown expires
  • Added/updated Maya-related view model and API integration pieces used by Convert/Preview flow.
  • Refactored shared Maya UI styles/components for consistency across Maya screens.

How Has This Been Tested?

Manual testing was performed on iOS Simulator (iPhone 14 Pro, iOS 18.6) and local debug builds.

Test scenarios covered:

  • Open Maya portal and navigate through full sell flow.
  • Enter amount in fiat/DASH/crypto and verify cross-value updates.
  • Use max amount and verify value behavior.
  • Select coin (halted assets disabled, active assets selectable).
  • Enter destination address (including clipboard path).
  • Open order preview and verify amounts, fees, totals, destination, and network label.
  • Verify countdown behavior (submit window + refresh quote path).
  • Validate error handling for small/invalid quote conditions and failed quote requests.

Breaking Changes

No breaking changes introduced.

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

Summary by CodeRabbit

  • Chores
    • Switched development build configuration from Testflight to Debug.
    • Updated and expanded app asset catalog with renamed and added images and illustrations.
    • Short-circuited app launch during Xcode SwiftUI previews to streamline previews.
    • Updated internal commit reference used by the build.

ross-dash and others added 30 commits March 24, 2026 17:16
- Export CSV
- Zenledger

Changed the navigation bar for sheet "Import private key"
Update 21 language files and Japanese App Store metadata from Transifex.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
chore: pull latest translations from Transifex (50%+ complete)
…dger

feat: update csv export and zenledger
…gation

- Migrate all menu items to use the new MenuItem component
- Update styles for MenuItemsList
- Replace all menu item icons with updated assets
- Change "Buy & Sell Dash" and "Explore" from bottom sheet to full page
- MayaTransactionSuccessView: success state with icon, title, message
- MayaTransactionFailureView: failure state with retry, cancel, and support actions
- MayaFeeInfoSheet: bottom-sheet component explaining the Maya swap fee with a Learn more link and Got it dismiss button
- All three views registered in both dashwallet and dashpay Xcode targets
@romchornyi

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 1, 2026

Copy link
Copy Markdown
✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@romchornyi

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 5, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@romchornyi

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 5, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@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.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
DashWallet/Resources/AppAssets.xcassets/Navigation bar/navigationbar-back.imageset/Contents.json (1)

4-47: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Add template rendering metadata and resolve empty dark-appearance slots for navigationbar-back.

navigationbar-back is consumed as a generic nav control icon, but this manifest has no template-rendering-intent, and it also defines dark appearance slots without filenames (Line 9-17, Line 24-32, Line 39-47). This can cause inconsistent tinting versus navigationbar-close/navigationbar-plus, and the dark variants currently don’t map to actual assets.

Suggested manifest cleanup
 {
   "images" : [
     {
       "filename" : "navigationbar-back@1x.png",
       "idiom" : "universal",
       "scale" : "1x"
     },
-    {
-      "appearances" : [
-        {
-          "appearance" : "luminosity",
-          "value" : "dark"
-        }
-      ],
-      "idiom" : "universal",
-      "scale" : "1x"
-    },
     {
       "filename" : "navigationbar-back@2x.png",
       "idiom" : "universal",
       "scale" : "2x"
     },
-    {
-      "appearances" : [
-        {
-          "appearance" : "luminosity",
-          "value" : "dark"
-        }
-      ],
-      "idiom" : "universal",
-      "scale" : "2x"
-    },
     {
       "filename" : "navigationbar-back@3x.png",
       "idiom" : "universal",
       "scale" : "3x"
-    },
-    {
-      "appearances" : [
-        {
-          "appearance" : "luminosity",
-          "value" : "dark"
-        }
-      ],
-      "idiom" : "universal",
-      "scale" : "3x"
     }
   ],
   "info" : {
     "author" : "xcode",
     "version" : 1
+  },
+  "properties" : {
+    "localizable" : true,
+    "template-rendering-intent" : "template"
   }
 }

Based on learnings: for XCAssets icons, generic/system UI icons should set template-rendering-intent to template so they inherit system tint correctly.

🤖 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 `@DashWallet/Resources/AppAssets.xcassets/Navigation`
bar/navigationbar-back.imageset/Contents.json around lines 4 - 47, The
Contents.json for the navigationbar-back asset is missing a
"template-rendering-intent" set to "template" and includes dark-appearance
entries without filenames; update the navigationbar-back image set to add
"template-rendering-intent": "template" at the asset level and populate each
dark appearance slot (the entries currently defining "appearance": "luminosity"
with "value": "dark") with the corresponding dark image filenames (e.g.,
navigationbar-back@1x.png dark variant, navigationbar-back@2x.png dark variant,
navigationbar-back@3x.png dark variant) so the dark slots reference actual files
and the asset renders as a template-tinted system icon.
🤖 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.

Outside diff comments:
In `@DashWallet/Resources/AppAssets.xcassets/Navigation`
bar/navigationbar-back.imageset/Contents.json:
- Around line 4-47: The Contents.json for the navigationbar-back asset is
missing a "template-rendering-intent" set to "template" and includes
dark-appearance entries without filenames; update the navigationbar-back image
set to add "template-rendering-intent": "template" at the asset level and
populate each dark appearance slot (the entries currently defining "appearance":
"luminosity" with "value": "dark") with the corresponding dark image filenames
(e.g., navigationbar-back@1x.png dark variant, navigationbar-back@2x.png dark
variant, navigationbar-back@3x.png dark variant) so the dark slots reference
actual files and the asset renders as a template-tinted system icon.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: da86ce9b-9393-4bb9-8e1d-f383d081c7b9

📥 Commits

Reviewing files that changed from the base of the PR and between 8feb4b7 and 25f0104.

⛔ Files ignored due to path filters (29)
  • DashWallet/Resources/AppAssets.xcassets/Menu/menu-coinbase.imageset/menu-coinbase@1x.png is excluded by !**/*.png
  • DashWallet/Resources/AppAssets.xcassets/Menu/menu-coinbase.imageset/menu-coinbase@2x.png is excluded by !**/*.png
  • DashWallet/Resources/AppAssets.xcassets/Menu/menu-coinbase.imageset/menu-coinbase@3x.png is excluded by !**/*.png
  • DashWallet/Resources/AppAssets.xcassets/Menu/menu-import-private-key.imageset/import-private-key@1x.png is excluded by !**/*.png
  • DashWallet/Resources/AppAssets.xcassets/Menu/menu-import-private-key.imageset/import-private-key@2x.png is excluded by !**/*.png
  • DashWallet/Resources/AppAssets.xcassets/Menu/menu-import-private-key.imageset/import-private-key@3x.png is excluded by !**/*.png
  • DashWallet/Resources/AppAssets.xcassets/Menu/menu-maya.imageset/menu-maya@1x.png is excluded by !**/*.png
  • DashWallet/Resources/AppAssets.xcassets/Menu/menu-maya.imageset/menu-maya@2x.png is excluded by !**/*.png
  • DashWallet/Resources/AppAssets.xcassets/Menu/menu-maya.imageset/menu-maya@3x.png is excluded by !**/*.png
  • DashWallet/Resources/AppAssets.xcassets/Menu/menu-topper.imageset/menu-topper@1x.png is excluded by !**/*.png
  • DashWallet/Resources/AppAssets.xcassets/Menu/menu-topper.imageset/menu-topper@2x.png is excluded by !**/*.png
  • DashWallet/Resources/AppAssets.xcassets/Menu/menu-topper.imageset/menu-topper@3x.png is excluded by !**/*.png
  • DashWallet/Resources/AppAssets.xcassets/Menu/menu-uphold.imageset/menu-uphold@1x.png is excluded by !**/*.png
  • DashWallet/Resources/AppAssets.xcassets/Menu/menu-uphold.imageset/menu-uphold@2x.png is excluded by !**/*.png
  • DashWallet/Resources/AppAssets.xcassets/Menu/menu-uphold.imageset/menu-uphold@3x.png is excluded by !**/*.png
  • DashWallet/Resources/AppAssets.xcassets/Navigation bar/navigationbar-back.imageset/navigationbar-back@1x.png is excluded by !**/*.png
  • DashWallet/Resources/AppAssets.xcassets/Navigation bar/navigationbar-back.imageset/navigationbar-back@2x.png is excluded by !**/*.png
  • DashWallet/Resources/AppAssets.xcassets/Navigation bar/navigationbar-back.imageset/navigationbar-back@3x.png is excluded by !**/*.png
  • DashWallet/Resources/AppAssets.xcassets/Navigation bar/navigationbar-close.imageset/navigationbar-close@1x.png is excluded by !**/*.png
  • DashWallet/Resources/AppAssets.xcassets/Navigation bar/navigationbar-close.imageset/navigationbar-close@2x.png is excluded by !**/*.png
  • DashWallet/Resources/AppAssets.xcassets/Navigation bar/navigationbar-close.imageset/navigationbar-close@3x.png is excluded by !**/*.png
  • DashWallet/Resources/AppAssets.xcassets/Navigation bar/navigationbar-info.imageset/controls-info@x1.png is excluded by !**/*.png
  • DashWallet/Resources/AppAssets.xcassets/Navigation bar/navigationbar-info.imageset/controls-info@x2.png is excluded by !**/*.png
  • DashWallet/Resources/AppAssets.xcassets/Navigation bar/navigationbar-info.imageset/controls-info@x3.png is excluded by !**/*.png
  • DashWallet/Resources/AppAssets.xcassets/Navigation bar/navigationbar-plus.imageset/navigationbar-plus@1x.png is excluded by !**/*.png
  • DashWallet/Resources/AppAssets.xcassets/Navigation bar/navigationbar-plus.imageset/navigationbar-plus@2x.png is excluded by !**/*.png
  • DashWallet/Resources/AppAssets.xcassets/Navigation bar/navigationbar-plus.imageset/navigationbar-plus@3x.png is excluded by !**/*.png
  • DashWallet/Resources/AppAssets.xcassets/Other/enter-amount-dash.imageset/enter-amount-dash@1x.png is excluded by !**/*.png
  • DashWallet/Resources/AppAssets.xcassets/Other/enter-amount-dash.imageset/enter-amount-dash@2x.png is excluded by !**/*.png
📒 Files selected for processing (12)
  • DashWallet.xcodeproj/project.pbxproj
  • DashWallet/Resources/AppAssets.xcassets/Illustration/xmark.imageset/Contents.json
  • DashWallet/Resources/AppAssets.xcassets/Menu/menu-coinbase.imageset/Contents.json
  • DashWallet/Resources/AppAssets.xcassets/Menu/menu-import-private-key.imageset/Contents.json
  • DashWallet/Resources/AppAssets.xcassets/Menu/menu-maya.imageset/Contents.json
  • DashWallet/Resources/AppAssets.xcassets/Menu/menu-topper.imageset/Contents.json
  • DashWallet/Resources/AppAssets.xcassets/Menu/menu-uphold.imageset/Contents.json
  • DashWallet/Resources/AppAssets.xcassets/Navigation bar/navigationbar-back.imageset/Contents.json
  • DashWallet/Resources/AppAssets.xcassets/Navigation bar/navigationbar-close.imageset/Contents.json
  • DashWallet/Resources/AppAssets.xcassets/Navigation bar/navigationbar-info.imageset/Contents.json
  • DashWallet/Resources/AppAssets.xcassets/Navigation bar/navigationbar-plus.imageset/Contents.json
  • DashWallet/Resources/AppAssets.xcassets/Other/enter-amount-dash.imageset/Contents.json
💤 Files with no reviewable changes (1)
  • DashWallet/Resources/AppAssets.xcassets/Navigation bar/navigationbar-info.imageset/Contents.json
✅ Files skipped from review due to trivial changes (5)
  • DashWallet/Resources/AppAssets.xcassets/Menu/menu-topper.imageset/Contents.json
  • DashWallet/Resources/AppAssets.xcassets/Other/enter-amount-dash.imageset/Contents.json
  • DashWallet/Resources/AppAssets.xcassets/Menu/menu-import-private-key.imageset/Contents.json
  • DashWallet/Resources/AppAssets.xcassets/Menu/menu-uphold.imageset/Contents.json
  • DashWallet/Resources/AppAssets.xcassets/Menu/menu-coinbase.imageset/Contents.json

@romchornyi

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 8, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@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: 2

🤖 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 `@DashWallet/Resources/AppAssets.xcassets/Navigation`
bar/navigationbar-close.imageset/Contents.json:
- Around line 23-25: The navigation bar close icon's Contents.json currently
only sets "localizable" which removes template rendering; update the
navigationbar-close imageset Contents.json "properties" to include
"template-rendering-intent": "template" alongside "localizable" (i.e., add the
template-rendering-intent property in the Contents.json for the
navigationbar-close imageset) so the asset uses template rendering and respects
nav tint color.

In `@DashWallet/Resources/AppAssets.xcassets/Navigation`
bar/navigationbar-plus.imageset/Contents.json:
- Around line 23-25: The navigationbar-plus image set lost its template
rendering declaration so the plus icon won't inherit navigation tint; update the
Contents.json for the navigationbar-plus.imageset (the "properties" object) to
include "template-rendering-intent": "template" alongside "localizable" so the
asset is rendered as a template and remains tintable in SwiftUI/UIKit.
🪄 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: e4f47567-1d03-4608-96c4-771bd9f53635

📥 Commits

Reviewing files that changed from the base of the PR and between 25f0104 and b81af02.

📒 Files selected for processing (3)
  • DashWallet/Resources/AppAssets.xcassets/Navigation bar/navigationbar-back.imageset/Contents.json
  • DashWallet/Resources/AppAssets.xcassets/Navigation bar/navigationbar-close.imageset/Contents.json
  • DashWallet/Resources/AppAssets.xcassets/Navigation bar/navigationbar-plus.imageset/Contents.json
💤 Files with no reviewable changes (1)
  • DashWallet/Resources/AppAssets.xcassets/Navigation bar/navigationbar-back.imageset/Contents.json

Comment on lines 23 to 25
"properties" : {
"localizable" : true,
"template-rendering-intent" : "template"
"localizable" : true
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Restore template rendering intent for nav control icon.

At Line 24, keeping only "localizable" drops template behavior; this can make navigationbar-close ignore nav tint and render with baked colors.

Suggested fix
   "properties" : {
-    "localizable" : true
+    "localizable" : true,
+    "template-rendering-intent" : "template"
   }

Based on learnings and coding guidelines: generic/system UI icons in .imageset should use template-rendering-intent: "template" to preserve tint behavior in app UI.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"properties" : {
"localizable" : true,
"template-rendering-intent" : "template"
"localizable" : true
}
"properties" : {
"localizable" : true,
"template-rendering-intent" : "template"
}
🤖 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 `@DashWallet/Resources/AppAssets.xcassets/Navigation`
bar/navigationbar-close.imageset/Contents.json around lines 23 - 25, The
navigation bar close icon's Contents.json currently only sets "localizable"
which removes template rendering; update the navigationbar-close imageset
Contents.json "properties" to include "template-rendering-intent": "template"
alongside "localizable" (i.e., add the template-rendering-intent property in the
Contents.json for the navigationbar-close imageset) so the asset uses template
rendering and respects nav tint color.

Sources: Coding guidelines, Learnings

Comment on lines 23 to 25
"properties" : {
"localizable" : true,
"template-rendering-intent" : "template"
"localizable" : true
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Set template-rendering-intent to keep plus icon tintable.

At Line 24, navigationbar-plus no longer declares template rendering, so SwiftUI may render it as original artwork instead of inheriting navigation tint.

Suggested fix
   "properties" : {
-    "localizable" : true
+    "localizable" : true,
+    "template-rendering-intent" : "template"
   }

Based on learnings and coding guidelines: generic/system UI icons in .imageset should use template-rendering-intent: "template" to preserve tint behavior in app UI.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"properties" : {
"localizable" : true,
"template-rendering-intent" : "template"
"localizable" : true
}
"properties" : {
"localizable" : true,
"template-rendering-intent" : "template"
}
🤖 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 `@DashWallet/Resources/AppAssets.xcassets/Navigation`
bar/navigationbar-plus.imageset/Contents.json around lines 23 - 25, The
navigationbar-plus image set lost its template rendering declaration so the plus
icon won't inherit navigation tint; update the Contents.json for the
navigationbar-plus.imageset (the "properties" object) to include
"template-rendering-intent": "template" alongside "localizable" so the asset is
rendered as a template and remains tintable in SwiftUI/UIKit.

Sources: Coding guidelines, Learnings

Why:
- keep users on Order Preview when a previous Maya swap is still confirming
- align Podfile.lock with the locally installed pod state used on this branch

What:
- add a dedicated pending-swap DashSpend error and surface it as a system alert in Order Preview
- prevent the previous-swap-pending case from navigating to the Maya failure screen
- refine AddressSourceView subtitle rendering and sync Podfile.lock to Protobuf 3.29.5

Validation:
- attempted xcodebuild for dashwallet
- build is currently blocked by CocoaPods/TodayExtension environment issues outside this code path
@romchornyi

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 9, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@HashEngineering HashEngineering left a comment

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.

LGTM

@romchornyi romchornyi merged commit 8e31a01 into feat/maya Jun 10, 2026
2 checks passed
@coderabbitai coderabbitai Bot mentioned this pull request Jun 10, 2026
5 tasks
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.

5 participants