feat(mobile): Metro monorepo config, mobile CI, EAS profiles, earn screen - #599
Conversation
|
@Salmatcre8 is attempting to deploy a commit to the miracle656's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@Salmatcre8 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
Rebuilds PR Miracle656#599 onto current main. The branch was cut before ~20 mobile PRs landed, so it was reconstructed as the subset that is still net-new, dropping the pieces main already shipped. Kept: - app/earn.tsx + lib/blend.ts + lib/sorobanTx.ts: Blend lending pools with passkey-gated supply/withdraw, replacing the placeholder screen (Miracle656#475) - lib/passkey.ts: requirePasskey() — assert over a fresh challenge so the biometric prompt proves presence before a tx is built - metro.config.js: watch the repo root and sdk/, resolve the workspace SDK and its hoisted deps, follow the symlink to the TS sources (Miracle656#430) - .github/workflows/mobile.yml: typecheck + lint + test, scoped to frontend/mobile/** (Miracle656#439) - store/: Android/iOS listing drafts and build checklist (Miracle656#500, metadata half) Dropped as superseded by work already on main: - eas.json — main's build config (xyz.veil.wallet) is newer and more complete - app.json — main replaced it with app.config.ts tsc --noEmit clean; jest 358/358; expo lint 0 errors. closes Miracle656#430 closes Miracle656#439 closes Miracle656#475
f36a959 to
e4c56a2
Compare
|
Maintainer note — rebased and reduced onto This branch was cut before ~20 mobile PRs landed, so it no longer applied. I rebuilt it as the subset that is still net-new and dropped what Kept
Dropped as superseded
Heads-up: while rebasing I found Local verification on this branch: |
Draft — one branch covering four mobile backlog items. Landing them together
because they stack: Metro has to reach the workspace SDK before the earn screen
can import it, and CI/EAS are what prove the result builds.
closes #430
closes #439
closes #500
closes #475
What landed
metro.config.js— watch repo root +sdk/,nodeModulesPaths,unstable_enableSymlinksc085121.github/workflows/mobile.yml— install +tsc --noEmit+expo lint+ tests, scoped tofrontend/mobile/**41ddfd6eas.json(development/preview/production) + store listing drafts, Android firste339e9eapp/earn.tsx+lib/blend.ts— Blend positions/APYs, passkey-gated supply/withdrawf36a959#430 — Metro monorepo config
metro.config.jspreviously only wired the@/*tsconfig aliases, so anythingoutside
frontend/mobilewas invisible to the bundler. Now it also:node_modules/invisible-wallet-sdk -> ../sdk) andsdk/itself, since symlinked modules are watched by their real path;frontend/mobile/node_modules, then the hoisted rootnode_modules, thensdk/node_modules, so the SDK's own dependencies resolve once Metro steps outside the app;resolver.unstable_enableSymlinksso the workspace link is followed to the TypeScript sources;invisible-wallet-sdk -> sdk/viaextraNodeModulesas a fallback for installs that skipped the workspace root.react-native-passkeyis added to the app's dependencies: it is the SDK'sdeclared peer for
webauthn.native.ts, and without it the native WebAuthn pathcannot resolve.
Verification. Built the Android Metro dependency graph for an entry that does
nothing but
import { useInvisibleWallet } from 'invisible-wallet-sdk':That is the acceptance criterion: the import resolves through the package's
"react-native": "src/index.ts"field and Metro pickswebauthn.native.tsoverthe browser
webauthn.ts.#439 — Mobile CI
New
Mobileworkflow rather than a job insideci.yml: GitHub Actions filterspaths per workflow, not per job, so a job in
ci.ymlcould not be scoped tofrontend/mobile/**without affecting the contracts, sdk, wallet and websitejobs. Follows the same shape as the existing
storybook.ymlandwallet-e2e.yml.pull_requestandpushtomainforfrontend/mobile/**and the workflow file itself, plusworkflow_dispatchfrontend/mobile/package-lock.jsonnpm ci || npm install, thennpx tsc --noEmit,npx expo lint,npm test -- --ciconcurrencycancels superseded runsThis PR touches
frontend/mobile/**, so the workflow exercises itself here.#500 — EAS profiles and store metadata
eas.json:developmentpreviewproductionautoIncrementappVersionSource: remote, so EAS ownsversionCode/buildNumberandapp.jsoncarries only the user-facing
version.expo-dev-clientis added because thedevelopmentprofile is unusable without it.android.packageandios.bundleIdentifierare set toapp.veil.wallet, and there arebuild:android:*npm scripts.All three profiles pin
EXPO_PUBLIC_NETWORK=testnetdeliberately — a store buildpointed at mainnet contracts that are not deployed yet is worse than no store
build. Everything account-specific (
EXPO_PUBLIC_WC_PROJECT_ID,EXPO_PUBLIC_PASSKEY_RP_ID) belongs in EAS secrets, documented rather thancommitted.
Store metadata under
frontend/mobile/store/:README.md— build commands, secrets, application id, asset spec table, screenshot shot list, pre-launch checklistandroid/play-listing.md— name/short/full description within Play's limits, release notes, data safety answers derived from what the code actually does, content rating notesios/app-store-listing.md— drafted, explicitly blocked on the Apple account andassociatedDomains(backlog feat: implementuseInvisibleWalletReact hook for WebAuthn-powered … #18)Not verified:
eas build -p android --profile previewneeds an Expo account,eas initfor a project id, and Play App Signing forassetlinks.json(backlog #19). The config and metadata are what this PR can deliver; the build
itself has to be run by someone holding those credentials.
#475 — Earn screen
app/earn.tsxreplaces the placeholder with the ported flow, andlib/blend.tsmirrors
frontend/wallet/lib/blend.ts(V2 pool contract with a V1 fallback,EXPO_PUBLIC_BLEND_POOL_IDS,@blend-capital/blend-sdk@^3.3.0matching thewallet).
requirePasskey()(new inlib/passkey.ts) asserts over a fresh 32-byte random challenge, so the biometric prompt actually proves presence rather than decorating the flowlib/sorobanTx.tssimulates, assembles, signs with the fee-payer key, submits and polls to successDifferences from the web page, all forced by the platform: wallet address and
fee-payer secret come from the keychain (
expo-secure-store) instead ofsession/local storage, and the
beginTx/endTxinactivity-lock hooks have nomobile equivalent yet.
Checks
9 of those tests are new, covering the Blend read path: APY averaging, supply
summing, the name fallback, the V1 fallback, dropping a dead pool, empty-reserve
pools reporting 0 rather than
NaN, filtering reserves with no position, andnever reporting negative accrued interest.
Known pre-existing blocker (not addressed here)
A full native bundle currently fails, on
mainas well as on this branch:@stellar/stellar-sdkresolves through itsexportsdefaultcondition to theNode build, which pulls
eventsource, which requires Node'surl. Reproducedwith an entry importing only the app's own
lib/network.ts, so it is unrelatedto SDK resolution — it blocks any Android bundle today, which is also why
eas buildcannot be smoke-tested from here even with credentials. Left out ofthis PR because the fix is a product decision (
browsercondition vs the SDK'sno-eventsourceentry) affecting all app code, not just the workspace SDK.Happy to file it separately.