Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
111 changes: 56 additions & 55 deletions .github/workflows/bbmtlib-test.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
name: BBMTLib Tests

on:
push:
paths:
- 'BBMTLib/**'
- '.github/workflows/bbmtlib-test.yml'
pull_request:
paths:
- 'BBMTLib/**'
Expand Down Expand Up @@ -102,11 +98,66 @@ jobs:
sudo apt-get update
sudo apt-get install -y jq

- name: Verify Docker is available
run: |
if ! command -v docker >/dev/null 2>&1; then
echo "❌ Docker is required for running tests with local relay"
exit 1
fi
docker --version
echo "✓ Docker is available"

- name: Pull Nostr relay Docker image
run: |
# Pre-pull the image so Docker can use its built-in cache
# Docker on GitHub Actions automatically caches images between runs
echo "Pulling nostr-rs-relay Docker image..."
docker pull scsibug/nostr-rs-relay:latest || {
echo "❌ Failed to pull nostr-rs-relay image"
exit 1
}
echo "✓ Nostr relay image ready (Docker will cache this for subsequent runs)"

- name: Start local Nostr relay
run: |
echo "Starting local Docker-based Nostr relay..."
chmod +x scripts/*.sh
if ! ./scripts/start-local-relay.sh; then
echo "❌ Failed to start local relay. Tests require a local Docker-based relay."
echo "Relay container status:"
docker ps -a | grep bbmtlib-test-relay || echo "No relay container found"
exit 1
fi
echo "✓ Local relay is running at ws://localhost:7777"

# Verify relay is actually accessible
if ! docker ps --format '{{.Names}}' | grep -q "^bbmtlib-test-relay$"; then
echo "❌ Relay container is not running"
exit 1
fi

- name: Run comprehensive script tests
env:
RELAYS: "ws://localhost:7777"
REQUIRE_LOCAL_RELAY: "true"
run: |
echo "Running comprehensive test suite for all scripts..."
echo "Using local relay: $RELAYS"
echo "Local relay is required - tests will fail if relay is unavailable"

# Verify relay is still running before tests
if ! docker ps --format '{{.Names}}' | grep -q "^bbmtlib-test-relay$"; then
echo "❌ Local relay container is not running. Tests cannot proceed."
exit 1
fi

./scripts/test-all.sh
continue-on-error: true

- name: Stop local Nostr relay
if: always()
run: |
echo "Stopping local relay..."
./scripts/stop-local-relay.sh || true

- name: Run vet
run: go vet ./...
Expand Down Expand Up @@ -140,53 +191,3 @@ jobs:
fail_ci_if_error: false
continue-on-error: true

integration-test:
name: Integration Tests (Optional)
runs-on: ubuntu-latest
needs: test

defaults:
run:
working-directory: ./BBMTLib

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.24.2'
cache-dependency-path: BBMTLib/go.sum

- name: Install dependencies
run: go mod download

- name: Install jq (for JSON validation)
run: |
sudo apt-get update
sudo apt-get install -y jq

- name: Install Docker (for local relay)
run: |
# Docker is pre-installed in GitHub Actions ubuntu-latest
# Just verify it's available
docker --version || echo "Docker not available, tests will use external relays"

- name: Run comprehensive script tests (with local relay)
env:
TIMEOUT: "120"
run: |
echo "Running comprehensive test suite with local Nostr relay..."
echo "The test script will automatically start a local relay using Docker"
echo "If Docker is unavailable, it will fall back to external relays"

# Make scripts executable
chmod +x scripts/*.sh

# Run comprehensive test script
# The script will handle starting/stopping the local relay automatically
./scripts/test-all.sh
continue-on-error: true
timeout-minutes: 15

17 changes: 11 additions & 6 deletions BBMTLib/scripts/start-local-relay.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,17 @@ mkdir -p "$DATA_DIR_ABS"
chmod 777 "$DATA_DIR_ABS" || true

# Pull the latest nostr-rs-relay image (or use a specific tag)
echo "Pulling nostr-rs-relay Docker image..."
docker pull scsibug/nostr-rs-relay:latest || {
echo -e "${YELLOW}Warning: Failed to pull image, trying to build from source...${NC}"
# If pull fails, we could build from source, but for now just exit
exit 1
}
# Check if image already exists to avoid unnecessary pulls
if docker images --format '{{.Repository}}:{{.Tag}}' | grep -q "^scsibug/nostr-rs-relay:latest$"; then
echo "✓ nostr-rs-relay image already exists, skipping pull"
else
echo "Pulling nostr-rs-relay Docker image..."
docker pull scsibug/nostr-rs-relay:latest || {
echo -e "${YELLOW}Warning: Failed to pull image, trying to build from source...${NC}"
# If pull fails, we could build from source, but for now just exit
exit 1
}
fi

# Start the relay container
# Remove :Z flag (SELinux context) as it's not needed in GitHub Actions and can cause issues
Expand Down
24 changes: 13 additions & 11 deletions BBMTLib/scripts/test-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ start_local_relay() {

return 0
else
echo " Failed to start local relay, falling back to external relays"
echo " Failed to start local relay"
echo " Check /tmp/relay-start.log for details"
if [ -f /tmp/relay-start.log ]; then
echo " Last 10 lines of relay startup log:"
Expand Down Expand Up @@ -625,9 +625,10 @@ else
RELAYS_TO_USE="$LOCAL_RELAY_URL"
echo "Using local relay: $RELAYS_TO_USE"
else
RELAYS_TO_USE="${RELAYS:-wss://nostr.hifish.org,wss://nostr.xxi.quest,wss://bbw-nostr.xyz}"
echo "Using external relays: $RELAYS_TO_USE"
echo " (Note: Tests may fail due to relay connectivity)"
print_failure "nostr-keygen.sh: Local relay is required but could not be started"
echo " This test requires a local Docker-based relay to run."
echo " Please ensure Docker is available and the relay can be started."
exit 1
fi

# Try to run with a short timeout
Expand Down Expand Up @@ -719,13 +720,14 @@ else
fi

if [ -f "$KEYGEN_OUTPUT_DIR/party1-keyshare.json" ] && [ -f "$KEYGEN_OUTPUT_DIR/party2-keyshare.json" ]; then
# Use local relay if available, otherwise fall back to external
# Use local relay (required)
if [ "$USE_LOCAL_RELAY" = "true" ] && [ -n "$LOCAL_RELAY_URL" ]; then
RELAYS_TO_USE="$LOCAL_RELAY_URL"
echo " Using local relay for keysign: $RELAYS_TO_USE"
else
RELAYS_TO_USE="${RELAYS:-wss://bbw-nostr.xyz}"
echo " Using external relay for keysign: $RELAYS_TO_USE"
print_failure "nostr-keysign.sh: Local relay is required but not available"
echo " This test requires a local Docker-based relay to run."
exit 1
fi

export OUTPUT_DIR="$KEYGEN_OUTPUT_DIR"
Expand Down Expand Up @@ -786,14 +788,14 @@ else
print_failure "nostr-keygen-3party.sh: Syntax error"
fi

# Use local relay if available
# Use local relay (required)
if [ "$USE_LOCAL_RELAY" = "true" ] && [ -n "$LOCAL_RELAY_URL" ]; then
RELAYS_TO_USE="$LOCAL_RELAY_URL"
echo "Using local relay: $RELAYS_TO_USE"
else
RELAYS_TO_USE="${RELAYS:-wss://nostr.hifish.org,wss://nostr.xxi.quest,wss://bbw-nostr.xyz}"
echo "Using external relays: $RELAYS_TO_USE"
echo " (Note: Tests may fail due to relay connectivity)"
print_failure "nostr-keygen-3party.sh: Local relay is required but not available"
echo " This test requires a local Docker-based relay to run."
exit 1
fi

# Try to run with a short timeout
Expand Down
28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,34 @@ All notable changes to Bold Wallet are documented in this file.

---

## [2.0.2] - 2025-12-10

### 🔓 F-Droid Compatibility
- **FOSS Version for MobileNostrPairing**: Added `MobileNostrPairing.foss.tsx` for F-Droid builds
- **Removed react-native-vision-camera Dependency**: Replaced iOS camera with `BarcodeZxingScan` for both iOS and Android platforms
- **F-Droid Build Support**: MobileNostrPairing now passes F-Droid open source restrictions, similar to SendBitcoinModal

### 🎨 UI Improvements
- **Loading Screen Background Fix**: Added proper background color to safe area container for consistent theming

### 📱 App Icons
- **Android Launcher Icons**: Updated and optimized Android app launcher icons across all density variants
- **Icon Optimization**: Reduced file sizes while maintaining visual quality

### 🔧 CI/CD Improvements
- **Docker Caching for Nostr Relay**: Added Docker image caching for nostr-rs-relay in GitHub Actions to speed up test runs
- **Improved Test Pipeline**: Updated GitHub Actions workflow to require local Docker-based Nostr relay for testing
- **Test Script Enhancements**: Enhanced test-all.sh with better error messages and local relay requirements
- **Test Optimization**: Removed redundant tests that are already covered by the local relay

### Technical
- Created FOSS-compatible version of MobileNostrPairing screen
- Unified QR scanning implementation using BarcodeZxingScan across all platforms
- Maintained full feature parity with standard version
- Version code bumped to 32 (Android) and build 32 (iOS)

---

## [2.0.1] - 2025-12-08

### 🐛 Bug Fixes
Expand Down
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ android {
applicationId "com.boldwallet"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 31
versionName "2.0.1"
versionCode 32
versionName "2.0.2"
missingDimensionStrategy 'react-native-camera', 'general'
missingDimensionStrategy 'react-native-arch', 'oldarch'

Expand Down
Binary file modified android/app/src/main/ic_launcher-playstore.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-hdpi/ic_launcher.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed android/app/src/main/res/mipmap-ldpi/ic_launcher.png
Binary file not shown.
Binary file modified android/app/src/main/res/mipmap-mdpi/ic_launcher.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xhdpi/ic_launcher.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions ios/BoldWallet.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = NO;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = 31;
CURRENT_PROJECT_VERSION = 32;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = 2G529K765N;
ENABLE_BITCODE = NO;
Expand All @@ -532,7 +532,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2.0.1;
MARKETING_VERSION = 2.0.2;
ONLY_ACTIVE_ARCH = NO;
OTHER_LDFLAGS = (
"$(inherited)",
Expand All @@ -556,7 +556,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = NO;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = 31;
CURRENT_PROJECT_VERSION = 32;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = 2G529K765N;
ENABLE_TESTABILITY = NO;
Expand All @@ -569,7 +569,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2.0.1;
MARKETING_VERSION = 2.0.2;
ONLY_ACTIVE_ARCH = YES;
OTHER_LDFLAGS = (
"$(inherited)",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "boldwallet",
"version": "2.0.1",
"version": "2.0.2",
"private": true,
"scripts": {
"android": "react-native run-android",
Expand Down
1 change: 1 addition & 0 deletions screens/LoadingScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,7 @@ const LoadingScreen = ({onRetry}: any) => {
},
safeArea: {
flex: 1,
backgroundColor: theme.colors.background,
},
});

Expand Down
Loading