mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-30 09:05:50 +00:00
feat: add support for sidechain devnet faucet (#2336)
* add sidechain faucet info * add test * update changelog * fix changelog
This commit is contained in:
@@ -13,7 +13,10 @@ Subscribe to [the **xrpl-announce** mailing list](https://groups.google.com/g/xr
|
||||
* Fixed the location of `signer_lists` in the `account_info` response so that it matches rippled
|
||||
* Guard check for signing algorithm used in `Wallet.generate()`
|
||||
* Null and undefined values in transactions are now treated as though the field was not passed in.
|
||||
* Improved the type definition of the return value of `submitAndWait()`.
|
||||
* Improved the type definition of the return value of `submitAndWait()`
|
||||
|
||||
### Changed
|
||||
* Added sidechain devnet support to faucet generation
|
||||
|
||||
### Removed
|
||||
* RPCs and utils related to the old sidechain design
|
||||
|
||||
@@ -16,6 +16,7 @@ export enum FaucetNetwork {
|
||||
Devnet = 'faucet.devnet.rippletest.net',
|
||||
AMMDevnet = 'ammfaucet.devnet.rippletest.net',
|
||||
HooksV3Testnet = 'hooks-testnet-v3.xrpl-labs.com',
|
||||
SidechainDevnet = 'sidechain-faucet.devnet.rippletest.net',
|
||||
}
|
||||
|
||||
export const FaucetNetworkPaths: Record<string, string> = {
|
||||
@@ -23,6 +24,7 @@ export const FaucetNetworkPaths: Record<string, string> = {
|
||||
[FaucetNetwork.Devnet]: '/accounts',
|
||||
[FaucetNetwork.AMMDevnet]: '/accounts',
|
||||
[FaucetNetwork.HooksV3Testnet]: '/accounts',
|
||||
[FaucetNetwork.SidechainDevnet]: '/accounts',
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -48,6 +50,16 @@ export function getFaucetHost(client: Client): FaucetNetwork | undefined {
|
||||
return FaucetNetwork.AMMDevnet
|
||||
}
|
||||
|
||||
if (connectionUrl.includes('sidechain-net1')) {
|
||||
return FaucetNetwork.SidechainDevnet
|
||||
}
|
||||
|
||||
if (connectionUrl.includes('sidechain-net2')) {
|
||||
throw new XRPLFaucetError(
|
||||
'Cannot fund an account on an issuing chain. Accounts must be created via the bridge.',
|
||||
)
|
||||
}
|
||||
|
||||
if (connectionUrl.includes('devnet')) {
|
||||
return FaucetNetwork.Devnet
|
||||
}
|
||||
|
||||
@@ -122,6 +122,16 @@ describe('fundWallet', function () {
|
||||
TIMEOUT,
|
||||
)
|
||||
|
||||
it(
|
||||
'can generate and fund wallets on sidechain devnet',
|
||||
async function () {
|
||||
await generate_faucet_wallet_and_fund_again(
|
||||
'wss://sidechain-net1.devnet.rippletest.net:51233',
|
||||
)
|
||||
},
|
||||
TIMEOUT,
|
||||
)
|
||||
|
||||
it(
|
||||
'submit funds wallet with custom amount',
|
||||
async function () {
|
||||
|
||||
Reference in New Issue
Block a user