Implements Task 5 of Phase 1: New files: - ParsedPayCommand.kt: Sealed interface for parse results - WithAddressRecipient: Pay to Cardano address - WithMatrixRecipient: Pay to Matrix user (requires lookup) - AmountOnly: Amount specified, prompt for recipient - Empty: Open payment flow with no prefilled data - ParseError: Parse error with human-readable reason - SlashCommandParser.kt: Full /pay command parser - Handles: /pay, /pay 10, /pay 10 ADA, /pay 10 tADA - Matrix recipients: /pay 10 ADA @user:server - Cardano addresses: /pay 10 ADA addr1... - Validates amounts (decimal support, max supply check) - Validates addresses (prefix, length, network match) - Comprehensive error messages - SlashCommandParserTest.kt: 40+ unit tests covering all patterns Modified files: - ResolvedSuggestion.kt: Added Command type for slash commands - SuggestionsProcessor.kt: /pay shows as autocomplete suggestion - MarkdownTextEditorState.kt: Command insertion in text editor - MessageComposerPresenter.kt: Command handling in InsertSuggestion Note: MessageComposerPresenter sendMessage interception deferred to Task 6 (requires PaymentFlowPresenter for navigation). |
||
|---|---|---|
| .. | ||
| impl | ||
| lib | ||