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
daff0e5
fix: disable invites on testnet
HashEngineering Sep 26, 2025
2e16e00
refactor: rename BlockchainIdentityData.CreationState to IdentityCrea…
HashEngineering Sep 26, 2025
4987901
refactor: make BlockchainIdentityData be derived from BlockchainIden…
HashEngineering Sep 26, 2025
8297ba1
refactor: move username request classes to the request package
HashEngineering Sep 27, 2025
18133ad
feat: update flow by removing unnecessary screen
HashEngineering Sep 27, 2025
938e5c8
refactor: move username voting screens to voting package
HashEngineering Sep 27, 2025
c2a542a
feat: support instant username creation
HashEngineering Sep 30, 2025
a3c83d1
feat: support instant username creation (UI)
HashEngineering Sep 30, 2025
7349a18
fix: fix many issues with instant username creation and displaying th…
HashEngineering Oct 11, 2025
d00f01d
fix: UI issues
HashEngineering Oct 11, 2025
cdc9987
fix: UI issues (more menu)
HashEngineering Oct 11, 2025
ea2e77e
fix: improve tracking of asset lock transactions
HashEngineering Oct 11, 2025
c9eb666
refactor: rename some functions
HashEngineering Oct 11, 2025
6dd8988
fix: UI issues
HashEngineering Oct 11, 2025
1410f31
docs: add Claude agent files
HashEngineering Oct 11, 2025
f33c97d
fix: fix race condition when saving profiles with image urls
HashEngineering Oct 14, 2025
d069f95
fix: fix race condition when sending asset lock transactions
HashEngineering Oct 15, 2025
d2c0056
fix: UI flow
HashEngineering Oct 15, 2025
dc5770c
fix: create instant username before non-contested
HashEngineering Oct 15, 2025
a0a9e02
fix: make wallet wipe destroy datastores as serial operations
HashEngineering Oct 15, 2025
2415a34
fix: shutdown CreateIdentityService during wallet reset
HashEngineering Oct 16, 2025
a1f41d0
fix: check voting status for requested username
HashEngineering Nov 7, 2025
7f35719
tests: SendCoinsTaskRunnerTest fixes
HashEngineering Nov 7, 2025
0b22573
chore: fix staging and devnet insight urls
HashEngineering Nov 7, 2025
04a65b4
fix: show request details when username request was rejected
HashEngineering Nov 7, 2025
e7a648a
fix: show request details when username request was rejected
HashEngineering Nov 7, 2025
b2fba88
fix: import private key links for staging and devnet
HashEngineering Nov 7, 2025
5e05f9a
fix: consider usernameType in RequestUsernameFragment
HashEngineering Nov 7, 2025
90b8f6d
fix: add logging
HashEngineering Nov 7, 2025
e8d0eeb
fix: various fixes
HashEngineering Nov 7, 2025
3d84308
fix: error handling
HashEngineering Nov 7, 2025
44d0066
fix: add CLAUDE.md
HashEngineering Nov 7, 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