Skip to content

Conversation

@jvsena42
Copy link
Member

@jvsena42 jvsena42 commented May 14, 2025

FIGMA

  • Check if the user is geo blocked and has no external LSP
  • Implement the check in the receiveOnSpendingBalance state
  • Add the check to toggleReceiveOnSpendingBalance method
  • Create Geo block screen
  • Navigate to geo block screen
  • Navigate to advanced screen
  • Update tests

Related to #50

geo_block.mp4
cjit_geo_block.mp4

@jvsena42 jvsena42 self-assigned this May 14, 2025
@jvsena42 jvsena42 marked this pull request as ready for review May 14, 2025 17:01
@jvsena42 jvsena42 requested a review from ovitrif May 14, 2025 17:22
Copy link
Collaborator

@ovitrif ovitrif left a comment

Choose a reason for hiding this comment

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

Overall everything looks great!

Though it looks to me the logic to determine if we should block lightning needs to compare currently connected peers vs blocktank trusted peers (see comment)

@jvsena42 jvsena42 marked this pull request as draft May 15, 2025 10:03
@jvsena42 jvsena42 marked this pull request as ready for review May 15, 2025 10:33
@jvsena42 jvsena42 requested a review from ovitrif May 15, 2025 10:33
Copy link
Collaborator

@ovitrif ovitrif left a comment

Choose a reason for hiding this comment

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

Thanks for updating the logic in CoreService 👍🏻

I tried testing this for the basic and easiest test: using USA IP address with VPN.

Test Scenario: Geoblock USA

  1. Uninstall app
  2. Connect via VPN to USA IP
  3. Open app > create new wallet
  4. Go to Receive > tap Receive on Spending Balance
  5. 🔴 expected: see geoblock UI
    actual: I see amount UI

I looked at the implementation and it seems it currently applies only when the user already has a LN channel, which is not necessarily the CJIT flow.

Test Preview:

cjitNotGeoBlocked.mp4

I dug a bit in the code and noticed that we don't currently check the explicit CJIT case:
Android Studio 2025-05-15 005578

@jvsena42 jvsena42 marked this pull request as draft May 15, 2025 11:18
@jvsena42
Copy link
Member Author

Thanks! I forgot this flow

@jvsena42
Copy link
Member Author

CJIT test added to description

@jvsena42 jvsena42 marked this pull request as ready for review May 15, 2025 11:56
@jvsena42 jvsena42 requested a review from ovitrif May 15, 2025 11:56
@jvsena42 jvsena42 marked this pull request as draft May 15, 2025 12:02
@jvsena42
Copy link
Member Author

jvsena42 commented May 15, 2025

Sorry again, fixed the navigation
Video test updated

@jvsena42 jvsena42 marked this pull request as ready for review May 15, 2025 12:09
@jvsena42 jvsena42 requested a review from ovitrif May 15, 2025 12:10
Copy link
Collaborator

@ovitrif ovitrif left a comment

Choose a reason for hiding this comment

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

Great end result 🚀 , thanks a lot for addressing all comments and shaping it up to this state 🙌🏻

Gave testing one more spin:

  1. 🟢 CJIT (New wallet on USA IP) - geoblock UI shown
  2. 🟢 Existing wallet with LN (on USA IP) - geoblock UI shown

Ready to merge 🎉

@ovitrif ovitrif merged commit 0498e28 into master May 15, 2025
1 check passed
@ovitrif ovitrif deleted the feat/geoblock branch May 15, 2025 12:19
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.

3 participants