mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-05 04:15:50 +00:00
Prevent maintenance issues when adding new faucet hosts, and fix the loader which broke during a past migration
This commit is contained in:
@@ -6,7 +6,7 @@ export interface XRPLoaderProps {
|
|||||||
|
|
||||||
export default function XRPLoader(props: XRPLoaderProps) {
|
export default function XRPLoader(props: XRPLoaderProps) {
|
||||||
return (
|
return (
|
||||||
<div className="loader collapse">
|
<div className="loader">
|
||||||
<img alt="(loading)" className="throbber" src="/img/xrp-loader-96.png" />
|
<img alt="(loading)" className="throbber" src="/img/xrp-loader-96.png" />
|
||||||
{props.message}
|
{props.message}
|
||||||
</div>);
|
</div>);
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
"id": "faucet-select-testnet",
|
"id": "faucet-select-testnet",
|
||||||
"wsUrl": "wss://s.altnet.rippletest.net:51233/",
|
"wsUrl": "wss://s.altnet.rippletest.net:51233/",
|
||||||
"jsonRpcUrl": "https://s.altnet.rippletest.net:51234/",
|
"jsonRpcUrl": "https://s.altnet.rippletest.net:51234/",
|
||||||
"faucetUrl": "faucet.altnet.rippletest.net",
|
"faucetHost": "faucet.altnet.rippletest.net",
|
||||||
"shortName": "Testnet",
|
"shortName": "Testnet",
|
||||||
"desc": "Mainnet-like network for testing applications."
|
"desc": "Mainnet-like network for testing applications."
|
||||||
},
|
},
|
||||||
@@ -12,7 +12,7 @@
|
|||||||
"id": "faucet-select-devnet",
|
"id": "faucet-select-devnet",
|
||||||
"wsUrl": "wss://s.devnet.rippletest.net:51233/",
|
"wsUrl": "wss://s.devnet.rippletest.net:51233/",
|
||||||
"jsonRpcUrl": "https://s.devnet.rippletest.net:51234/",
|
"jsonRpcUrl": "https://s.devnet.rippletest.net:51234/",
|
||||||
"faucetUrl": "faucet.devnet.rippletest.net",
|
"faucetHost": "faucet.devnet.rippletest.net",
|
||||||
"shortName": "Devnet",
|
"shortName": "Devnet",
|
||||||
"desc": "Preview of upcoming amendments."
|
"desc": "Preview of upcoming amendments."
|
||||||
},
|
},
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
"id": "faucet-select-xahau",
|
"id": "faucet-select-xahau",
|
||||||
"wsUrl": "wss://xahau-test.net/",
|
"wsUrl": "wss://xahau-test.net/",
|
||||||
"jsonRpcUrl": "https://xahau-test.net/",
|
"jsonRpcUrl": "https://xahau-test.net/",
|
||||||
"faucetUrl": "xahau-test.net",
|
"faucetHost": "xahau-test.net",
|
||||||
"shortName": "Xahau-Testnet",
|
"shortName": "Xahau-Testnet",
|
||||||
"desc": "Hooks (L1 smart contracts) enabled Xahau testnet."
|
"desc": "Hooks (L1 smart contracts) enabled Xahau testnet."
|
||||||
},
|
},
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
"id": "faucet-select-mpt-devnet",
|
"id": "faucet-select-mpt-devnet",
|
||||||
"wsUrl": "wss://mpt.devnet.rippletest.net:51233/",
|
"wsUrl": "wss://mpt.devnet.rippletest.net:51233/",
|
||||||
"jsonRpcUrl": "https://mpt.devnet.rippletest.net:51234/",
|
"jsonRpcUrl": "https://mpt.devnet.rippletest.net:51234/",
|
||||||
"faucetUrl": "mptfaucet.devnet.rippletest.net",
|
"faucetHost": "mptfaucet.devnet.rippletest.net",
|
||||||
"shortName": "MPT-Devnet",
|
"shortName": "MPT-Devnet",
|
||||||
"desc": "Preview of XLS-33d Multi-Purpose Tokens amendment."
|
"desc": "Preview of XLS-33d Multi-Purpose Tokens amendment."
|
||||||
},
|
},
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
"id": "faucet-select-batch-devnet",
|
"id": "faucet-select-batch-devnet",
|
||||||
"wsUrl": "wss://batch.nerdnest.xyz",
|
"wsUrl": "wss://batch.nerdnest.xyz",
|
||||||
"jsonRpcUrl": "https://batch.rpc.nerdnest.xyz",
|
"jsonRpcUrl": "https://batch.rpc.nerdnest.xyz",
|
||||||
"faucetUrl": "batch.faucet.nerdnest.xyz",
|
"faucetHost": "batch.faucet.nerdnest.xyz",
|
||||||
"shortName": "Batch-Devnet",
|
"shortName": "Batch-Devnet",
|
||||||
"desc": "Preview of XLS-56d Batch transactions."
|
"desc": "Preview of XLS-56d Batch transactions."
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
import * as React from 'react';
|
|
||||||
import { useThemeHooks } from '@redocly/theme/core/hooks';
|
|
||||||
import { Link } from "@redocly/theme/components/Link/Link";
|
import { Link } from "@redocly/theme/components/Link/Link";
|
||||||
|
import { useThemeHooks } from '@redocly/theme/core/hooks';
|
||||||
|
import * as React from 'react';
|
||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
import { Client, dropsToXrp, Wallet } from 'xrpl';
|
import { Client, dropsToXrp, Wallet } from 'xrpl';
|
||||||
import * as faucetData from './faucets.json'
|
|
||||||
import XRPLoader from '../../@theme/components/XRPLoader';
|
import XRPLoader from '../../@theme/components/XRPLoader';
|
||||||
|
import * as faucetData from './faucets.json';
|
||||||
|
|
||||||
export const frontmatter = {
|
export const frontmatter = {
|
||||||
seo: {
|
seo: {
|
||||||
@@ -17,7 +17,7 @@ interface FaucetInfo {
|
|||||||
id: string,
|
id: string,
|
||||||
wsUrl: string,
|
wsUrl: string,
|
||||||
jsonRpcUrl: string,
|
jsonRpcUrl: string,
|
||||||
faucetUrl: string,
|
faucetHost: string,
|
||||||
shortName: string,
|
shortName: string,
|
||||||
desc: string,
|
desc: string,
|
||||||
}
|
}
|
||||||
@@ -139,7 +139,7 @@ async function generateFaucetCredentialsAndUpdateUI(
|
|||||||
setAddress(wallet.address)
|
setAddress(wallet.address)
|
||||||
setSecret(wallet.seed)
|
setSecret(wallet.seed)
|
||||||
|
|
||||||
await client.fundWallet(wallet, { faucetHost: selectedFaucet.faucetUrl, usageContext: "xrpl.org-faucet" })
|
await client.fundWallet(wallet, { faucetHost: selectedFaucet.faucetHost, usageContext: "xrpl.org-faucet" })
|
||||||
|
|
||||||
const response = await waitForSequence(client, wallet.address)
|
const response = await waitForSequence(client, wallet.address)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user