Repository navigation
Conversation
WalkthroughThe changes update the project to use the latest SDK version and refactor code to leverage new SDK abstractions, especially for ASP information retrieval and transaction handling. Types and constants are updated for improved type safety, particularly with BigInt values. Several components and providers are refactored to use the new types and SDK interfaces, new database query methods are introduced, and UI components related to back navigation buttons are removed. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant App
participant AspProvider
participant SDK(RestArkProvider)
participant Wallet
User->>App: Load/Interact
App->>AspProvider: Request ASP info
AspProvider->>SDK(RestArkProvider): getInfo(url)
SDK(RestArkProvider)-->>AspProvider: Return ArkInfo (with BigInt fields)
AspProvider-->>App: Provide ArkInfo (with unreachable, url)
App->>Wallet: Wallet operations (send, redeem, etc.)
Wallet->>SDK(RestArkProvider): Use SDK abstractions for transactions
SDK(RestArkProvider)-->>Wallet: Transaction results
Wallet-->>App: Update UI
sequenceDiagram
participant App
participant DB(vtxosRepository)
App->>DB: getSpentVtxos()
DB-->>App: Return spent vtxos
App->>DB: getSweptVtxos()
DB-->>App: Return swept vtxos
Estimated code review effort1 (package.json, constants.ts, types.ts, ionic.css, Error.tsx, notifications.tsx, screens/Settings/About.tsx, screens/Wallet/Notes/Form.tsx, screens/Wallet/Receive/QrCode.tsx, screens/Wallet/Send/Form.tsx, screens/Wallet/Transaction.tsx, screens/Settings/Server.tsx, screens/Settings/Vtxos.tsx, screens/Init/Connect.tsx, lib/arknote.ts, components/BackToWalletButton.tsx, screens/Wallet/Notes/Success.tsx, screens/Wallet/Receive/Amount.tsx, screens/Wallet/Receive/Success.tsx) (<30 minutes) 📜 Recent review detailsConfiguration used: CodeRabbit UI ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Deploying arkade-wallet with
|
| Latest commit: |
89af714
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://5431a4bb.arkade-wallet.pages.dev |
| Branch Preview URL: | https://v7.arkade-wallet.pages.dev |
|
tACK |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
src/screens/Settings/Server.tsx (1)
3-3: Rename Error import to avoid shadowing global.The import name
Errorshadows the globalErrorconstructor, which can cause confusion.-import Error from '../../components/Error' +import ErrorComponent from '../../components/Error'Then update the usage on line 74:
- <Error error={Boolean(error)} text={error} /> + <ErrorComponent error={Boolean(error)} text={error} />
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (16)
package.json(1 hunks)src/App.tsx(1 hunks)src/lib/asp.ts(5 hunks)src/lib/constants.ts(1 hunks)src/lib/db.ts(1 hunks)src/lib/wallet.ts(1 hunks)src/providers/asp.tsx(4 hunks)src/providers/notifications.tsx(1 hunks)src/providers/wallet.tsx(1 hunks)src/screens/Settings/About.tsx(1 hunks)src/screens/Settings/Server.tsx(2 hunks)src/screens/Settings/Vtxos.tsx(4 hunks)src/screens/Wallet/Notes/Form.tsx(1 hunks)src/screens/Wallet/Receive/QrCode.tsx(1 hunks)src/screens/Wallet/Send/Form.tsx(2 hunks)src/screens/Wallet/Transaction.tsx(1 hunks)
🧰 Additional context used
🧠 Learnings (13)
📓 Common learnings
Learnt from: bordalix
PR: arkade-os/wallet#114
File: src/lib/asp.ts:0-0
Timestamp: 2025-06-30T18:33:29.839Z
Learning: In src/lib/asp.ts, only the collaborativeExit function should accept both IWallet and ServiceWorkerWallet types. Other wallet functions (getBalance, getTxHistory, getReceivingAddresses, redeemNotes, sendOnChain, settleVtxos) should maintain their original IWallet-only signatures and not be updated for consistency.
src/screens/Settings/About.tsx (1)
Learnt from: bordalix
PR: arkade-os/wallet#114
File: src/lib/asp.ts:0-0
Timestamp: 2025-06-30T18:33:29.839Z
Learning: In src/lib/asp.ts, only the collaborativeExit function should accept both IWallet and ServiceWorkerWallet types. Other wallet functions (getBalance, getTxHistory, getReceivingAddresses, redeemNotes, sendOnChain, settleVtxos) should maintain their original IWallet-only signatures and not be updated for consistency.
src/App.tsx (1)
Learnt from: bordalix
PR: arkade-os/wallet#114
File: src/lib/asp.ts:0-0
Timestamp: 2025-06-30T18:33:29.839Z
Learning: In src/lib/asp.ts, only the collaborativeExit function should accept both IWallet and ServiceWorkerWallet types. Other wallet functions (getBalance, getTxHistory, getReceivingAddresses, redeemNotes, sendOnChain, settleVtxos) should maintain their original IWallet-only signatures and not be updated for consistency.
src/screens/Wallet/Transaction.tsx (1)
Learnt from: bordalix
PR: arkade-os/wallet#114
File: src/lib/asp.ts:0-0
Timestamp: 2025-06-30T18:33:29.839Z
Learning: In src/lib/asp.ts, only the collaborativeExit function should accept both IWallet and ServiceWorkerWallet types. Other wallet functions (getBalance, getTxHistory, getReceivingAddresses, redeemNotes, sendOnChain, settleVtxos) should maintain their original IWallet-only signatures and not be updated for consistency.
src/screens/Wallet/Notes/Form.tsx (2)
Learnt from: bordalix
PR: arkade-os/wallet#114
File: src/lib/asp.ts:0-0
Timestamp: 2025-06-30T18:33:29.839Z
Learning: In src/lib/asp.ts, only the collaborativeExit function should accept both IWallet and ServiceWorkerWallet types. Other wallet functions (getBalance, getTxHistory, getReceivingAddresses, redeemNotes, sendOnChain, settleVtxos) should maintain their original IWallet-only signatures and not be updated for consistency.
Learnt from: bordalix
PR: arkade-os/wallet#106
File: src/lib/bolt11.ts:153-155
Timestamp: 2025-07-07T14:41:35.991Z
Learning: In src/lib/bolt11.ts, the code is copied from the original bitcoinjs/bolt11 library (https://github.com/bitcoinjs/bolt11/blob/master/payreq.js) and should be kept unchanged to maintain compatibility with the upstream source, even if there are potential improvements or syntax issues.
src/screens/Wallet/Receive/QrCode.tsx (3)
Learnt from: bordalix
PR: arkade-os/wallet#114
File: src/lib/asp.ts:0-0
Timestamp: 2025-06-30T18:33:29.839Z
Learning: In src/lib/asp.ts, only the collaborativeExit function should accept both IWallet and ServiceWorkerWallet types. Other wallet functions (getBalance, getTxHistory, getReceivingAddresses, redeemNotes, sendOnChain, settleVtxos) should maintain their original IWallet-only signatures and not be updated for consistency.
Learnt from: bordalix
PR: arkade-os/wallet#106
File: src/lib/bolt11.ts:153-155
Timestamp: 2025-07-07T14:41:35.991Z
Learning: In src/lib/bolt11.ts, the code is copied from the original bitcoinjs/bolt11 library (https://github.com/bitcoinjs/bolt11/blob/master/payreq.js) and should be kept unchanged to maintain compatibility with the upstream source, even if there are potential improvements or syntax issues.
Learnt from: bordalix
PR: arkade-os/wallet#114
File: public/wallet-service-worker.mjs:6350-6353
Timestamp: 2025-06-30T18:23:34.163Z
Learning: Do not review `public/wallet-service-worker.mjs` as it is a built file generated by Vite.
src/screens/Wallet/Send/Form.tsx (2)
Learnt from: bordalix
PR: arkade-os/wallet#114
File: src/lib/asp.ts:0-0
Timestamp: 2025-06-30T18:33:29.839Z
Learning: In src/lib/asp.ts, only the collaborativeExit function should accept both IWallet and ServiceWorkerWallet types. Other wallet functions (getBalance, getTxHistory, getReceivingAddresses, redeemNotes, sendOnChain, settleVtxos) should maintain their original IWallet-only signatures and not be updated for consistency.
Learnt from: bordalix
PR: arkade-os/wallet#106
File: src/lib/bolt11.ts:153-155
Timestamp: 2025-07-07T14:41:35.991Z
Learning: In src/lib/bolt11.ts, the code is copied from the original bitcoinjs/bolt11 library (https://github.com/bitcoinjs/bolt11/blob/master/payreq.js) and should be kept unchanged to maintain compatibility with the upstream source, even if there are potential improvements or syntax issues.
src/providers/wallet.tsx (3)
Learnt from: bordalix
PR: arkade-os/wallet#114
File: src/lib/asp.ts:0-0
Timestamp: 2025-06-30T18:33:29.839Z
Learning: In src/lib/asp.ts, only the collaborativeExit function should accept both IWallet and ServiceWorkerWallet types. Other wallet functions (getBalance, getTxHistory, getReceivingAddresses, redeemNotes, sendOnChain, settleVtxos) should maintain their original IWallet-only signatures and not be updated for consistency.
Learnt from: bordalix
PR: arkade-os/wallet#114
File: public/wallet-service-worker.mjs:6350-6353
Timestamp: 2025-06-30T18:23:34.163Z
Learning: Do not review `public/wallet-service-worker.mjs` as it is a built file generated by Vite.
Learnt from: bordalix
PR: arkade-os/wallet#106
File: src/lib/bolt11.ts:153-155
Timestamp: 2025-07-07T14:41:35.991Z
Learning: In src/lib/bolt11.ts, the code is copied from the original bitcoinjs/bolt11 library (https://github.com/bitcoinjs/bolt11/blob/master/payreq.js) and should be kept unchanged to maintain compatibility with the upstream source, even if there are potential improvements or syntax issues.
src/lib/wallet.ts (2)
Learnt from: bordalix
PR: arkade-os/wallet#114
File: src/lib/asp.ts:0-0
Timestamp: 2025-06-30T18:33:29.839Z
Learning: In src/lib/asp.ts, only the collaborativeExit function should accept both IWallet and ServiceWorkerWallet types. Other wallet functions (getBalance, getTxHistory, getReceivingAddresses, redeemNotes, sendOnChain, settleVtxos) should maintain their original IWallet-only signatures and not be updated for consistency.
Learnt from: bordalix
PR: arkade-os/wallet#106
File: src/lib/bolt11.ts:153-155
Timestamp: 2025-07-07T14:41:35.991Z
Learning: In src/lib/bolt11.ts, the code is copied from the original bitcoinjs/bolt11 library (https://github.com/bitcoinjs/bolt11/blob/master/payreq.js) and should be kept unchanged to maintain compatibility with the upstream source, even if there are potential improvements or syntax issues.
src/lib/db.ts (1)
Learnt from: bordalix
PR: arkade-os/wallet#114
File: src/lib/asp.ts:0-0
Timestamp: 2025-06-30T18:33:29.839Z
Learning: In src/lib/asp.ts, only the collaborativeExit function should accept both IWallet and ServiceWorkerWallet types. Other wallet functions (getBalance, getTxHistory, getReceivingAddresses, redeemNotes, sendOnChain, settleVtxos) should maintain their original IWallet-only signatures and not be updated for consistency.
src/screens/Settings/Vtxos.tsx (1)
Learnt from: bordalix
PR: arkade-os/wallet#114
File: src/lib/asp.ts:0-0
Timestamp: 2025-06-30T18:33:29.839Z
Learning: In src/lib/asp.ts, only the collaborativeExit function should accept both IWallet and ServiceWorkerWallet types. Other wallet functions (getBalance, getTxHistory, getReceivingAddresses, redeemNotes, sendOnChain, settleVtxos) should maintain their original IWallet-only signatures and not be updated for consistency.
src/providers/asp.tsx (2)
Learnt from: bordalix
PR: arkade-os/wallet#114
File: src/lib/asp.ts:0-0
Timestamp: 2025-06-30T18:33:29.839Z
Learning: In src/lib/asp.ts, only the collaborativeExit function should accept both IWallet and ServiceWorkerWallet types. Other wallet functions (getBalance, getTxHistory, getReceivingAddresses, redeemNotes, sendOnChain, settleVtxos) should maintain their original IWallet-only signatures and not be updated for consistency.
Learnt from: bordalix
PR: arkade-os/wallet#106
File: src/lib/bolt11.ts:153-155
Timestamp: 2025-07-07T14:41:35.991Z
Learning: In src/lib/bolt11.ts, the code is copied from the original bitcoinjs/bolt11 library (https://github.com/bitcoinjs/bolt11/blob/master/payreq.js) and should be kept unchanged to maintain compatibility with the upstream source, even if there are potential improvements or syntax issues.
src/lib/asp.ts (2)
Learnt from: bordalix
PR: arkade-os/wallet#114
File: src/lib/asp.ts:0-0
Timestamp: 2025-06-30T18:33:29.839Z
Learning: In src/lib/asp.ts, only the collaborativeExit function should accept both IWallet and ServiceWorkerWallet types. Other wallet functions (getBalance, getTxHistory, getReceivingAddresses, redeemNotes, sendOnChain, settleVtxos) should maintain their original IWallet-only signatures and not be updated for consistency.
Learnt from: bordalix
PR: arkade-os/wallet#106
File: src/lib/bolt11.ts:153-155
Timestamp: 2025-07-07T14:41:35.991Z
Learning: In src/lib/bolt11.ts, the code is copied from the original bitcoinjs/bolt11 library (https://github.com/bitcoinjs/bolt11/blob/master/payreq.js) and should be kept unchanged to maintain compatibility with the upstream source, even if there are potential improvements or syntax issues.
🧬 Code Graph Analysis (4)
src/screens/Settings/About.tsx (1)
src/lib/format.ts (1)
prettyDelta(36-55)
src/screens/Settings/Server.tsx (3)
src/providers/asp.tsx (1)
AspContext(15-22)src/providers/config.tsx (1)
ConfigContext(28-36)src/providers/wallet.tsx (1)
WalletContext(40-54)
src/providers/asp.tsx (1)
src/lib/asp.ts (1)
getAspInfo(44-56)
src/lib/asp.ts (1)
src/lib/logs.ts (1)
consoleError(40-44)
🪛 Biome (1.9.4)
src/screens/Settings/Server.tsx
[error] 7-7: Do not shadow the global "Error" property.
Consider renaming this variable. It's easy to confuse the origin of variables when they're named after a known global.
(lint/suspicious/noShadowRestrictedNames)
🔇 Additional comments (28)
package.json (1)
7-7: SDK @arkade-os/sdk v0.2.0 verified—no known vulnerabilities
- package.json (line 7) now pins
@arkade-os/sdkto0.2.0, which exists in the npm registry.npm view @arkade-os/sdk versionsshows0.2.0as the latest release.npm audit(moderate level) reports no security advisories for this version.Given the major bump from 0.1.x to 0.2.0, please review the SDK’s CHANGELOG for any breaking changes before merging.
src/providers/notifications.tsx (1)
30-30: LGTM - Clean logging simplification.The change from custom
consoleLogto standardconsole.logis a good simplification that maintains the same functionality while reducing dependencies.src/screens/Settings/About.tsx (1)
26-27: LGTM - Proper SDK type adaptations.The changes correctly adapt to the new SDK:
Number()conversion handles the BigInt type returned by the new SDK- Property name change from
pubkeytosignerPubkeyaligns with the SDK API updateThese changes are consistent with the SDK upgrade pattern seen across the codebase.
src/screens/Wallet/Transaction.tsx (2)
49-49: LGTM - Consistent BigInt to number conversion.The
Number()conversion properly handles the BigInt type returned by the new SDK forvtxoTreeExpiry. This is consistent with the pattern used across other files in this PR.
54-54: LGTM - Proper timestamp conversion.The conversion of
bestMarketHour.nextStartTimeto a number is appropriate for the state update and aligns with the SDK's BigInt return types.src/App.tsx (1)
88-88: LGTM - Consistent SDK property name update.The change from
aspInfo.pubkeytoaspInfo.signerPubkeycorrectly adapts the conditional rendering logic to the new SDK API. This maintains the same functionality while using the updated property name.src/screens/Wallet/Receive/QrCode.tsx (1)
31-32: Type conversion correctly handles BigInt values.The explicit conversion to
Number()is appropriate for handling theArkInfotype'sBigIntfields when comparing to zero. This maintains type consistency after the migration fromAspInfotoArkInfo.src/screens/Wallet/Notes/Form.tsx (1)
40-41: API simplification improves code clarity.The direct destructuring of
valuefromArkNote.fromString()eliminates the need for the intermediatedecodedvariable and.dataproperty access. This aligns with the SDK's simplified API.src/screens/Settings/Server.tsx (2)
1-1: Type migration to SDK's ArkInfo is correct.The migration from the local
AspInfotype to the SDK'sArkInfotype maintains consistency with the broader refactoring across the codebase.
27-27: Composite type correctly extends ArkInfo.The intersection type
ArkInfo & { unreachable: boolean; url: string }properly extends the SDK'sArkInfowith the additional properties needed by the application.src/providers/wallet.tsx (1)
163-163: Consistent API simplification with SDK changes.The direct destructuring of
valuefromArkNote.fromString()aligns with the SDK's simplified API and maintains consistency with similar changes in other components.src/lib/constants.ts (1)
4-4: Good addition for local development.The
devServerconstant provides proper support for local development environments.src/lib/db.ts (1)
27-32: LGTM! Clean repository method additions.The new
getSpentVtxosandgetSweptVtxosmethods follow the established patterns and correctly implement the filtering logic using Dexie's query API.src/lib/wallet.ts (1)
17-20: Type update handled correctly with proper conversion.The parameter type change to
bigintaligns with the SDK update, and the explicitNumber()conversion is appropriately placed for the arithmetic operation.src/screens/Wallet/Send/Form.tsx (2)
81-82: Updated to new ArkNote API structure.The direct destructuring of
valuealigns with the simplified SDK API.
97-101: Proper BigInt handling for amount comparisons.The explicit
Number()conversions ensure correct comparison with zero values.src/screens/Settings/Vtxos.tsx (2)
20-22: Successfully migrated to SDK's ArkInfo type.The type migration from local
AspInfoto SDK'sArkInfowith extended properties is implemented correctly throughout the component.Also applies to: 39-47
49-49: Consistent BigInt to Number conversions.All numeric conversions for
vtxoTreeExpiryand market hour timestamps are properly handled for calculations and display.Also applies to: 84-84, 146-147
src/providers/asp.tsx (3)
1-13: Clean migration to SDK's ArkInfo type.The context interface and state are properly updated to use the extended
ArkInfotype, maintaining backward compatibility with the additionalunreachableandurlproperties.Also applies to: 27-34
44-66: Well-implemented market hour enhancements.Good defensive programming with null checks for
aspInfo.marketHour. The duration calculation is correctly added to the return type.
68-86: Robust BigInt handling in limit calculations.The
getDustLimitandgetMaxSatsAllowedfunctions correctly handle BigInt to Number conversions with appropriate comparison logic.src/lib/asp.ts (7)
1-1: LGTM! Import updates align with SDK upgrade.The new imports from
@arkade-os/sdkproperly support the refactoring to use SDK abstractions.
6-22: Good BigInt migration for financial precision.The conversion of numeric fields to
BigIntis appropriate for handling large satoshi values and ensures consistency with the updated SDK types.
44-56: Clean refactoring to use SDK provider.The migration from manual HTTP fetching to
RestArkProvidersimplifies the code while maintaining the same URL normalization logic and error handling behavior.
73-79: Consistent field renaming with SDK conventions.The transaction field updates (
roundTxid→commitmentTxid,redeemTxid→arkTxid) correctly align with the new SDK naming conventions.
99-104: Nice performance optimization with concurrent fetching.Using
Promise.allto fetch both addresses concurrently reduces latency and improves performance.
116-124: Proper ArkNote parsing and BigInt arithmetic.The refactoring correctly uses
ArkNote.fromStringfor parsing andBigIntfor precise amount calculations, aligning with the SDK's type system.
128-128: API simplification looks correct.The removal of the
withZeroFeesparameter aligns with the updated SDK API.
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/wallet-service-worker.ts(1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: bordalix
PR: arkade-os/wallet#114
File: src/lib/asp.ts:0-0
Timestamp: 2025-06-30T18:33:29.839Z
Learning: In src/lib/asp.ts, only the collaborativeExit function should accept both IWallet and ServiceWorkerWallet types. Other wallet functions (getBalance, getTxHistory, getReceivingAddresses, redeemNotes, sendOnChain, settleVtxos) should maintain their original IWallet-only signatures and not be updated for consistency.
src/wallet-service-worker.ts (2)
Learnt from: bordalix
PR: arkade-os/wallet#114
File: public/wallet-service-worker.mjs:6350-6353
Timestamp: 2025-06-30T18:23:34.163Z
Learning: Do not review `public/wallet-service-worker.mjs` as it is a built file generated by Vite.
Learnt from: bordalix
PR: arkade-os/wallet#114
File: src/lib/asp.ts:0-0
Timestamp: 2025-06-30T18:33:29.839Z
Learning: In src/lib/asp.ts, only the collaborativeExit function should accept both IWallet and ServiceWorkerWallet types. Other wallet functions (getBalance, getTxHistory, getReceivingAddresses, redeemNotes, sendOnChain, settleVtxos) should maintain their original IWallet-only signatures and not be updated for consistency.
| // async function networkFirst(request: Request): Promise<Response> { | ||
| // const cache = await caches.open(CACHE_NAME) | ||
| // try { | ||
| // const response = await fetch(request) | ||
| // if (request.method === 'GET') { | ||
| // cache.put(request, response.clone()) | ||
| // } | ||
| // return response | ||
| // } catch (error) { | ||
| // const cachedResponse = await cache.match(request) | ||
| // if (!cachedResponse) throw new Error('No cached response found') | ||
| // return cachedResponse | ||
| // } | ||
| // } | ||
| // | ||
| // // fetch event: use network first, then cache | ||
| // self.addEventListener('fetch', (event: FetchEvent) => { | ||
| // event.respondWith(networkFirst(event.request)) | ||
| // }) |
There was a problem hiding this comment.
💡 Verification agent
🧩 Analysis chain
Consider removing commented code and verify offline functionality.
The commented-out networkFirst function and fetch event listener align with the SDK upgrade approach of delegating network handling to the SDK layer. However, consider:
-
Code cleanup: Remove the commented code entirely rather than leaving it commented out to avoid code bloat and confusion.
-
Offline functionality impact: Verify that removing the fetch event listener doesn't break offline functionality, as the service worker will no longer intercept and cache network requests.
🏁 Script executed:
#!/bin/bash
# Verify if there are any other fetch event listeners or network handling in the codebase
rg -A 3 -B 3 "addEventListener.*fetch|fetch.*event" --type ts --type jsLength of output: 457
Remove commented-out fetch handler and verify offline support
The commented-out networkFirst function and fetch event listener in src/wallet-service-worker.ts (lines 65–83) should be cleaned up, and you should ensure that offline-caching/fallback behavior is still covered by the new SDK:
- Remove the dead code block (lines 65–83) to avoid confusion and bloat.
- Confirm that the upgraded SDK (v0.2.0) includes equivalent offline support; add manual tests or automated checks for offline scenarios.
- If offline functionality is no longer provided by the SDK, reintroduce or implement a replacement service-worker fetch strategy.
🤖 Prompt for AI Agents
In src/wallet-service-worker.ts between lines 65 and 83, remove the entire
commented-out networkFirst function and fetch event listener to clean up dead
code. After removal, verify that the upgraded SDK v0.2.0 still provides offline
caching and fallback support by performing manual offline tests or adding
automated checks. If the SDK no longer supports offline functionality, implement
a replacement fetch event handler with an appropriate caching strategy to
maintain offline support.
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
src/screens/Init/Connect.tsx (1)
23-26: Excellent security enhancement: Clearing sensitive data after useThis change properly clears sensitive information (
passwordandprivateKey) from the context after successful wallet initialization, which is a security best practice to prevent sensitive data from remaining in memory longer than necessary.The implementation correctly:
- Clears data only after successful initialization
- Maintains the original navigation flow
- Prevents sensitive information from persisting in the context
For consistency, consider setting
passwordtoundefinedinstead of an empty string to match theprivateKeyapproach:- setInitInfo({ password: '', privateKey: undefined }) + setInitInfo({ password: undefined, privateKey: undefined })
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
src/App.tsx(3 hunks)src/lib/types.ts(1 hunks)src/providers/wallet.tsx(8 hunks)src/screens/Init/Connect.tsx(2 hunks)
✅ Files skipped from review due to trivial changes (1)
- src/lib/types.ts
🚧 Files skipped from review as they are similar to previous changes (2)
- src/App.tsx
- src/providers/wallet.tsx
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: bordalix
PR: arkade-os/wallet#114
File: src/lib/asp.ts:0-0
Timestamp: 2025-06-30T18:33:29.839Z
Learning: In src/lib/asp.ts, only the collaborativeExit function should accept both IWallet and ServiceWorkerWallet types. Other wallet functions (getBalance, getTxHistory, getReceivingAddresses, redeemNotes, sendOnChain, settleVtxos) should maintain their original IWallet-only signatures and not be updated for consistency.
🧬 Code Graph Analysis (1)
src/screens/Init/Connect.tsx (1)
src/providers/flow.tsx (1)
FlowContext(71-82)
🔇 Additional comments (1)
src/screens/Init/Connect.tsx (1)
13-13: LGTM: Correct context destructuringThe addition of
setInitInfoto the destructured FlowContext is correct and necessary for the security enhancement implemented below.
|
I have tested against mutinynet seems to work well now! |
|
Just tested the notes After redeeming a note and clicking to "Back to Wallet" it goes dark. It's a bit of anti-pattern to have a button to change screen, it coukld be removed? the other little issue is that we throw the server error straight to user in case of a note already used, is not super helpful to know if you can catch that error explicitly and returns some message more explanatory would be best @bordalix https://www.loom.com/share/f94f3916833e476ca0d1e81590353612?from_recorder=1&focus_title=1 |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
src/providers/config.tsx (1)
49-52: Consider improving URL normalization robustness and avoiding parameter mutation.The protocol normalization logic has a few potential issues:
- Parameter mutation: The function modifies the input
dataobject directly, which could be unexpected for callers.- Limited localhost detection: The logic only checks for URLs starting with "localhost" but misses other localhost variants like "127.0.0.1" or "::1".
- No URL validation: After prepending the protocol, there's no validation that the resulting URL is actually valid.
Consider this improved implementation:
const updateConfig = (data: Config) => { + const updatedData = { ...data } - if (!data.aspUrl.startsWith('http://') && !data.aspUrl.startsWith('https://')) { - const protocol = data.aspUrl.startsWith('localhost') ? 'http://' : 'https://' - data.aspUrl = protocol + data.aspUrl - } + if (!updatedData.aspUrl.startsWith('http://') && !updatedData.aspUrl.startsWith('https://')) { + const isLocalhost = /^(localhost|127\.0\.0\.1|::1)(:|$)/.test(updatedData.aspUrl) + const protocol = isLocalhost ? 'http://' : 'https://' + updatedData.aspUrl = protocol + updatedData.aspUrl + } - setConfig(data) - updateTheme(data) - saveConfigToStorage(data) + setConfig(updatedData) + updateTheme(updatedData) + saveConfigToStorage(updatedData) }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (9)
src/components/BackToWalletButton.tsx(0 hunks)src/providers/config.tsx(1 hunks)src/providers/iframe.tsx(1 hunks)src/screens/Settings/Server.tsx(2 hunks)src/screens/Wallet/Notes/Success.tsx(0 hunks)src/screens/Wallet/Receive/Amount.tsx(0 hunks)src/screens/Wallet/Receive/Success.tsx(0 hunks)src/screens/Wallet/Send/Form.tsx(3 hunks)src/screens/Wallet/Send/Success.tsx(0 hunks)
💤 Files with no reviewable changes (5)
- src/screens/Wallet/Receive/Amount.tsx
- src/screens/Wallet/Receive/Success.tsx
- src/screens/Wallet/Notes/Success.tsx
- src/screens/Wallet/Send/Success.tsx
- src/components/BackToWalletButton.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
- src/screens/Wallet/Send/Form.tsx
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: bordalix
PR: arkade-os/wallet#114
File: src/lib/asp.ts:0-0
Timestamp: 2025-06-30T18:33:29.839Z
Learning: In src/lib/asp.ts, only the collaborativeExit function should accept both IWallet and ServiceWorkerWallet types. Other wallet functions (getBalance, getTxHistory, getReceivingAddresses, redeemNotes, sendOnChain, settleVtxos) should maintain their original IWallet-only signatures and not be updated for consistency.
src/providers/config.tsx (1)
Learnt from: bordalix
PR: #114
File: src/lib/asp.ts:0-0
Timestamp: 2025-06-30T18:33:29.839Z
Learning: In src/lib/asp.ts, only the collaborativeExit function should accept both IWallet and ServiceWorkerWallet types. Other wallet functions (getBalance, getTxHistory, getReceivingAddresses, redeemNotes, sendOnChain, settleVtxos) should maintain their original IWallet-only signatures and not be updated for consistency.
src/providers/iframe.tsx (1)
Learnt from: bordalix
PR: #114
File: src/lib/asp.ts:0-0
Timestamp: 2025-06-30T18:33:29.839Z
Learning: In src/lib/asp.ts, only the collaborativeExit function should accept both IWallet and ServiceWorkerWallet types. Other wallet functions (getBalance, getTxHistory, getReceivingAddresses, redeemNotes, sendOnChain, settleVtxos) should maintain their original IWallet-only signatures and not be updated for consistency.
🧬 Code Graph Analysis (1)
src/screens/Settings/Server.tsx (3)
src/providers/asp.tsx (1)
AspContext(15-22)src/providers/config.tsx (1)
ConfigContext(28-36)src/providers/wallet.tsx (1)
WalletContext(43-57)
🪛 Biome (1.9.4)
src/screens/Settings/Server.tsx
[error] 7-7: Do not shadow the global "Error" property.
Consider renaming this variable. It's easy to confuse the origin of variables when they're named after a known global.
(lint/suspicious/noShadowRestrictedNames)
🔇 Additional comments (5)
src/providers/iframe.tsx (1)
84-86: LGTM! Change aligns with wallet state refactoring.The modification correctly passes the
walletobject tosendStatusinstead of the booleanwalletLoaded. This change is consistent with the broader refactoring wherewalletLoadedbecame a boolean flag separate from the wallet object, ensuring the iframe receives proper wallet status information.src/screens/Settings/Server.tsx (4)
1-1: LGTM! Import change aligns with SDK upgrade.The import change from local
AspInfotoArkInfofrom@arkade-os/sdkis consistent with the SDK upgrade to version 0.2.0.
9-9: LGTM! Function import is appropriate.The
getAspInfoimport remains unchanged and the function usage in the component appears compatible with the new type system.
27-27: LGTM! Type migration is well-structured.The state type change to
ArkInfo & { unreachable: boolean; url: string }properly extends the new SDK type with the additional properties required by the application. This maintains compatibility with existing usage patterns.
7-7: Static analysis false positive - component import is fine.The static analysis tool incorrectly flagged the
Errorcomponent import as shadowing the global Error property. This is a React component import following standard naming conventions, and the usage context makes it clear this is not the global Error constructor.
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
src/components/Input.tsx (1)
16-21: Add dependency array to useEffect for better performance.The
useEffecthook runs on every render without a dependency array. While thefirstRunref prevents multiple focus calls, this is inefficient and not the typical React pattern.useEffect(() => { if (focus && firstRun.current) { firstRun.current = false input.current?.setFocus() } - }) + }, [focus])
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
src/components/Input.tsx(1 hunks)src/screens/Init/Restore.tsx(2 hunks)
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: bordalix
PR: arkade-os/wallet#114
File: src/lib/asp.ts:0-0
Timestamp: 2025-06-30T18:33:29.839Z
Learning: In src/lib/asp.ts, only the collaborativeExit function should accept both IWallet and ServiceWorkerWallet types. Other wallet functions (getBalance, getTxHistory, getReceivingAddresses, redeemNotes, sendOnChain, settleVtxos) should maintain their original IWallet-only signatures and not be updated for consistency.
🧬 Code Graph Analysis (2)
src/screens/Init/Restore.tsx (1)
src/components/Input.tsx (1)
Input(12-38)
src/components/Input.tsx (1)
src/components/InputContainer.tsx (1)
InputContainer(16-37)
🔇 Additional comments (3)
src/components/Input.tsx (2)
1-10: LGTM! Clean interface refactoring.The new
InputPropsinterface is well-designed with optionalfocusandonEnterprops that enhance the component's functionality while maintaining backward compatibility.
28-37: Good use of InputContainer abstraction.The integration with
InputContainerprovides consistent styling and error handling across the application. The Enter key handling is implemented correctly.src/screens/Init/Restore.tsx (1)
14-14: Consider UX impact of single-line input for private keys.Replacing
TextareawithInputchanges this from multi-line to single-line input. Private keys are often long strings that may be easier to read and verify in a multi-line format.Consider whether single-line input provides adequate UX for private key entry, especially for longer keys or when users need to verify their input.
| <Padded> | ||
| <FlexCol> | ||
| <Textarea label='Private key' onChange={setSomeKey} value={someKey} /> | ||
| <Input label='Private key' onChange={setSomeKey} /> |
There was a problem hiding this comment.
Critical: Input component is now uncontrolled.
The removal of the value prop makes this an uncontrolled input, meaning the input field won't display the current state value. Users won't see their entered private key if they navigate away and return to this screen.
Add the value prop back or update the Input component to support controlled behavior:
- <Input label='Private key' onChange={setSomeKey} />
+ <Input label='Private key' onChange={setSomeKey} value={someKey} />Note: This will require updating the Input component to accept and use a value prop.
🤖 Prompt for AI Agents
In src/screens/Init/Restore.tsx at line 58, the Input component for the private
key is missing the value prop, making it uncontrolled and causing the input
field to not reflect the current state. Fix this by adding the value prop to the
Input component, passing the corresponding state variable that holds the private
key. Also, ensure the Input component itself is updated to accept and use the
value prop to maintain controlled behavior.
There was a problem hiding this comment.
It's on purpose, we don't want to show the private key if they navigate away and return to this screen
There was a problem hiding this comment.
@bordalix Thank you for the clarification! That makes perfect sense from a security perspective. Intentionally making the private key input uncontrolled to clear sensitive data when navigating away is a good security practice. I appreciate you explaining the reasoning behind this design decision.
✏️ Learnings added
Learnt from: bordalix
PR: arkade-os/wallet#121
File: src/screens/Init/Restore.tsx:58-58
Timestamp: 2025-07-21T18:25:36.350Z
Learning: In src/screens/Init/Restore.tsx, the Input component for private key restoration intentionally omits the `value` prop to make it uncontrolled. This is a security feature to prevent the private key from being displayed if users navigate away and return to the screen, avoiding potential exposure of sensitive data in the UI.
Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.
🧠 Learnings used
Learnt from: bordalix
PR: arkade-os/wallet#114
File: src/lib/asp.ts:0-0
Timestamp: 2025-06-30T18:33:29.839Z
Learning: In src/lib/asp.ts, only the collaborativeExit function should accept both IWallet and ServiceWorkerWallet types. Other wallet functions (getBalance, getTxHistory, getReceivingAddresses, redeemNotes, sendOnChain, settleVtxos) should maintain their original IWallet-only signatures and not be updated for consistency.
* update to ts-sdk `0.2.1` (#121) * update to ts-sdk next-version * remove console.log * hotfix * don't show notImplemented on logs * lint * @arkade-os/sdk v0.2.0 from npm registry * fix constants.ts * disable service worker cache * build worker * update test server to signet * add pages.dev to test server domains * fix locked wallet after creation * add @noble/secp256k1 * fix css * update faucet * use en var VITE_ARK_SERVER to define default ark server * revert testServer back to mutinynet * fix notes * save asp url to config with protocol * lint * lint * remove "back to wallet" button after button redeem * remove "back to wallet" button, anti pattern * send all by clicking the balance * build worker * use input instead of textarea to get nsec * update ts-sdk to 0.2.1 --------- Co-authored-by: João Bordalo <bordalix@users.noreply.github.com> * fix: lnurl support * support OCP * Show valid urls in clipboard viewer Lock input amount if min == max Refactor dealing with lnurl limits --------- Co-authored-by: louisinger <41042567+louisinger@users.noreply.github.com> Co-authored-by: TaprootFreak <142087526+TaprootFreak@users.noreply.github.com> Co-authored-by: lapatric <42653152+lapatric@users.noreply.github.com>
* update to ts-sdk `0.2.1` (#121) * update to ts-sdk next-version * remove console.log * hotfix * don't show notImplemented on logs * lint * @arkade-os/sdk v0.2.0 from npm registry * fix constants.ts * disable service worker cache * build worker * update test server to signet * add pages.dev to test server domains * fix locked wallet after creation * add @noble/secp256k1 * fix css * update faucet * use en var VITE_ARK_SERVER to define default ark server * revert testServer back to mutinynet * fix notes * save asp url to config with protocol * lint * lint * remove "back to wallet" button after button redeem * remove "back to wallet" button, anti pattern * send all by clicking the balance * build worker * use input instead of textarea to get nsec * update ts-sdk to 0.2.1 --------- Co-authored-by: João Bordalo <bordalix@users.noreply.github.com> * fix: lnurl support * support OCP * Show valid urls in clipboard viewer Lock input amount if min == max Refactor dealing with lnurl limits --------- Co-authored-by: louisinger <41042567+louisinger@users.noreply.github.com> Co-authored-by: TaprootFreak <142087526+TaprootFreak@users.noreply.github.com> Co-authored-by: lapatric <42653152+lapatric@users.noreply.github.com>
* implement lightning swaps * WIP * bug fix on send * working on limits with swaps * docker files and instruction to test in regtest * puts Error at the same level as WarningBox to minimize jumps on the UI * pass default ark server url as environment variable VITE_ARK_SERVER * bug fix for wallet-sdk 0.0.15 * fix: only cache GETs on service worker * new build * update wallet-sdk to 0.0.15 * improve swaps test documentation * don't cache * update docs * add NO_MACAROONS to boltz-fulmine container environment variables * disable reverse swaps * don't cache on service worker * new build * add note to test docs * fix package.json * fix package.json * use mainnet URLs * chore: import from arkade-os/sdk * feat: integrate Lightning payment monitoring and status handling * chore: arkade url * updates docker env * fix test fail * typo * remove console.log * Implements reverse swaps * fix nobles hashes import * fix error on amount screen * Fix error handling and remove duplicate API URL call * Fix grammatical issue with "therefore" usage * Capitalize "Mac" as it refers to Apple's trademark * fix react warnings * bug fix * show less chars in prettyLongText * More robust Lightning invoice validation * Simplify the type assertion for setInterval * Clean APK cache to reduce image size * Fix grammatical issues in lndconnect instructions * add keys to remaining icons * add @noble/hashes to package.json * Fix heading-level jump, spelling, and wording * typo * update ripemd160 import * Update src/lib/boltz.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Signed-off-by: João Bordalo <bordalix@users.noreply.github.com> * update to ts-sdk next-version * remove console.log * hotfix * don't show notImplemented on logs * lint * update pnpm-lock.yaml * @arkade-os/sdk v0.2.0 from npm registry * fix constants.ts * update to sdk 2.0 * general fixes * general fixes * update swaps test docs * fix signing * remove debug console.logs * disable service worker cache * build worker * verify vhtlc script on send * update test server to signet * add pages.dev to test server domains * new refundVHTLC method * fix locked wallet after creation * add @noble/secp256k1 * fix css * update faucet * use en var VITE_ARK_SERVER to define default ark server * nit test text * new boltzd image * revert testServer back to mutinynet * fix notes * chore: --no-frozen-lockfile * save asp url to config with protocol * lint * lint * remove "back to wallet" button after button redeem * remove "back to wallet" button, anti pattern * send all by clicking the balance * build worker * use input instead of textarea to get nsec * update ts-sdk to 0.2.1 * add @noble/hashes * refactor + delete over-engineering code * wip * lnurl support * use @arkade-os/boltz-swap package * fix * add retry logic to submarineSwap sendOffchain * revert sendOffChain retry * Fix Progress Indicator Style Inconsistency [1] * fix Incorrect Typography Weight in Subtext [2] * fix Incorrect Button Font Style [4] * fix “Skip for Now” Button Missing Fill Color [6] * new setup regtest env script * Refactor pr124 (#125) * update to ts-sdk `0.2.1` (#121) * update to ts-sdk next-version * remove console.log * hotfix * don't show notImplemented on logs * lint * @arkade-os/sdk v0.2.0 from npm registry * fix constants.ts * disable service worker cache * build worker * update test server to signet * add pages.dev to test server domains * fix locked wallet after creation * add @noble/secp256k1 * fix css * update faucet * use en var VITE_ARK_SERVER to define default ark server * revert testServer back to mutinynet * fix notes * save asp url to config with protocol * lint * lint * remove "back to wallet" button after button redeem * remove "back to wallet" button, anti pattern * send all by clicking the balance * build worker * use input instead of textarea to get nsec * update ts-sdk to 0.2.1 --------- Co-authored-by: João Bordalo <bordalix@users.noreply.github.com> * fix: lnurl support * support OCP * Show valid urls in clipboard viewer Lock input amount if min == max Refactor dealing with lnurl limits --------- Co-authored-by: louisinger <41042567+louisinger@users.noreply.github.com> Co-authored-by: TaprootFreak <142087526+TaprootFreak@users.noreply.github.com> Co-authored-by: lapatric <42653152+lapatric@users.noreply.github.com> * fix script * add gist font * use published package * fix merge issues * fix merge issues * fix and suggestions from the rabbit * chore: bump 0.1.1 * more rabbit suggestions * several ui fixes * fix bip21 parsing * fix details font size and weight * add empty state to tx list and logs * add empty list to coin control * new toggle per design * more ui updates * major settings refactor * more ui fixes * fix "show password" icon color * new success pages after wallet initialization * full width texts * remove apps links * css color bug fix * handle selects with keyboard * fix title * fixes * fix balance --------- Signed-off-by: João Bordalo <bordalix@users.noreply.github.com> Co-authored-by: tiero <3596602+tiero@users.noreply.github.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: louisinger <louis@vulpem.com> Co-authored-by: louisinger <41042567+louisinger@users.noreply.github.com> Co-authored-by: TaprootFreak <142087526+TaprootFreak@users.noreply.github.com> Co-authored-by: lapatric <42653152+lapatric@users.noreply.github.com>
* send all by clicking the balance * build worker * use input instead of textarea to get nsec * update ts-sdk to 0.2.1 * add @noble/hashes * refactor + delete over-engineering code * lnurl support * add retry logic to submarineSwap sendOffchain * revert sendOffChain retry * new setup regtest env script * Refactor pr124 (#125) * update to ts-sdk `0.2.1` (#121) * update to ts-sdk next-version * remove console.log * hotfix * don't show notImplemented on logs * lint * @arkade-os/sdk v0.2.0 from npm registry * fix constants.ts * disable service worker cache * build worker * update test server to signet * add pages.dev to test server domains * fix locked wallet after creation * add @noble/secp256k1 * fix css * update faucet * use en var VITE_ARK_SERVER to define default ark server * revert testServer back to mutinynet * fix notes * save asp url to config with protocol * lint * lint * remove "back to wallet" button after button redeem * remove "back to wallet" button, anti pattern * send all by clicking the balance * build worker * use input instead of textarea to get nsec * update ts-sdk to 0.2.1 --------- Co-authored-by: João Bordalo <bordalix@users.noreply.github.com> * fix: lnurl support * support OCP * Show valid urls in clipboard viewer Lock input amount if min == max Refactor dealing with lnurl limits --------- Co-authored-by: louisinger <41042567+louisinger@users.noreply.github.com> Co-authored-by: TaprootFreak <142087526+TaprootFreak@users.noreply.github.com> Co-authored-by: lapatric <42653152+lapatric@users.noreply.github.com> * fix script * bug fix when no amount is defined * hide settlement when utxo txs are not allowed * hide buttons on coin control * remove lib/boltz * Update wrangler.jsonc Signed-off-by: Marco Argentieri <3596602+tiero@users.noreply.github.com> * remove wrangler.jsonc configuration file * hotfix UI * add BBS * fix alignment * update visuals * New Settings / Advanced / Change password * Create motd.html * change alert to final url * remove console logs * fix silently swallowing error * update bbs * update megaphone icon * castrate * invert logic * pulsing alerts * change default main server * change default test server * hide qrcode until reverse swap is done * double scanner * rabbit hotfix * make sure qrcode is shown if reverse swap fails * new Lightning provider * fix backup error with wrong password * hide rollver nudge in riga * wip * fix lightning: invoices * wallets with no password * update to boltz-swap 0.1.2 * New 'Max' button on input amount * disables receive for riga * hide txid * fix lightning: invoices * update to boltz-swap 0.1.2 * New 'Max' button on input amount * disables receive for riga * hide txid * omit password step in onboard (use default password) nudge to create password after 10.000 sats on balance * fixes * back to mutinynet * better var names * reload service worker on pull-to-reload * Update motd.html Signed-off-by: Andrew Camilleri <evilkukka@gmail.com> * Update motd.html Signed-off-by: Andrew Camilleri <evilkukka@gmail.com> * Update motd.html Signed-off-by: Marco Argentieri <3596602+tiero@users.noreply.github.com> * Update motd.html Signed-off-by: Marco Argentieri <3596602+tiero@users.noreply.github.com> * make PSA html * initial works on boltz swap * add getLimits to lightning provider * fetch limits on lightning provider * fixes * hotfix: don't throw if no boltz provider * fixes * remove waitBox in qrcode * hide PSA unless isRiga * update sdk dependency to 0.2.3 * remove console.log * fix details fee * use methods by the react provider * fix '1 SATS' to '1 SAT' * pass apiurl instead of only network * handle lock when user as no defined password * allow remove password * lint * move max button to the right * Boltz app * allow upgradability in config * removes motd * update package.json engine node * Move setActive() side effects out of render and into a useEffect tied to tab * Security: Sanitize HTML content before rendering * Accessibility and UX: Make “Max” control keyboard-accessible and disabled-aware * fix consoleError arguments reversed * Use event.waitUntil for message handler to keep SW alive during reload * fix GreenStatusIcon small size distorts aspect ratio * fix: Non-React SVG attribute “stroke-width” should be camelCased * fix potential TypeError when swapProvider is null * handle preimages * try to get server info only if url is valid * reload service worker when reload wallet * bug fix with reset wallet * Fix: - Fallback uses 'pending' (lowercase) which isn’t a valid statusUI key, breaking color/icon lookups. - colorDict stores single-element tuples; you then index [0]. Use a plain string. - Local Date component shadows the global Date object. * Type-guard refundability check to avoid false assumptions about error shape. * Lint * Inline the icon element instead of wrapping it in a component function. * Make the row keyboard accessible * Strengthen exhaustiveness/typo safety on status mapping with “satisfies”. * Prefer JSX.Element over React.JSX.Element to avoid requiring a React import * Type the derived status to keep Record index access type-safe * move typescript to dev dependencies * revert reload sw on reload wallet * fix alignment * don't log settlement messages * use ARKD_VTXO_TREE_EXPIRY=604672 * typo * revert VTXO_TREE_EXPIRY * log settlement of vtxos * fix glitch when reseting wallet * fix success page on change password * fix swap list UI in narrow screens * hide amount in swaps * Guard auto-copy on expand when BIP21 URI is absent * Avoid shadowing the global Error identifier; alias the component. * To avoid briefly toggling wallet.lockedByBiometrics when the save could fail, update the wallet after saveNewPassword completes. * lint * Prevent double-submits and provide feedback when changing password * pixel perfect About * fix unsafe optional chaining * Only flip lockedByBiometrics to false after a confirmed save * use method from lib * new isValidInvoice lib/bolt11 method * remove not used function * fix singulars on prettyDelta * new throw error message * return note instead of description in decode invoice * fix types in biometrics * refactor lib/bip21 and get rid of qs * throw on invalid private keys * refactor empty states * start making tests * Update src/test/components/AlertBox.test.tsx Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Signed-off-by: João Bordalo <bordalix@users.noreply.github.com> * lint * raise engines.node to ≥20 * Throw an Error, not a string * more bip21 tests * small fixes * fixes * update eslint dependencies * fixes * prettier * new qr code scanner module that works with vitest * remove console.log * remove @dotmind/react-use-pwa * screen tests * update eslint * fix * implements VITE_BOLTZ_URL env var * lint * lib/fiat and lib/lnurl tests * new unlock test * show ln fees on receive * remove console.log * update regtest to v0.7.1 * remove nostr notifications * new ts-sdk storage * fix * bug fix * remove console.log * fix wallet reload * replace sleeps with tests * chore: bump sdk * chore: format * fix sleep in test setup script * fix merge conflicts * fix merge conflicts * rename lib file * fix: getSwapHistory() is now async * update regtest env to arkd v8 * update servers urls to v8 * bump dependencies * fix label when sending * refreshSwapsStatus and refundFailedSubmarineSwaps on swap provider first run * update dependencies to alpha.4 * fixes for v8 * lint * improve prettyAgo * fix prettyAgo * clearContractData on resetWallet * use messages from service worker to listen for payments * delay wallet reload by 5 seconds * bump sdk dependencies * remove console.log + refundVHTLC * new 'down' param to setupRegtestEnv.sh * catch error on refundVHTLC * fix bug in server url when is localhost * use new svcWallet.reload() to reload * nit * update dependencies to alpha.6 * remove not used function * setInitialized(true) after updateWallet * Update README.md Signed-off-by: Marco Argentieri <3596602+tiero@users.noreply.github.com> * silent curls in setupRegtestEnv.sh * update fulmine image in docker compose * update dependencies to alpha.7 * rabbit fixes * fix decodeArkAddress * better validation of sats in reverse swap * works in setupRegtestEnv.sh * wait for lnd * rename decodeAddress returned keys * show something when tx has createdAt = 0 * tx with no date go to the top * fix reactivity when receiving events from service worker * remove not needed effect * deal with unconfirmed onboarding txs * fix * don't settle if total < dust * update dependencies * fix and add more tests to Transaction * refactor canSettleNow * update noble and scure dependencies * don't throw if bip21 ark address from different server (try lightning or mainnet) * fix Transaction tests * fix * refactor Transaction screen * works on expired boarding txs * fix * fix Transaction screen * new /v1/info return object * fix tests * fix nginx conf * remove dust checks (#123) Co-authored-by: João Bordalo <bordalix@users.noreply.github.com> * update docker composer to use time in regtest * update to new arkInfo * update dependencies * update dependencies * fix rabbit reported bugs --------- Signed-off-by: Marco Argentieri <3596602+tiero@users.noreply.github.com> Signed-off-by: Andrew Camilleri <evilkukka@gmail.com> Signed-off-by: João Bordalo <bordalix@users.noreply.github.com> Co-authored-by: louisinger <louis@vulpem.com> Co-authored-by: louisinger <41042567+louisinger@users.noreply.github.com> Co-authored-by: TaprootFreak <142087526+TaprootFreak@users.noreply.github.com> Co-authored-by: lapatric <42653152+lapatric@users.noreply.github.com> Co-authored-by: Marco Argentieri <3596602+tiero@users.noreply.github.com> Co-authored-by: Andrew Camilleri <evilkukka@gmail.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Update using @arkade-os/sdk v0.2.0
@bordalix please review
Summary by CodeRabbit
New Features
Improvements
Bug Fixes
Chores