XRPLF / xrpl.js

A JavaScript/TypeScript API for interacting with the XRP Ledger in Node.js and the browser
https://xrpl.org/
1.21k stars 512 forks source link

Use Network ID to determine the correct faucet to use #2701

Open mvadari opened 4 months ago

mvadari commented 4 months ago

Code reference: https://github.com/XRPLF/xrpl.js/blob/main/packages/xrpl/src/Wallet/fundWallet.ts

Currently, the faucet generation code guesses the correct faucet to use based on substrings in the URL. This isn't a very robust system. It would be better (and more robust) to use the Network ID.