Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
2e3cd29
refactor: rename BlockchainIdentityData.CreationState to IdentityCrea…
HashEngineering Sep 26, 2025
fde91e5
refactor: make BlockchainIdentityData be derived from BlockchainIden…
HashEngineering Sep 26, 2025
4d97f6f
refactor: move username request classes to the request package
HashEngineering Sep 27, 2025
fa6ee5f
feat: update flow by removing unnecessary screen
HashEngineering Sep 27, 2025
13bbf28
refactor: move username voting screens to voting package
HashEngineering Sep 27, 2025
c77581a
feat: support instant username creation
HashEngineering Sep 30, 2025
6c75420
feat: support instant username creation (UI)
HashEngineering Sep 30, 2025
b56e2a1
fix: fix many issues with instant username creation and displaying th…
HashEngineering Oct 11, 2025
564eab9
fix: UI issues
HashEngineering Oct 11, 2025
4c46010
fix: UI issues (more menu)
HashEngineering Oct 11, 2025
504032d
fix: improve tracking of asset lock transactions
HashEngineering Oct 11, 2025
2216dd3
refactor: rename some functions
HashEngineering Oct 11, 2025
bf333cf
fix: UI issues
HashEngineering Oct 11, 2025
7b56675
docs: add Claude agent files
HashEngineering Oct 11, 2025
65cae5f
fix: fix race condition when saving profiles with image urls
HashEngineering Oct 14, 2025
ac0f25a
fix: fix race condition when sending asset lock transactions
HashEngineering Oct 15, 2025
4a742d1
fix: UI flow
HashEngineering Oct 15, 2025
c65f1d4
fix: create instant username before non-contested
HashEngineering Oct 15, 2025
6fbee28
fix: make wallet wipe destroy datastores as serial operations
HashEngineering Oct 15, 2025
5d7a0b8
fix: shutdown CreateIdentityService during wallet reset
HashEngineering Oct 16, 2025
54673bd
fix: check voting status for requested username
HashEngineering Nov 7, 2025
2ce5237
chore: fix staging and devnet insight urls
HashEngineering Nov 7, 2025
bbeab0e
fix: show request details when username request was rejected
HashEngineering Nov 7, 2025
b1c8b4e
fix: show request details when username request was rejected
HashEngineering Nov 7, 2025
8035ecb
fix: import private key links for staging and devnet
HashEngineering Nov 7, 2025
ae6313d
fix: consider usernameType in RequestUsernameFragment
HashEngineering Nov 7, 2025
fe4d208
fix: add logging
HashEngineering Nov 7, 2025
cb0b950
fix: various fixes
HashEngineering Nov 7, 2025
bac43e9
fix: error handling
HashEngineering Nov 7, 2025
127d1b7
fix: add CLAUDE.md
HashEngineering Nov 7, 2025
2102070
fix: repair retry during username requests
HashEngineering Nov 18, 2025
c2f99fe
fix: repair retry during username requests
HashEngineering Nov 25, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
468 changes: 468 additions & 0 deletions .claude/agents/DEVELOPMENT-PATTERNS.md

Large diffs are not rendered by default.

115 changes: 115 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
# CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

## Project Overview

Dash Wallet is an Android application for the Dash cryptocurrency. This is a multi-module Gradle project with the main wallet app and several supporting modules for integrations and features.

## Project Structure

