Skip to content

Conversation

@ovitrif
Copy link
Collaborator

@ovitrif ovitrif commented Oct 9, 2025

Closes #430
Resolves review comments in #429

Description

This PR adds setup to disable geoblocking checks entirely via GEO bool environment variable with value true or false.

When using GEO=false, geoblocking checks via API are bypassed.
Defaults to true, preserving current default functionality.

Mainly relevant for E2E tests.

Aside, it also addressed comments for merged PR:

  • Display CJIT activities #429
    • Renames method to create cjit activity
    • Fixes Cjit activity timestamp creation to use epoch seconds instead of millis
    • Renames cjitOrder to cjitEntry in codebase, because it is not an order more than it is an invoice.

Preview

geoOff.mp4

QA Notes

test

  1. Teleport to USA
  2. Start your emulator
  3. GEO=false ./gradlew installDevDebug
  4. Open app on emulator
  5. Search in logcat for VERBOSE: Geoblocking disabled via build config
  6. expect to find a few log entries
  7. transfer to spending
  8. expect success

(optional) CJIT test

  1. transfer to savings
  2. /regtest-mine 6
  3. receive → tap 'receive on… 🟣' toggle → min → complete
  4. scan & pay invoice from phone
  5. expect channel opened in emulator

@ovitrif ovitrif requested review from jvsena42 and piotr-iohk October 9, 2025 09:37
@ovitrif ovitrif self-assigned this Oct 9, 2025
@ovitrif ovitrif enabled auto-merge October 9, 2025 09:38
@jvsena42 jvsena42 requested a review from Copilot October 9, 2025 10:06
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Adds a build configuration option to disable geoblocking checks entirely via the GEO environment variable, primarily for E2E testing purposes. When GEO=false, API-based geoblocking checks are bypassed while preserving the default enabled behavior.

  • Introduces GEO build configuration flag with default value true
  • Adds early return in geoblocking logic when disabled via config
  • Updates E2E workflow and documentation to use the new flag

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
app/build.gradle.kts Adds GEO build config field with environment variable support
app/src/main/java/to/bitkit/env/Env.kt Exposes geoblocking config as constant
app/src/main/java/to/bitkit/services/CoreService.kt Implements early return when geoblocking disabled
README.md Documents the new GEO environment variable usage
.github/workflows/e2e.yml Configures E2E tests to disable geoblocking

invoice = cjitOrder.invoice.request,
invoice = cjitEntry.invoice.request,
message = "",
timestamp = now,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The time parameter could have a less error-prone name, like timestampSeconds

@ovitrif ovitrif merged commit 6d9b4ef into master Oct 9, 2025
10 checks passed
@ovitrif ovitrif deleted the feat/e2e-geo-toggle branch October 9, 2025 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow to toggle geoblocking via an env var for e2e tests

3 participants