From e2a83278dbcc29a4cf4187097e848ca08e5aa2ac Mon Sep 17 00:00:00 2001 From: Ivan Vershigora Date: Wed, 22 Nov 2023 16:26:25 +0000 Subject: [PATCH] fix: geoblock --- src/utils/blocktank/index.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/utils/blocktank/index.ts b/src/utils/blocktank/index.ts index e9917a446..5d50c84af 100644 --- a/src/utils/blocktank/index.ts +++ b/src/utils/blocktank/index.ts @@ -6,8 +6,9 @@ import { IBtOrder, ICJitEntry, } from '@synonymdev/blocktank-lsp-http-client'; - import { err, ok, Result } from '@synonymdev/result'; +import { CJitStateEnum } from '@synonymdev/blocktank-lsp-http-client/dist/shared/CJitStateEnum'; +import { BtOpenChannelState } from '@synonymdev/blocktank-lsp-http-client/dist/shared/BtOpenChannelState'; import { EAvailableNetworks, TAvailableNetworks } from '../networks'; import { addPeers, getNodeId, refreshLdk } from '../lightning'; @@ -25,9 +26,8 @@ import { } from '../../store/types/blocktank'; import { setGeoBlock, updateUser } from '../../store/actions/user'; import { refreshWallet } from '../wallet'; -import { BtOpenChannelState } from '@synonymdev/blocktank-lsp-http-client/dist/shared/BtOpenChannelState'; import { DEFAULT_CHANNEL_DURATION } from '../../screens/Lightning/CustomConfirm'; -import { CJitStateEnum } from '@synonymdev/blocktank-lsp-http-client/dist/shared/CJitStateEnum'; +import { __BLOCKTANK_HOST__ } from '../../constants/env'; const bt = new BlocktankClient(); @@ -372,12 +372,12 @@ export const isGeoBlocked = async (fromStorage = false): Promise => { } } const response = await fetch( - 'https://blocktank.synonym.to/api/v1/channel/geocheck', + `${__BLOCKTANK_HOST__}/api/v2/channel/geocheck`, ); const data: TGeoBlockResponse = await response.json(); return !!data?.error; } catch { - return true; + return false; } };