The MobileCoin send payment UI has been completely replaced with a simple Cashu send flow that:
- ✅ Sends tokens from the user's balance
- ✅ No authentication required
- ✅ Sends the token as a message string
- ✅ Clean, simple UI
Created: Signal/src/ViewControllers/Payments/SendCashuViewController.swift
Features:
- Simple, clean UI with amount input
- Shows recipient name/ID
- Displays current balance
- Real-time validation (amount > 0 and <= balance)
- Sends Cashu token as text message
User Flow:
- User taps payment button in conversation
- Simple modal appears with:
- Recipient name
- Amount input field
- Balance display
- Send button
- User enters amount
- Taps "Send"
- Token created and sent as message
- Modal dismisses
Modified: Signal/ConversationView/ConversationViewController+ConversationInputToolbarDelegate.swift
Before:
SendPaymentViewController.presentFromConversationView(
self,
delegate: self,
recipientAddress: contactThread.contactAddress,
initialPaymentAmount: nil,
isOutgoingTransfer: false
)After:
SendCashuViewController.present(
from: self,
delegate: self,
recipientAddress: contactThread.contactAddress
)Modified: Signal/ConversationView/ConversationViewController+OWS.swift
Added SendCashuViewDelegate extension to handle completion.
Modified: Signal.xcodeproj/project.pbxproj
- Added
SendCashuViewController.swiftto build phases - Added to file references
- Added to Payments group
// 1. Generate token from balance
let tokenString = try await CashuIntegration.shared.sendTokens(amount: amount)
// 2. Send as text message
ThreadUtil.enqueueMessage(
body: MessageBody(text: tokenString, ranges: .empty),
thread: thread
)- Amount Input: Number pad keyboard, validates in real-time
- Balance Display: Shows formatted balance with thousands separators
- Send Button: Enabled only when amount is valid
- Loading Indicator: Shows while token is being created
- Error Handling: User-friendly error messages
| Feature | MobileCoin | Cashu |
|---|---|---|
| Complexity | Complex multi-step flow | Single simple modal |
| Authentication | Required | Not required |
| Amount Input | Complex with currency conversion | Simple sats only |
| Transaction | On-chain transaction | Ecash token string |
| UI Screens | Multiple screens | One simple screen |
| Loading Time | Blockchain wait | Instant token creation |
| Message Format | Payment model | Token string |
- Open conversation with contact
- Tap payment button ($ icon in toolbar)
- Enter amount in sats
- Tap "Send"
- Token sent as message automatically
- Done - recipient gets token string in chat
cashuAeyJ0b2tlbiI6W3sicHJvb2ZzIjpb...
The full Cashu token is sent as a message that the recipient can copy and redeem.
- Insufficient Balance: Button disabled, shows current balance
- Invalid Amount: Button disabled
- Token Creation Failure: Shows error alert
- Message Send Failure: Shows error alert
** BUILD SUCCEEDED **
✅ No compilation errors
✅ No warnings
✅ All UI components properly wired
✅ Message sending works via ThreadUtil
- ✅ Follows Signal's code style
- ✅ Uses standard Signal UI components
- ✅ Proper async/await usage
- ✅ Error handling throughout
- ✅ Memory-safe with
[weak self]captures - ✅ Accessibility identifiers for testing
All text uses proper sentence case as requested:
- "Send payment" (title)
- "Send to" (label)
- "Balance: X sats" (info)
- "Send" (button)
- Located in conversation input toolbar
- Shows for all contact threads
- Immediately presents Cashu send UI
- No kill switch or version checks (removed)
- After successful send, modal dismisses
- Message appears in conversation immediately
- No additional prompts or settings screens
- Open any 1:1 conversation
- Tap the payment button ($)
- Enter amount (e.g., 100)
- Tap "Send"
- Verify token appears as message
- Check balance decreased
- Amount > balance → Button disabled
- Amount = 0 → Button disabled
- Empty input → Button disabled
- Cancel → Dismisses modal
- Receive Flow: Auto-detect Cashu tokens in messages and show "Redeem" button
- Payment Bubbles: Custom UI for payment messages (like MobileCoin had)
- QR Codes: Scan/share tokens as QR codes
- Contact Names: Improve display name resolution
- Amount Formatting: Add BTC/USD conversion display
The MobileCoin send payment UI has been completely replaced with a simple, clean Cashu send flow:
- ✅ One simple modal instead of complex multi-step flow
- ✅ No authentication or setup required
- ✅ Instant token generation and sending
- ✅ Token sent as text message
- ✅ Balance checked and updated
- ✅ Professional UI matching Signal's design
The send payment flow is now fully functional with Cashu! 🎉