mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-12-06 17:27:59 +00:00
fixup! remove faucet
This commit is contained in:
@@ -17,7 +17,6 @@ export enum FaucetNetwork {
|
||||
AMMDevnet = 'ammfaucet.devnet.rippletest.net',
|
||||
NFTDevnet = 'faucet-nft.ripple.com',
|
||||
HooksV2Testnet = 'hooks-testnet-v2.xrpl-labs.com',
|
||||
Vala = 'vala.faucet.transia.co',
|
||||
}
|
||||
|
||||
export const FaucetNetworkPaths: Record<string, string> = {
|
||||
@@ -26,7 +25,6 @@ export const FaucetNetworkPaths: Record<string, string> = {
|
||||
[FaucetNetwork.AMMDevnet]: '/accounts',
|
||||
[FaucetNetwork.NFTDevnet]: '/accounts',
|
||||
[FaucetNetwork.HooksV2Testnet]: '/accounts',
|
||||
[FaucetNetwork.Vala]: '/accounts',
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -61,10 +59,6 @@ export function getFaucetHost(client: Client): FaucetNetwork | undefined {
|
||||
return FaucetNetwork.NFTDevnet
|
||||
}
|
||||
|
||||
if (connectionUrl.includes('vala')) {
|
||||
return FaucetNetwork.Vala
|
||||
}
|
||||
|
||||
throw new XRPLFaucetError('Faucet URL is not defined or inferrable.')
|
||||
}
|
||||
|
||||
|
||||
@@ -90,14 +90,6 @@ describe('fundWallet', function () {
|
||||
TIMEOUT,
|
||||
)
|
||||
|
||||
it(
|
||||
'can generate and fund wallets on Vala devnet',
|
||||
async function () {
|
||||
await generate_faucet_wallet_and_fund_again('wss://vala.ws.transia.co')
|
||||
},
|
||||
TIMEOUT,
|
||||
)
|
||||
|
||||
it(
|
||||
'can generate wallet on hooks v2 testnet',
|
||||
async function () {
|
||||
|
||||
@@ -65,17 +65,6 @@ describe('Get Faucet host ', function () {
|
||||
)
|
||||
})
|
||||
|
||||
it('returns the Vala host', function () {
|
||||
const expectedFaucet = FaucetNetwork.Vala
|
||||
// @ts-expect-error Intentionally modifying private data for test
|
||||
testContext.client.connection.url = FaucetNetwork.Vala
|
||||
|
||||
assert.strictEqual(
|
||||
getFaucetHost(testContext.client as Client),
|
||||
expectedFaucet,
|
||||
)
|
||||
})
|
||||
|
||||
it('returns the correct faucetPath for Devnet host', function () {
|
||||
const expectedFaucetPath = FaucetNetworkPaths[FaucetNetwork.Devnet]
|
||||
// @ts-expect-error Intentionally modifying private data for test
|
||||
@@ -98,17 +87,6 @@ describe('Get Faucet host ', function () {
|
||||
)
|
||||
})
|
||||
|
||||
it('returns the correct faucetPath for Vala host', function () {
|
||||
const expectedFaucetPath = FaucetNetworkPaths[FaucetNetwork.Vala]
|
||||
// @ts-expect-error Intentionally modifying private data for test
|
||||
testContext.client.connection.url = FaucetNetwork.Vala
|
||||
|
||||
assert.strictEqual(
|
||||
getDefaultFaucetPath(getFaucetHost(testContext.client as Client)),
|
||||
expectedFaucetPath,
|
||||
)
|
||||
})
|
||||
|
||||
it('returns the correct faucetPath for undefined host', function () {
|
||||
const expectedFaucetPath = '/accounts'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user