Skip to content

Commit

Permalink
update: use djuno testnet if on testnet (#293)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryuash authored Sep 7, 2021
1 parent 0e6d724 commit 73c5e18
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/hooks/use_desmos_profile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 73c5e18

Please sign in to comment.