-
Notifications
You must be signed in to change notification settings - Fork 0
feat: Transfer activities #212
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
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.
Pull Request Overview
This PR implements transaction metadata storage for tracking transfer-related information that isn't provided by LDK's payment APIs. The main purpose is to temporarily store metadata (like whether a payment is a transfer) until it can be applied to activities during sync operations.
Key changes:
- Added
TransactionMetadataStorageservice using UserDefaults for persistence - Enhanced transaction sending and channel operations to capture and store metadata
- Implemented force channel close functionality with UI sheet
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| Bitkit/Models/TransactionMetadata.swift | New model for storing temporary transaction metadata including transfer flags and channel info |
| Bitkit/Services/TransactionMetadataStorage.swift | Storage service for persisting transaction metadata with CRUD operations |
| Bitkit/Services/LightningService.swift | Updated send and closeChannel methods to capture metadata and support force closes |
| Bitkit/Services/CoreService.swift | Added updateActivitiesMetadata to sync stored metadata with activities |
| Bitkit/ViewModels/WalletViewModel.swift | Added isTransfer parameter to send method |
| Bitkit/ViewModels/TransferViewModel.swift | Added force close functionality and SheetViewModel dependency |
| Bitkit/ViewModels/SheetViewModel.swift | Added forceTransfer sheet item |
| Bitkit/Views/Sheets/ForceTransferSheet.swift | New sheet for force channel close confirmation |
| Bitkit/MainNavView.swift | Registered ForceTransferSheet |
| Bitkit/AppScene.swift | Updated TransferViewModel initialization with SheetViewModel |
|
It will be replaced by #219 |
Description
This PR implements the saving of transactions metadata. It is used to update the activities with info that is not provided by LDK payment class, like if a payments is a transfer
Linked Issues/Tasks
Roadmap - Activity overview
Screenshot / Video
transfer.mp4
restore.mp4