Update urls

This commit is contained in:
Valtteri Karesto
2022-03-22 17:07:41 +02:00
parent e32e07f7fd
commit 2e25242ebe
3 changed files with 4 additions and 4 deletions

View File

@@ -182,7 +182,7 @@ export const AccountDialog = ({
</Flex>
<Flex css={{ marginLeft: "auto" }}>
<a
href={`https://hooks-testnet-explorer.xrpl-labs.com/${activeAccount?.address}`}
href={`https://${process.env.NEXT_PUBLIC_EXPLORER_URL}/${activeAccount?.address}`}
target="_blank"
rel="noreferrer noopener"
>
@@ -282,7 +282,7 @@ const Accounts: FC<AccountProps> = (props) => {
let fetchAccountInfoInterval: NodeJS.Timer;
if (snap.clientStatus === "online") {
fetchAccInfo();
fetchAccountInfoInterval = setInterval(() => fetchAccInfo(), 2000);
fetchAccountInfoInterval = setInterval(() => fetchAccInfo(), 2500);
}
return () => {

View File

@@ -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)

View File

@@ -128,7 +128,7 @@ const state = proxy<IState>({
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);