-
Notifications
You must be signed in to change notification settings - Fork 57
feature(wallet, links, tx, yoroi-lib, etc.): Mobile experimental #4347
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…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
mobile/app.config.js
Outdated
| const isDevelopment = | ||
| process.env.EAS_BUILD_PROFILE === 'development' || | ||
| process.env.EXPO_PUBLIC_BUILD_VARIANT === 'DEV' || | ||
| (!isProduction && !isPreview) // Default to dev for local builds |
There was a problem hiding this comment.
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.
…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
| !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 |
There was a problem hiding this comment.
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.
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.
Overview,UTxOs,Operations,SmartContracts,Signatures,Detailswith governance, datums/scripts, reference scripts, withdrawals, required signers/witnesses, and timing/network info.@yoroi/wallet-managerAPIs; compute summaries from raw tx; add Airdrop banner; skip Byron for rewards; refactors across handlers/UI.markActionProcessed.@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.