- **wallet/**: Main Android wallet application (Kotlin/Java)
- **common/**: Shared components used across modules
- **features/exploredash/**: Explore Dash feature module
- **integrations/**: Third-party service integrations (Uphold, Coinbase, Crowdnode)
- **integration-android/**: Library for integrating Dash payments into other apps
- **sample-integration-android/**: Example integration app
- **market/**: App store materials

## Build Commands

### Development Builds (Testnet)
```bash
# Clean and build testnet debug version
./gradlew clean assemble_testNet3Debug -x test

# Install testnet debug build to device
adb install wallet/build/outputs/apk/dash-wallet-_testNet3-debug.apk
```

### Production Builds
```bash
# Build production release (requires proper signing keys and configuration)
./gradlew assembleProdRelease

# Build all flavors
./gradlew clean build assembleProdRelease
./gradlew clean build assemble_testNet3Release
./gradlew clean build assembleProdDebug
./gradlew clean build assemble_testNet3Debug
```

### Testing & Quick Builds
```bash
# Quick compilation check (fastest)
./gradlew :wallet:compile_testNet3DebugKotlin

# Compile specific build variant
./gradlew :wallet:assemble_testNet3Debug

# Run unit tests
./gradlew :wallet:test_testNet3DebugUnitTest

# Run all tests and build
./gradlew build
```

### Code Quality
```bash
# Format Kotlin code with ktlint
./gradlew ktlintFormat
```

## Architecture

### Design Pattern
The app follows **MVVM (Model-View-ViewModel)** architecture with the following conventions:

1. **ViewModels** should use a single `UIState` data class rather than multiple separate flows
2. Use `StateFlow` (not `LiveData`) for asynchronously updated fields
3. Use private mutable `_uiState` with public immutable `uiState` via `asStateFlow()`
4. ViewModels are annotated with `@HiltViewModel` and use Dagger Hilt for dependency injection

### Key Technologies
- **Language**: Kotlin (primary), Java (legacy code)
- **UI**: Android Views with Data Binding, Jetpack Compose for newer components
- **Dependency Injection**: Dagger Hilt
- **Database**: Room with SQLite
- **Networking**: Retrofit, OkHttp
- **Architecture Components**: ViewModel, LiveData/StateFlow, Navigation Component
- **Cryptocurrency**: dashj library (fork of bitcoinj)

### Module Dependencies
- Main wallet module depends on common, features, and integration modules
- Uses external dependencies like dashj for Dash blockchain functionality
- Firebase for analytics and crash reporting
- Material Design components for UI

## Key Configuration Files

### Required for Full Build
- `wallet/google-services.json` - Firebase services configuration
- `service.properties` - API keys for Uphold and Coinbase integrations
- `local.properties` - Support email and Google Maps API keys

### Development Setup
- Set build variant to required flavor (e.g., `_testNet3Debug` for testnet development)
- Android SDK Build Tools version 35+ and NDK required
- Uses Gradle 8.7.3 with Kotlin 2.1.0

### Build Flavors
- **prod**: Production mainnet build (non-debuggable, ProGuard optimized)
- **_testNet3**: Development testnet build (debuggable, world-readable wallet file)

## Test Structure
- Unit tests: `wallet/test/` directory
- Uses JUnit for testing framework
- Key test files include ViewModelTest classes and utility tests

## Development Notes
- Testnet builds use world-readable wallet files for debugging
- Production builds have protected wallet files and are space-optimized
- The app supports both mainnet and testnet Dash networks
- Exchange rate data comes from multiple sources (CTX, BitPay, Dash Central, etc.)
- Supports NFC for Dash payment requests
- Uses dashj library for Dash-specific blockchain operations
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ interface WalletDataProvider {

fun wrapAllTransactions(vararg wrappers: TransactionWrapperFactory): Collection<TransactionWrapper>

fun attachOnWalletWipedListener(listener: () -> Unit)
fun attachOnWalletWipedListener(listener: suspend () -> Unit)

fun detachOnWalletWipedListener(listener: () -> Unit)
fun detachOnWalletWipedListener(listener: suspend () -> Unit)

fun processDirectTransaction(tx: Transaction)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,7 @@ abstract class BaseConfig(

init {
walletDataProvider.attachOnWalletWipedListener {
@OptIn(DelicateCoroutinesApi::class)
GlobalScope.launch { clearAll() }
clearAll()
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ object AnalyticsConstants {

object UsersContacts {
const val CREATE_USERNAME = "create_username"
const val CREATE_USERNAME_INSTANT = "create_username_instant"
const val JOIN_DASHPAY = "start_btn_join_dashpay"
const val CREATE_USERNAME_CONFIRM = "start_username_btn_confirm"
const val CREATE_USERNAME_SUCCESS = "start_username_created_success"
Expand Down
131 changes: 0 additions & 131 deletions common/src/main/java/org/dash/wallet/common/ui/orbitview/OrbitView.kt

This file was deleted.

109 changes: 0 additions & 109 deletions common/src/main/java/org/dash/wallet/common/ui/orbitview/PlanetView.kt

This file was deleted.

Loading