-
Notifications
You must be signed in to change notification settings - Fork 0
Geoblock improvements #233
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
245565c
chore: add geoblock env variable
jvsena42 a0e70f9
feat: add env variable check to checkGeoStatus
jvsena42 2a811e9
ci: add GEO env variable
jvsena42 2a0899a
Merge branch 'master' into chore/geoblocking-env
jvsena42 3754e0e
fix: add contextual type to nil return
jvsena42 d4cd419
chore: add swift compiler flags
jvsena42 986b6e3
chore: add geoblock helper methods
jvsena42 65c983e
fix: filter only non cLSP channels and fix milisats conversion
jvsena42 556212a
feat: add geoblock checks to lightning send
jvsena42 7218256
feat: update inbound calc
jvsena42 ca8d780
feat: display non LSP inbound
jvsena42 3361a0b
feat: pass geoblock status
jvsena42 e3148f8
feat: update canSend call
jvsena42 8127515
feat: block transfer to spending
jvsena42 fbbab2e
fix: error parameter
jvsena42 2a0576e
fix: set geoblocked parameter
jvsena42 ded5b69
fix: uniffy tab visibility
jvsena42 4f54600
feat: dont display qr spending if only has blocktank channels
jvsena42 b38db78
Merge branch 'master' into chore/geoblocking-env
jvsena42 91e64d8
chore: create a singleton service to geoblock
jvsena42 e04f979
refactor: replace geoblock parameters
jvsena42 3888486
chore: remove unused variable
jvsena42 f4f60a5
chore: remove comments
jvsena42 a0b7f7e
chore: geo build env name
jvsena42 b18e50b
fix: remove geoservice from ui tests
jvsena42 f93e748
Merge branch 'master' into chore/geoblocking-env
jvsena42 b3b53e8
Merge branch 'master' into chore/geoblocking-env
jvsena42 9bf556c
fic: change the Xcode project configuration to append CHECK_GEOBLOCK …
jvsena42 0ef51be
Merge branch 'master' into chore/geoblocking-env
jvsena42 a9c4c0e
Merge branch 'master' into chore/geoblocking-env
jvsena42 110304d
Merge branch 'master' into chore/geoblocking-env
jvsena42 5ced847
Merge branch 'master' into chore/geoblocking-env
jvsena42 ad91f6c
fix: refresh geoblocking on qr sheet display
jvsena42 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| import Foundation | ||
| import SwiftUI | ||
|
|
||
| /// Service responsible for managing geoblocking state | ||
| class GeoService: ObservableObject { | ||
| static let shared = GeoService() | ||
|
|
||
| /// Current geoblocking status | ||
| /// - `false`: User is not geoblocked (default/fallback if check fails) | ||
| /// - `true`: User is geoblocked | ||
| @Published var isGeoBlocked: Bool = false | ||
|
|
||
| private let coreService: CoreService | ||
|
|
||
| private init(coreService: CoreService = .shared) { | ||
| self.coreService = coreService | ||
| } | ||
|
|
||
| /// Checks the current geoblocking status and updates the published state | ||
| func checkGeoStatus() async { | ||
| do { | ||
| let result = try await coreService.checkGeoStatus() | ||
|
|
||
| let newValue = result ?? false | ||
|
|
||
| await MainActor.run { | ||
| self.isGeoBlocked = newValue | ||
| } | ||
|
|
||
| Logger.info("Geo status check completed: isGeoBlocked=\(isGeoBlocked)", context: "GeoService") | ||
| } catch { | ||
| isGeoBlocked = false | ||
| Logger.error("Failed to check geo status: \(error)", context: "GeoService") | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.