From 227f866e282ef5f93f0070a7af570629d9389bca Mon Sep 17 00:00:00 2001 From: nagdahimanshu Date: Fri, 5 Jul 2024 13:58:23 +0200 Subject: [PATCH] :ok_hand: Applied suggestions --- README.md | 4 ++-- cmd/server.go | 2 +- internal/server/server.go | 2 +- web/src/Faucet.svelte | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index b31ffa1..39d5d21 100644 --- a/README.md +++ b/README.md @@ -106,8 +106,8 @@ The following are the available command-line flags(excluding above wallet flags) | -faucet.minutes | Number of minutes to wait between funding rounds | 10080 (1 week) | | -faucet.name | Network name to display on the frontend | sepolia | | -faucet.symbol | Token symbol to display on the frontend | LSK | -| -explorer.url | Block Explorer URL | https://sepolia-blockscout.lisk.com | -| -explorer.tx.path | Block explorer transaction path | tx | +| -explorer.url | Block explorer URL | https://sepolia-blockscout.lisk.com | +| -explorer.tx.path | Block explorer transaction path fragment | tx | | -hcaptcha.sitekey | hCaptcha sitekey | | | -hcaptcha.secret | hCaptcha secret | | diff --git a/cmd/server.go b/cmd/server.go index 610f412..a461d1d 100644 --- a/cmd/server.go +++ b/cmd/server.go @@ -32,7 +32,7 @@ var ( symbolFlag = flag.String("faucet.symbol", "LSK", "Token symbol to display on the frontend") explorerURL = flag.String("explorer.url", "https://sepolia-blockscout.lisk.com", "Block explorer URL") - explorerTxPath = flag.String("explorer.tx.path", "tx", "Block explorer transaction path") + explorerTxPath = flag.String("explorer.tx.path", "tx", "Block explorer transaction path fragment") keyJSONFlag = flag.String("wallet.keyjson", os.Getenv("KEYSTORE"), "Keystore file to fund user requests with") keyPassFlag = flag.String("wallet.keypass", "password.txt", "Passphrase text file to decrypt keystore") diff --git a/internal/server/server.go b/internal/server/server.go index 683a241..3962b8d 100644 --- a/internal/server/server.go +++ b/internal/server/server.go @@ -76,7 +76,7 @@ func (s *Server) handleClaim() http.HandlerFunc { "txHash": txHash, "address": address, }).Info("Transaction sent successfully") - resp := claimResponse{Message: fmt.Sprintf("Txhash: %s", txHash)} + resp := claimResponse{Message: fmt.Sprintf("txhash: %s", txHash)} renderJSON(w, resp, http.StatusOK) } } diff --git a/web/src/Faucet.svelte b/web/src/Faucet.svelte index 64e34d9..f80dea9 100644 --- a/web/src/Faucet.svelte +++ b/web/src/Faucet.svelte @@ -100,7 +100,7 @@ }); let { msg } = await res.json(); - if (msg.includes('Txhash')) { + if (msg.includes('txhash')) { const txHash = msg.split(' ')[1]; txURL = `${faucetInfo.explorer_url}/${faucetInfo.explorer_txPath}/${txHash}`; } else {