Skip to content

Commit f0d472d

Browse files
committed
Prevent maintenance issues when adding new faucet hosts, and fix the loader which broke during a past migration
1 parent 2046540 commit f0d472d

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

@theme/components/XRPLoader.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export interface XRPLoaderProps {
66

77
export default function XRPLoader(props: XRPLoaderProps) {
88
return (
9-
<div className="loader collapse">
9+
<div className="loader">
1010
<img alt="(loading)" className="throbber" src="/img/xrp-loader-96.png" />
1111
{props.message}
1212
</div>);

resources/dev-tools/faucets.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,39 +4,39 @@
44
"id": "faucet-select-testnet",
55
"wsUrl": "wss://s.altnet.rippletest.net:51233/",
66
"jsonRpcUrl": "https://s.altnet.rippletest.net:51234/",
7-
"faucetUrl": "faucet.altnet.rippletest.net",
7+
"faucetHost": "faucet.altnet.rippletest.net",
88
"shortName": "Testnet",
99
"desc": "Mainnet-like network for testing applications."
1010
},
1111
{
1212
"id": "faucet-select-devnet",
1313
"wsUrl": "wss://s.devnet.rippletest.net:51233/",
1414
"jsonRpcUrl": "https://s.devnet.rippletest.net:51234/",
15-
"faucetUrl": "faucet.devnet.rippletest.net",
15+
"faucetHost": "faucet.devnet.rippletest.net",
1616
"shortName": "Devnet",
1717
"desc": "Preview of upcoming amendments."
1818
},
1919
{
2020
"id": "faucet-select-xahau",
2121
"wsUrl": "wss://xahau-test.net/",
2222
"jsonRpcUrl": "https://xahau-test.net/",
23-
"faucetUrl": "xahau-test.net",
23+
"faucetHost": "xahau-test.net",
2424
"shortName": "Xahau-Testnet",
2525
"desc": "Hooks (L1 smart contracts) enabled Xahau testnet."
2626
},
2727
{
2828
"id": "faucet-select-mpt-devnet",
2929
"wsUrl": "wss://mpt.devnet.rippletest.net:51233/",
3030
"jsonRpcUrl": "https://mpt.devnet.rippletest.net:51234/",
31-
"faucetUrl": "mptfaucet.devnet.rippletest.net",
31+
"faucetHost": "mptfaucet.devnet.rippletest.net",
3232
"shortName": "MPT-Devnet",
3333
"desc": "Preview of XLS-33d Multi-Purpose Tokens amendment."
3434
},
3535
{
3636
"id": "faucet-select-batch-devnet",
3737
"wsUrl": "wss://batch.nerdnest.xyz",
3838
"jsonRpcUrl": "https://batch.rpc.nerdnest.xyz",
39-
"faucetUrl": "batch.faucet.nerdnest.xyz",
39+
"faucetHost": "batch.faucet.nerdnest.xyz",
4040
"shortName": "Batch-Devnet",
4141
"desc": "Preview of XLS-56d Batch transactions."
4242
}

resources/dev-tools/xrp-faucets.page.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import * as React from 'react';
2-
import { useThemeHooks } from '@redocly/theme/core/hooks';
31
import { Link } from "@redocly/theme/components/Link/Link";
2+
import { useThemeHooks } from '@redocly/theme/core/hooks';
3+
import * as React from 'react';
44
import { useState } from 'react';
5-
import { Client, dropsToXrp, Wallet } from 'xrpl';
6-
import * as faucetData from './faucets.json'
5+
import { Client, dropsToXrp, Wallet } from 'xrpl';
76
import XRPLoader from '../../@theme/components/XRPLoader';
7+
import * as faucetData from './faucets.json';
88

99
export const frontmatter = {
1010
seo: {
@@ -17,7 +17,7 @@ interface FaucetInfo {
1717
id: string,
1818
wsUrl: string,
1919
jsonRpcUrl: string,
20-
faucetUrl: string,
20+
faucetHost: string,
2121
shortName: string,
2222
desc: string,
2323
}
@@ -139,7 +139,7 @@ async function generateFaucetCredentialsAndUpdateUI(
139139
setAddress(wallet.address)
140140
setSecret(wallet.seed)
141141

142-
await client.fundWallet(wallet, { faucetHost: selectedFaucet.faucetUrl, usageContext: "xrpl.org-faucet" })
142+
await client.fundWallet(wallet, { faucetHost: selectedFaucet.faucetHost, usageContext: "xrpl.org-faucet" })
143143

144144
const response = await waitForSequence(client, wallet.address)
145145

0 commit comments

Comments
 (0)