Skip to content

feat(android): native CASH card and funding overlay - #1355

Open
filvecchiato wants to merge 88 commits into
hosts/ios-cash-cardfrom
hosts/android-cash-card
Open

filvecchiato wants to merge 88 commits into
hosts/ios-cash-cardfrom
hosts/android-cash-card

Conversation

@filvecchiato

@filvecchiato filvecchiato commented Oct 9, 2026 •

Copy link
Copy Markdown
Collaborator

Part of #1267. Stacked on #1345; the iOS counterpart.

The Android CASH card and funding sheet, drawn natively from the core's funding API (Figma R2).

Sheet

  • Amount: Crypto, Card and Bank tabs, a keypad, presets on Add, the core's min and max per rail, asset, network and country, and "Not enough CASH". Fees round up, balances down.
  • Card and bank: summary, fees, payment country, and Change provider with the countdown to the next refresh.
  • Crypto: network and token, deposit QR, copy address and amount, Cancel top-up.

Provider frame

  • The provider's App as a full-height dialog; a bank transfer adds "I've sent funds".
  • External https pages only, with the origin in the header, camera and file upload for KYC, and Returned(url) at the return URL.

Progress and cancel

  • The app keeps the progress each fundingSessionChanged carries (AppFundingHostBridge.progress) and never reads it from the core.
  • Before money moves, Cancel asks the provider and "Cancel anyway" ends the session. After, the provider decides: a refusal shows its reason; an offer shows fee, refund and deadline with Accept or Keep going. A credited top-up is too late to cancel.
  • When the core drops a call, the sheet and the frame close.

CASH card (Purse)

  • A leather-wallet card; the page runs card → Get/Send → Total panel → history. Release builds show Send without Get.
  • In-progress dock, delayed session first; history grouped by day with the core's FundingStatus wording.
  • Ended sessions go to product_funding_records (Room 71→72) and are then acknowledged; a lost history is rebuilt once per process from funding_history().
  • Motion (PocketMotion) for finished sessions, failures and the balance.

Platform

  • At launch the app starts the core when a provider still works on a session.
  • Country detection: coarse location only if already permitted, then SIM or network, then locale; never prompts.
  • Debug, nightly and safetynet builds can bundle products/fundtest (scripts/bundle-funding-provider.sh, local opt-in).

Outside funding: every product payment shows Confirm; a worker manifest without includes is accepted; the getcash and Meld path is removed.

funding

@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

This pull request touches an app, which is not built by default. Add a label for each build you want:

  • Android build, android-device-build: attaches an APK that installs on an Android phone or an emulator.

Each starts as soon as it is added and follows the branch from then on.

@github-actions github-actions Bot added the host-android Touches the Android host tree label Oct 9, 2026
@github-actions

github-actions Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Bundle size report

Compared with main at b5cf884.

Raw Gzip Brotli
truapi-host 8.42 MiB (+159.6 KiB, +1.9%) 5.84 MiB (+53.0 KiB, +0.9%) 5.51 MiB (+36.0 KiB, +0.6%)
truapi-provider 4.03 MiB 1.27 MiB 960.2 KiB
truapi 7.13 MiB (+75.7 KiB, +1.0%) 1012.4 KiB (+12.7 KiB, +1.3%) 826.6 KiB (+10.2 KiB, +1.2%)
trinity-stack 562.4 KiB 225.5 KiB 186.6 KiB
Total 20.13 MiB (+235.4 KiB, +1.2%) 8.32 MiB (+65.7 KiB, +0.8%) 7.44 MiB (+46.1 KiB, +0.6%)

WebAssembly modules

Raw Gzip Brotli
truapi-host/wasm/web/truapi_server_bg.wasm 3.31 MiB (+158.8 KiB, +4.9%) 1.14 MiB (+52.8 KiB, +4.7%) 871.5 KiB (+35.8 KiB, +4.3%)
truapi-host/wasm/web/truapi_verifiable_bg.wasm 4.89 MiB 4.64 MiB 4.61 MiB
truapi-provider/truapi_provider_bg.wasm 3.99 MiB 1.26 MiB 952.5 KiB
trinity-stack/wasm/trinity_stack_bg.wasm 525.1 KiB 217.1 KiB 179.3 KiB
Changed files (9)
Raw Gzip Brotli
truapi-host/wasm/web/truapi_server_bg.wasm 3.31 MiB (+158.8 KiB, +4.9%) 1.14 MiB (+52.8 KiB, +4.7%) 871.5 KiB (+35.8 KiB, +4.3%)
truapi/explorer/codegen/types.js 295.0 KiB (+28.7 KiB, +10.8%) 41.4 KiB (+4.4 KiB, +12.0%) 32.7 KiB (+3.5 KiB, +12.1%)
truapi/playground/codegen/truapi-dts.js 365.0 KiB (+26.4 KiB, +7.8%) 62.9 KiB (+5.1 KiB, +8.8%) 50.4 KiB (+4.0 KiB, +8.7%)
truapi/generated/types.js 83.2 KiB (+6.6 KiB, +8.6%) 10.3 KiB (+1.1 KiB, +11.4%) 8.6 KiB (+824 B, +10.3%)
truapi/generated/client.js 88.0 KiB (+5.8 KiB, +7.1%) 13.1 KiB (+993 B, +8.0%) 10.9 KiB (+815 B, +7.9%)
truapi/playground/codegen/services.js 120.9 KiB (+5.6 KiB, +4.9%) 18.0 KiB (+981 B, +5.6%) 15.1 KiB (+808 B, +5.5%)
truapi/generated/wire-decode.js 35.8 KiB (+2.1 KiB, +6.2%) 3.6 KiB (+171 B, +4.9%) 3.0 KiB (+151 B, +5.1%)
truapi-host/generated/host-callbacks.js 12.6 KiB (+883 B, +7.3%) 3.9 KiB (+208 B, +5.4%) 3.3 KiB (+175 B, +5.4%)
truapi/generated/wire-table.js 11.0 KiB (+603 B, +5.7%) 1.8 KiB (+69 B, +3.9%) 1.4 KiB (+57 B, +4.1%)

