Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
1c93d37
interfaces, move cdk to interfaces.
d4rp4t Jan 18, 2026
a2e3d32
add basic btcpayserver support
d4rp4t Jan 29, 2026
e28c900
logs and invoice details
d4rp4t Feb 2, 2026
da88ff0
test: Add integration tests and infrastructure for BTCPay Server
a1denvalu3 Feb 2, 2026
ad98a25
ci: Add BTCPay integration workflow
a1denvalu3 Feb 2, 2026
41e7793
feat: Add NUT-18 POST redemption support for BTCPay
a1denvalu3 Feb 5, 2026
c51ba1a
handle missing cashu payment prompt
d4rp4t Feb 26, 2026
4e816d4
fix rebase problems
d4rp4t Feb 26, 2026
feda354
change test connection uri to require read_invoice permission
d4rp4t Feb 26, 2026
88fa06d
lock non-used settings while connected to btcpay
d4rp4t Feb 26, 2026
4a867c6
handle expired btcpay invoices
d4rp4t Feb 27, 2026
1d033a4
add more tests
d4rp4t Feb 27, 2026
188db24
fix tests
d4rp4t Feb 27, 2026
23255e6
fix payment state
d4rp4t Mar 6, 2026
5bbaf33
add logs to btcpayserver
d4rp4t Mar 6, 2026
35c11fc
fix nfc failing
d4rp4t Mar 6, 2026
af38859
fix btcpay invoice spam
d4rp4t Mar 7, 2026
7637805
fix btcpay invoices
d4rp4t Mar 27, 2026
e118840
fix btcpay invoices, rebase and debug
d4rp4t Mar 27, 2026
e2da5ec
fix: invoice id persistence, json error handling, polling job cancel…
d4rp4t Mar 27, 2026
d9d59f9
fix: btcpay polling - backoff, timeout, safe resume
d4rp4t Mar 27, 2026
512ae26
chore: cleanup
d4rp4t Mar 28, 2026
1c359a8
fix: migrate to cdk bindings in CdkWalletProvider
d4rp4t Apr 13, 2026
d301411
chore: add more integration tests to btcpayserver integration
d4rp4t Apr 13, 2026
e9a2f8d
feat: e2e tests with cdk mint
d4rp4t Apr 14, 2026
1a4e6fb
fix: CI channel setup
d4rp4t Apr 14, 2026
8aeb833
fix: remove useless tests in CI
d4rp4t Apr 14, 2026
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
86 changes: 86 additions & 0 deletions .github/workflows/btcpay-integration.yml
Comment thread
a1denvalu3 marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
name: BTCPay Integration Tests

on:
push:
branches: [ "main", "master", "feat/*", "fix/*" ]
pull_request:
branches: [ "main", "master" ]

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive

- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
cache: 'gradle'

- name: Start BTCPay + CDK mint stack
working-directory: integration-tests/btcpay
run: docker compose up -d

- name: Wait for Lightning channel setup
working-directory: integration-tests/btcpay
run: |
echo "Waiting for channel-setup to complete (up to 300 s)..."
if ! timeout 300 docker compose wait channel-setup; then
echo "channel-setup failed or timed out"
docker compose logs channel-setup
docker compose logs mint_lnd
docker compose logs lnd_bitcoin
exit 1
fi
echo "Channel setup complete."

- name: Wait for CDK mint to be ready
run: |
echo "Waiting for CDK mint at localhost:3338..."
for i in $(seq 1 30); do
if curl -sf http://localhost:3338/v1/info >/dev/null 2>&1; then
echo "CDK mint ready."
curl -sf http://localhost:3338/v1/info | python3 -m json.tool
break
fi
sleep 3
done

- name: Provision BTCPay Server
working-directory: integration-tests/btcpay
run: |
chmod +x provision.sh
./provision.sh
cp btcpay_env.properties ../../btcpay_env.properties

- name: Run BTCPay integration tests
run: |
chmod +x gradlew
./gradlew testDebugUnitTest \
--tests "com.electricdreams.numo.core.payment.impl.BtcPayPaymentServiceIntegrationTest.*" \
--no-daemon --console=plain

- name: Dump logs on failure
if: failure()
working-directory: integration-tests/btcpay
run: |
echo "=== cdk-mint ==="
docker compose logs cdk-mint | tail -100
echo "=== mint_lnd ==="
docker compose logs mint_lnd | tail -50
echo "=== customer_lnd ==="
docker compose logs customer_lnd | tail -50
echo "=== channel-setup ==="
docker compose logs channel-setup
echo "=== btcpayserver ==="
docker compose logs btcpayserver | tail -100

- name: Cleanup
if: always()
working-directory: integration-tests/btcpay
run: docker compose down -v
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ release
opencode.json
.kotlin/
.opencode/
btcpay_env.properties
12 changes: 12 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
android:theme="@style/Theme.Numo"
android:localeConfig="@xml/locales_config"
android:name=".NumoApplication"
android:networkSecurityConfig="@xml/network_security_config"
tools:targetApi="33">

<service
Expand Down Expand Up @@ -504,6 +505,17 @@
android:value=".feature.settings.SettingsActivity" />
</activity>

<activity android:name="com.electricdreams.numo.feature.settings.BtcPaySettingsActivity"
android:exported="false"
android:label="@string/btcpay_settings_title"
android:theme="@style/Theme.Numo"
android:configChanges="orientation|screenSize|screenLayout|keyboardHidden"
android:parentActivityName=".feature.settings.SettingsActivity">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".feature.settings.SettingsActivity" />
</activity>

<activity android:name="com.electricdreams.numo.feature.autowithdraw.AutoWithdrawSettingsActivity"
android:exported="false"
android:label="@string/auto_withdraw_title"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,12 @@ class PaymentFailureActivity : AppCompatActivity() {
handleTryAgain()
}

// Hide "Try Again" if there are no resumable pending payments
val hasPending = PaymentsHistoryActivity.getPaymentHistory(this).any { it.isPending() }
if (!hasPending) {
tryAgainButton.visibility = View.GONE
}

// Start the error animation after a short delay
errorIcon.postDelayed({
animateErrorIcon()
Expand Down
Loading
Loading