Skip to content
Open
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
44 changes: 44 additions & 0 deletions .github/workflows/btcpay-integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
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 Server
working-directory: integration-tests/btcpay
run: docker compose up -d

- 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 Integration Tests
run: |
chmod +x gradlew
./gradlew testDebugUnitTest --tests "com.electricdreams.numo.core.payment.impl.BtcPayPaymentServiceIntegrationTest.*"

- name: Cleanup
if: always()
working-directory: integration-tests/btcpay
run: docker compose down -v
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@
local.properties
.aider*
.vscode
release
release
btcpay_env.properties
11 changes: 11 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,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 @@ -78,6 +78,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