From 2e25242ebe80e57cdf0808de0c0e7237334bc92a Mon Sep 17 00:00:00 2001 From: Valtteri Karesto Date: Tue, 22 Mar 2022 17:07:41 +0200 Subject: [PATCH] Update urls --- components/Accounts.tsx | 4 ++-- pages/api/faucet.ts | 2 +- state/index.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/components/Accounts.tsx b/components/Accounts.tsx index 9df8257..5271719 100644 --- a/components/Accounts.tsx +++ b/components/Accounts.tsx @@ -182,7 +182,7 @@ export const AccountDialog = ({ @@ -282,7 +282,7 @@ const Accounts: FC = (props) => { let fetchAccountInfoInterval: NodeJS.Timer; if (snap.clientStatus === "online") { fetchAccInfo(); - fetchAccountInfoInterval = setInterval(() => fetchAccInfo(), 2000); + fetchAccountInfoInterval = setInterval(() => fetchAccInfo(), 2500); } return () => { diff --git a/pages/api/faucet.ts b/pages/api/faucet.ts index 3d8dc50..15b8d49 100644 --- a/pages/api/faucet.ts +++ b/pages/api/faucet.ts @@ -22,7 +22,7 @@ export default async function handler( return res.status(405).json({ error: 'Method not allowed!' }) } try { - const response = await fetch('https://hooks-testnet-v2.xrpl-labs.com/newcreds', { method: 'POST' }); + const response = await fetch(`https://${process.env.NEXT_PUBLIC_TESTNET_URL}/newcreds`, { method: 'POST' }); const json: Faucet | ErrorResponse = await response.json(); if ("error" in json) { return res.status(429).json(json) diff --git a/state/index.ts b/state/index.ts index 5796bbb..4d1828f 100644 --- a/state/index.ts +++ b/state/index.ts @@ -128,7 +128,7 @@ const state = proxy({ logs: [], }); // Initialize socket connection -const client = new XrplClient(process.env.NEXT_PUBLIC_TESTNET_URL); +const client = new XrplClient(`wss://${process.env.NEXT_PUBLIC_TESTNET_URL}`); client.on("online", () => { state.client = ref(client);