Skip to content

Commit

Permalink
review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
BedrockSquirrel committed Sep 29, 2023
1 parent dfdd614 commit 16b280e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tools/faucet/cmd/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package main

import (
"flag"

Check failure on line 4 in tools/faucet/cmd/cli.go

View workflow job for this annotation

GitHub Actions / lint

File is not `gofumpt`-ed (gofumpt)
"github.com/ethereum/go-ethereum/params"

Check failure on line 5 in tools/faucet/cmd/cli.go

View workflow job for this annotation

GitHub Actions / lint

File is not `goimports`-ed (goimports)
"math/big"

Check failure on line 6 in tools/faucet/cmd/cli.go

View workflow job for this annotation

GitHub Actions / lint

File is not `gofumpt`-ed (gofumpt)

"github.com/obscuronet/go-obscuro/tools/faucet/faucet"
Expand Down Expand Up @@ -62,7 +63,7 @@ func parseCLIArgs() *faucet.Config {

func toWei(amount *float64) *big.Int {
amtFloat := new(big.Float).SetFloat64(*amount)
weiFloat := new(big.Float).Mul(amtFloat, big.NewFloat(1e18))
weiFloat := new(big.Float).Mul(amtFloat, big.NewFloat(params.Ether))
// don't care about the accuracy here, float should have less than 18 decimal places
wei, _ := weiFloat.Int(nil)
return wei
Expand Down
1 change: 1 addition & 0 deletions tools/faucet/webserver/web_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ func NewWebServer(faucetServer *faucet.Faucet, bindAddress string, jwtSecret []b
// authed endpoint
r.POST("/auth/fund/:token", jwtTokenChecker(jwtSecret, faucetServer.Logger), fundingHandler(faucetServer, defaultAmount))

// todo (@matt) we need to remove this unsecure endpoint before we provide a fully public sepolia faucet
r.POST("/fund/:token", fundingHandler(faucetServer, defaultAmount))

return &WebServer{
Expand Down

0 comments on commit 16b280e

Please sign in to comment.