Skip to content

Conversation

@jorbuedo
Copy link
Contributor

@jorbuedo jorbuedo commented Nov 13, 2025

Aiming for mobile v7. Needs a lot of review and QA, and some of it is still wip


Note

Major mobile overhaul: redesigned Review Tx flow with rich details, P2P connection/CIP-30 handling, notifications refactor, receive and portfolio updates, menu/airdrop tweaks, and broad migrations to new @yoroi APIs.

  • Review TX (major):
    • Add new tabs: Overview, UTxOs, Operations, SmartContracts, Signatures, Details with governance, datums/scripts, reference scripts, withdrawals, required signers/witnesses, and timing/network info.
    • Implement memo (with length checks), optimistic tx recording, robust txId derivation, improved SW/HW signing/submit, and error/logging.
    • Enhance pool details, operations parsing (incl. DRep formats, combined certs), address display/copied.
  • Notifications:
    • Migrate to @yoroi/wallet-manager APIs; compute summaries from raw tx; add Airdrop banner; skip Byron for rewards; refactors across handlers/UI.
  • P2P (new):
    • Add connection provider, CIP-30 message handler, status bar, and connection screen with WebRTC/signaling.
  • Receive:
    • Switch to Cardano Pay v1 links; locale-safe amount parsing; last-used via raw tx; UI polish.
  • Portfolio:
    • Remove DApps tabs/mock UIs; migrate hooks/types to new packages; tweak token managers (drop Preview); chart/formatting/balances updates.
  • Menu/Airdrop/Links:
    • Gate Staking/Governance/Catalyst for non-Byron; add Message Signing; Airdrop badge; use markActionProcessed.
  • Misc:
    • Replace legacy utils with @yoroi/* equivalents; fix saturation display; widespread type/tests/format updates.

Written by Cursor Bugbot for commit 19f0f51. This will update automatically on new commits. Configure here.

@jorbuedo jorbuedo requested a review from stackchain November 13, 2025 09:02
@jorbuedo jorbuedo self-assigned this Nov 13, 2025
@jorbuedo jorbuedo added proposal Feature proposal for triage. Required for non-trivial features. wip Shows that a PR shouldn't be merge dependencies Pull requests that update a dependency file feature fix refactor dont-merge labels Nov 13, 2025
@jorbuedo jorbuedo marked this pull request as draft November 13, 2025 09:12
jorbuedo and others added 9 commits November 19, 2025 16:03
…rmance

- Add isLoading state to SearchContext with setLoading action
- Display loading spinner in navigation header during search
- Sync loading state from pool list query to search context
- Improve pool list with infinite scroll pagination
- Add prefetching for pages 1 and 2 on screen focus
- Optimize search with debouncing and proper query key management
- Add search placeholder translation string
- Fix invalid quantity error handling for pool stake values
- Remove unnecessary React Query caching for transaction building
- Streamline staking flow by removing intermediate confirmation dialog
…r handling

- Update REDEMPTION_API_BASE_URL to use preprod.gd.midnighttge.io
- Fix error handling to treat HTTP 400 with 'no_redeemable_thaws' as no allocations
- Update airdrop screen title from 'Lost and Found NIGHT' to 'Redeem NIGHT'
- Keep mocks enabled for UI testing
- Add feature flag check in Menu component to conditionally show airdrop menu item
- Add feature flag check in MenuNavigator to conditionally register airdrop screen
- Update YoroiConfig type to include midnightAirdrop feature flag
- Feature is controlled via remote config (dev: enabled, prod: disabled)
- Add navigateToAirdrop to WalletNavigation type definition
- Fix TypeScript errors in wallet-manager.ts:
  - Add null check for result before accessing properties
  - Properly type PromiseSettledResult with type guards
  - Fix property access on result.reason and result.value
- Fix prettier formatting issues in wallet-manager.ts
- Resolved conflict in src/wallets/types/yoroi.ts
- Combined features type to support both midnightAirdrop and Record<string, unknown>
- Added dapps configuration from develop branch
- Resolved conflict in HomeScreen.tsx (removed outdated @emurgo/yoroi-lib import)
- Verified all merged files follow new patterns (atoms, useTheme, Space, useStrings)
- Added new useGovernanceVoteFlow hook from develop
- Added Steelswap adapter support
- Remove unused ReactNode import from HomeScreen.tsx
- Fix duplicate test titles in transformers.test.ts
- Fix type mismatch in useGovernanceVoteFlow (use {cbor: string} instead of YoroiUnsignedTx)
- Add Byron wallet detection hook (useIsByronWallet)
- Add address utilities (isByronAddress, normalizeToAddress)
- Hide unsupported features for Byron wallets (Staking, Governance, Catalyst, Airdrop, Swap, Discover tab)
- Hide Send, Swap, and Buy/Sell actions in transaction history for Byron wallets
- Add Byron wallet notice banner in transaction history (non-dismissable)
- Fix proactive fee reduction for 'send all ADA' scenario (general improvement)
- Improve address parsing to handle Byron (base58), Shelley (bech32), and hex formats
- Add defensive error handling for Byron addresses in various operations
- Revert broken Byron transaction signing logic (signing still not supported)

Note: Byron wallets can be restored and viewed, but cannot send transactions due to signing limitations.
- Add comprehensive logging for redeem flow (request, response, parsed CBOR)
- Fix redeemable detection to include thaws that have started but backend hasn't marked as redeemable yet
- Add automatic refetching when thaw periods start to update UI
- Remove background color from redeemable now card when no redeemable amount
- Only highlight current thaw in timeline when it's actually redeemable
- Update all screens to use consistent redeemable detection logic
- Add result-screen to AirdropNavigator for error display
- Update useResultNavigation to support multiple navigators
- Change insufficient funds error logs from error to info level
- Use CommonActions.reset for navigation from error screen
- Add insufficient funds error detection for 'No UTXOs available' message
Updated the gap limit for address discovery from 20 to 40 unused addresses.
This allows the wallet to discover more addresses before stopping, while
maintaining the 50-block rule for address discovery.
…vigate to success

- Fix preventSubmit=true path to sign transactions for non-HW wallets
- Add signTx() function for signing without blockchain submission
- Refactor submitTx() to use signTx() internally
- Add navigation to success screen after successful redemption API submission
- Add comprehensive error logging throughout the flow
- Create REDEEM_FLOW_REPORT.md documenting successful flow
- Clean up verbose debug logs while preserving error logs
const isDevelopment =
process.env.EAS_BUILD_PROFILE === 'development' ||
process.env.EXPO_PUBLIC_BUILD_VARIANT === 'DEV' ||
(!isProduction && !isPreview) // Default to dev for local builds
Copy link

Choose a reason for hiding this comment

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

Bug: Build variant checks are not mutually exclusive

The isDevelopment variable can be true even when isProduction is true. If EAS_BUILD_PROFILE === 'production' but a stale or misconfigured EXPO_PUBLIC_BUILD_VARIANT === 'DEV' is present, both isProduction and isDevelopment will evaluate to true. Since only isDevelopment is used for determining bundle identifiers, this could cause a production build to use development bundle IDs (com.emurgo.yoroi.dev / com.emurgo.dev), which would be a serious deployment issue. The check for isDevelopment needs to explicitly exclude production and preview builds.

Fix in Cursor Fix in Web

…submission

- Changed preventSubmit from true to false in dapp connector handlers
- Transactions now submit automatically when user confirms in review screen
- Cleaned up verbose debugging logs added during troubleshooting
- Fixed TypeScript errors with getLogger() calls (removed arguments)
…icon colors

- Add NIGHT redemption transaction type detection based on NIGHT token spending and smart contract interaction
- Implement direction-based icon colors: primary blue for SENT (spending), success green for RECEIVED (receiving)
- Add NIGHT redemption localization strings and display text
- Fix effective direction calculation for NIGHT redemption based on net delta
- Fix lint issue: add wallet.id to useCallback dependencies
…TION mode

Fixed issue where reward withdrawals with hardware wallets failed with error:
'withdrawal must be given as a path in TransactionSigningMode.ORDINARY_TRANSACTION'

The problem was that ownStakeAddressMap was not properly populated with the
reward address, causing formatLedgerWithdrawals to fall back to KEY_HASH,
which is not allowed in ORDINARY_TRANSACTION mode.

Changes:
- Added getStakeAddressMap helper function to build stake address map
  with reward address mapped to staking derivation path
- Updated cip30-ledger.ts and cardano-wallet.ts to use proper stake address map
  instead of duplicating payment address map
@jorbuedo jorbuedo merged commit 828b5b6 into develop Dec 11, 2025
4 of 5 checks passed
@jorbuedo jorbuedo deleted the mobile-experimental branch December 11, 2025 21:48
!isPreview &&
(process.env.EAS_BUILD_PROFILE === 'development' ||
process.env.EXPO_PUBLIC_BUILD_VARIANT === 'DEV' ||
true) // Default to dev for local builds when neither production nor preview
Copy link

Choose a reason for hiding this comment

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

Bug: Development build logic always evaluates to true

The isDevelopment variable always evaluates to true due to the trailing || true in the expression. While it's documented as "Default to dev for local builds when neither production nor preview", the || true makes the preceding conditions irrelevant - even if isProduction and isPreview are both false, the expression short-circuits to true. This means if environment variables are unset or misconfigured, production builds could incorrectly use development bundle IDs (com.emurgo.dev), which would break app store submissions and cause issues with push notifications and other services tied to bundle identifiers.

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file feature fix refactor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants