Skip to content

Conversation

@bordalix
Copy link
Collaborator

@bordalix bordalix commented Oct 13, 2025

Closes #155

@tiero please review

Summary by CodeRabbit

  • Refactor

    • Removed iframe support; the app now always renders native views.
    • Simplified init, wallet, and send flows; success screen always displays.
    • Removed the cancel option from Send Details.
  • Chores

    • Removed the in-app alert banner.
    • Receive button is always enabled.
    • Self-send nudge is always shown.
    • Simplified UTXO transaction availability to depend solely on limits.
    • Reduced console output around refund operations.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 13, 2025

Walkthrough

Removed the iframe integration and related UI paths across the app, including provider, context usage, and conditional renders. Deleted Riga-specific constant and checks. Eliminated alert fetching logic and some console logs. Simplified initialization and wallet/send flows to render directly without iframe handling.

Changes

Cohort / File(s) Summary
Iframe integration removal
src/providers/iframe.tsx, src/App.tsx, src/index.tsx, src/screens/Init/Init.tsx, src/screens/Wallet/Index.tsx, src/screens/Wallet/Send/Details.tsx, src/screens/Wallet/Send/Success.tsx, src/components/Minimal.tsx
Deleted iframe provider/context and all iframeUrl-based control paths; removed Minimal wrapper usage; app now renders flows directly without inter-frame messaging or conditional iframe routes.
Alerts removal
src/lib/alerts.ts, src/screens/Wallet/Index.tsx
Deleted getAlert and its usage; removed alert state/effects and InfoBox rendering.
Riga constant cleanup
src/lib/constants.ts, src/providers/limits.tsx, src/screens/Wallet/Send/Form.tsx
Removed exported isRiga; eliminated Riga-specific checks in limits and self-send nudge logic.
Logging adjustments
src/lib/lightning.ts
Removed two console logs around refundVHTLC in refundFailedSubmarineSwaps; no functional changes.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor User
  participant Browser
  participant App
  participant Wallet
  Note over App: New flow (iframe removed)

  User->>Browser: Load app
  Browser->>App: Initialize providers
  App->>Wallet: Render Init/Wallet/Send screens directly
  Wallet-->>App: State updates (balance, send, success)
  App-->>User: UI updates

  rect rgba(240,240,255,0.6)
  Note over Browser,Wallet: Previously (removed)
  participant Iframe as Iframe (removed)
  App-x Iframe: Create context, manage iframeUrl
  Iframe-x App: postMessage status/send
  App-x Wallet: Navigate based on iframe messages
  end
Loading
sequenceDiagram
  autonumber
  actor User
  participant Wallet as Wallet Send Flow
  participant Network as Lightning/On-chain

  Note over Wallet: New send flow (no iframe)
  User->>Wallet: Enter address/invoice
  Wallet->>Wallet: Compute fees/total, validate
  Wallet->>Network: Broadcast/pay
  Network-->>Wallet: Success/Failure
  Wallet-->>User: Show success or error
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • update to ts-sdk 0.2.0 #121 — Modifies providers/iframe.tsx and related App logic; overlaps with this PR’s removal of the iframe provider and its usage.

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 2 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Title Check ❓ Inconclusive The title “Cleanup” is overly generic and does not clearly convey the primary change since it could apply to any refactoring or code removal and fails to specify what was cleaned up. Consider updating the title to briefly summarize the core change such as “Remove iframe integration and VITE_IS_RIGA cleanup” to improve clarity.
Out of Scope Changes Check ❓ Inconclusive The PR also deletes iframe integration modules, getAlert logic, Minimal components, and alert UI which may go beyond the stated goal of removing VITE_IS_RIGA unless these parts were explicitly intended as part of the cleanup scope. Please confirm whether removing iframe support, alert handling, and the Minimal component aligns with the intended scope of issue #155 or if these should be moved to a separate cleanup task.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues Check ✅ Passed The pull request fully removes the VITE_IS_RIGA constant and all its usages as well as cleaning up related code paths in limits and forms, fulfilling issue #155’s requirements for removing Riga-specific configuration and performing cleanup.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch cleanup

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b121a1a and ea1170b.

