From 73c5e188c8cd91bfed525f6c084cdf9ec1e5982b Mon Sep 17 00:00:00 2001 From: Ryuash <42913823+ryuash@users.noreply.github.com> Date: Tue, 7 Sep 2021 11:23:57 +0800 Subject: [PATCH] update: use djuno testnet if on testnet (#293) --- src/hooks/use_desmos_profile.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/hooks/use_desmos_profile.ts b/src/hooks/use_desmos_profile.ts index 52f141840a..ff7d6718d9 100644 --- a/src/hooks/use_desmos_profile.ts +++ b/src/hooks/use_desmos_profile.ts @@ -12,7 +12,11 @@ type Options = { onComplete: (data: DesmosProfileQuery) => void; } -const PROFILE_API = 'https://gql.mainnet.desmos.network/v1/graphql'; +let PROFILE_API = 'https://gql.mainnet.desmos.network/v1/graphql'; + +if (process.env.NEXT_PUBLIC_CHAIN_STATUS === 'testnet') { + PROFILE_API = 'https://gql.morpheus.desmos.network/v1/graphql'; +} export const useDesmosProfile = (options: Options) => { const [loading, setLoading] = useState(false);