Apply suggestions from code review

Co-authored-by: Maria Shodunke <maria-robobug@users.noreply.github.com>
Co-authored-by: oeggert <117319296+oeggert@users.noreply.github.com>
This commit is contained in:
Carles
2025-08-25 10:58:26 +02:00
committed by akcodez
parent 43630fbdca
commit b94d5343bc
12 changed files with 69 additions and 95 deletions

View File

@@ -8,4 +8,4 @@ For more context, see the Get Started tutorial for your preferred language:
- [Java](https://xrpl.org/get-started-using-java.html)
- [JavaScript](https://xrpl.org/get-started-using-javascript.html)
- [PHP](https://xrpl.org/get-started-using-php.html)
- [GoLang](https://xrpl.org/get-started-using-golang.html)
- [Go](https://xrpl.org/get-started-using-go.html)

View File

@@ -7,7 +7,10 @@ import (
func main() {
// Define the network client configuration
cfg, err := rpc.NewClientConfig("https://s.altnet.rippletest.net:51234/")
cfg, err := rpc.NewClientConfig(
"https://s.altnet.rippletest.net:51234/",
rpc.WithFaucetProvider(faucet.NewTestnetFaucetProvider()),
)
if err != nil {
panic(err)
}

View File

@@ -9,8 +9,10 @@ import (
func main() {
// Define the network client
client := websocket.NewClient(websocket.NewClientConfig().
WithHost("wss://s.altnet.rippletest.net:51233"))
client := websocket.NewClient(websocket.NewClientConfig().
WithHost("wss://s.altnet.rippletest.net:51233").
WithFaucetProvider(faucet.NewTestnetFaucetProvider()),
)
// Disconnect the client when done. (Defer executes at the end of the function)
defer client.Disconnect()