📒 Files selected for processing (13)
  • src/App.tsx (0 hunks)
  • src/components/Minimal.tsx (0 hunks)
  • src/index.tsx (1 hunks)
  • src/lib/alerts.ts (0 hunks)
  • src/lib/constants.ts (0 hunks)
  • src/lib/lightning.ts (0 hunks)
  • src/providers/iframe.tsx (0 hunks)
  • src/providers/limits.tsx (1 hunks)
  • src/screens/Init/Init.tsx (0 hunks)
  • src/screens/Wallet/Index.tsx (1 hunks)
  • src/screens/Wallet/Send/Details.tsx (2 hunks)
  • src/screens/Wallet/Send/Form.tsx (1 hunks)
  • src/screens/Wallet/Send/Success.tsx (0 hunks)
💤 Files with no reviewable changes (8)
  • src/screens/Init/Init.tsx
  • src/lib/constants.ts
  • src/lib/lightning.ts
  • src/providers/iframe.tsx
  • src/screens/Wallet/Send/Success.tsx
  • src/App.tsx
  • src/lib/alerts.ts
  • src/components/Minimal.tsx
🧰 Additional context used
🧬 Code graph analysis (1)
src/index.tsx (1)
src/App.tsx (1)
  • App (35-154)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Workers Builds: arkadeprod
  • GitHub Check: Cloudflare Pages: wallet-bitcoin-v8
🔇 Additional comments (5)
src/providers/limits.tsx (1)

167-167: LGTM! Consistent simplification.

The removal of Riga-specific logic makes utxoTxsAllowed consistent with lnSwapsAllowed and vtxoTxsAllowed. All three functions now follow the same pattern of checking only the limit configuration.

src/index.tsx (1)

36-36: LGTM! Clean removal of iframe infrastructure.

The unconditional rendering of <App /> simplifies the provider tree and aligns with the removal of IframeProvider and iframe-based routing logic throughout the codebase.

src/screens/Wallet/Send/Details.tsx (1)

35-35: LGTM! Simplified sendInfo destructuring.

The removal of the text field from sendInfo destructuring is consistent with eliminating iframe-based display logic, streamlining the component to focus on core transaction details.

src/screens/Wallet/Send/Form.tsx (1)

360-366: LGTM! Removed environment-specific gating.

The removal of the isRiga check simplifies the logic and ensures the self-send nudge is consistently displayed to all users attempting to send to themselves, improving the overall user experience.

src/screens/Wallet/Index.tsx (1)

53-53: LGTM! Receive button now unconditionally enabled.

The removal of the disabled prop based on isRiga simplifies the UI logic and ensures the Receive functionality is consistently available to all users.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@cloudflare-workers-and-pages
Copy link

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
❌ Deployment failed
View logs
arkadeprod ea1170b Oct 13 2025, 02:49 PM

@cloudflare-workers-and-pages
Copy link

Deploying wallet-mutinynet with  Cloudflare Pages  Cloudflare Pages

Latest commit: ea1170b
Status: ✅  Deploy successful!
Preview URL: https://e79d9e63.arkade-wallet.pages.dev
Branch Preview URL: https://cleanup.arkade-wallet.pages.dev

View logs

@cloudflare-workers-and-pages
Copy link

Deploying wallet-bitcoin-v8 with  Cloudflare Pages  Cloudflare Pages

Latest commit: ea1170b
Status: ✅  Deploy successful!
Preview URL: https://7997213b.wallet-v8.pages.dev
Branch Preview URL: https://cleanup.wallet-v8.pages.dev

View logs

@tiero tiero merged commit fce53cf into master Oct 13, 2025
5 of 6 checks passed
@bordalix bordalix deleted the cleanup branch October 15, 2025 13:51
This was referenced Oct 28, 2025
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.

Remove VITE_IS_RIGA and cleanup

3 participants