Commit: 796d49a

@github-actions

github-actions Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

CI Status: not green, 1 item needs attention.

  • rust: failure
All job results
job result
android-app success
android-bindings success
bundle-size success
changes success
changeset-guard skipped
cli-package skipped
codegen success
e2e skipped
explorer success
funding-battery skipped
headless-install success
host-wasm success
ios-app skipped
ios-bindings success
licenses success
playground success
provider-android-bindings skipped
release-guard success
rust failure
ts-client success
ts-debugger success
ts-host success
ts-trinity-stack success
wasm-provider success
workflow-lint skipped

Signing credentials: valid as of 2026-10-28

Commit 796d49aa · run log

@filvecchiato
filvecchiato marked this pull request as ready for review October 20, 2026 11:17
@filvecchiato
filvecchiato requested a review from a team as a code owner October 20, 2026 11:17
…droid-cash-card

# Conflicts:
#	android/truapi-host/README.md
#	android/truapi-host/src/main/kotlin/io/parity/truapi/TrUAPIHost.kt
#	hosts/android/feature/products/api/src/main/kotlin/io/paritytech/polkadotapp/feature_products_api/presentation/deeplink/ProductDeepLinkGate.kt
#	hosts/android/feature/products/impl/src/main/java/io/paritytech/polkadotapp/feature_products_impl/di/ProductsModule.kt
#	hosts/android/feature/products/impl/src/main/java/io/paritytech/polkadotapp/feature_products_impl/domain/truapi/TrUAPIHostRuntimeProvider.kt
#	hosts/android/feature/products/impl/src/main/java/io/paritytech/polkadotapp/feature_products_impl/presentation/deeplink/PocketDeepLinkHandler.kt
#	hosts/android/feature/products/impl/src/test/java/io/paritytech/polkadotapp/feature_products_impl/domain/paymentRequest/RealRequestPaymentUseCaseTest.kt
#	hosts/android/feature/products/impl/src/test/java/io/paritytech/polkadotapp/feature_products_impl/domain/truapi/TrUAPIHostRuntimeProviderTest.kt
#	hosts/android/feature/wallet/impl/src/main/java/io/paritytech/polkadotapp/feature_wallet_impl/presentation/pocket/DigitalDollarCardDetailsViewModel.kt
#	hosts/android/feature/wallet/impl/src/main/java/io/paritytech/polkadotapp/feature_wallet_impl/presentation/pocket/compose/components/digitalDollar/CoinageCardContent.kt
#	hosts/android/feature/wallet/impl/src/main/java/io/paritytech/polkadotapp/feature_wallet_impl/presentation/pocket/compose/components/digitalDollar/CoinageStateCard.kt
#	hosts/android/feature/wallet/impl/src/main/java/io/paritytech/polkadotapp/feature_wallet_impl/presentation/pocket/compose/components/digitalDollar/DigitalDollarCard.kt
#	hosts/android/feature/wallet/impl/src/main/java/io/paritytech/polkadotapp/feature_wallet_impl/presentation/pocket/compose/components/digitalDollar/DigitalDollarCardDetails.kt
…eets, history sections, milestone timeline with band and last-heard line, bank cancel copy
@github-actions

Copy link
Copy Markdown
Contributor

This pull request touches an app, which is not built by default. Add a label for each build you want:

  • iOS simulator build, ios-simulator-build: builds the iOS app and attaches a build for the iOS Simulator on a Mac; its unit tests run on every pull request.
  • iOS device build, ios-device-build: attaches a signed build that installs on a registered iPhone or iPad.

Each starts as soon as it is added and follows the branch from then on.

@github-actions github-actions Bot added the host-ios Touches the iOS host tree label Oct 27, 2026
@filvecchiato
filvecchiato changed the base branch from funding/host-gaps to hosts/ios-cash-card October 27, 2026 15:31
@filvecchiato
filvecchiato added this pull request to stack #1716 October 27, 2026 15:31
@filvecchiato filvecchiato self-assigned this Oct 28, 2026
…droid-cash-card

# Conflicts:
#	hosts/android/feature/products/impl/src/main/java/io/paritytech/polkadotapp/feature_products_impl/domain/truapi/worker/TrUAPIWorkerSupervisor.kt
#	hosts/android/feature/products/impl/src/test/java/io/paritytech/polkadotapp/feature_products_impl/domain/truapi/worker/TrUAPIWorkerSupervisorTest.kt

This branch has not been deployed

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

Labels

host-android Touches the Android host tree host-ios Touches the iOS host tree

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Hosts: serve funding to the core Overlay: status and complete Overlay: inputs and providers Balance card entry and funding history

2 participants