Skip to content

Commit

Permalink
faucet: fix the terminal format
Browse files Browse the repository at this point in the history
  • Loading branch information
zzzckck committed Aug 29, 2024
1 parent f7ac1a2 commit 4dba3d6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cmd/faucet/faucet.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ func weiToEtherStringF2(wei *big.Int) string {
func main() {
// Parse the flags and set up the logger to print everything requested
flag.Parse()
log.SetDefault(log.NewLogger(log.NewTerminalHandlerWithLevel(os.Stderr, log.FromLegacyLevel(*logFlag), true)))

log.SetDefault(log.NewLogger(log.NewTerminalHandlerWithLevel(os.Stderr, log.FromLegacyLevel(*logFlag), false)))
log.Info("faucet started")
// Construct the payout tiers
amounts := make([]string, *tiersFlag)
for i := 0; i < *tiersFlag; i++ {
Expand Down Expand Up @@ -535,8 +535,8 @@ func (f *faucet) apiHandler(w http.ResponseWriter, r *http.Request) {
} else {
if balanceMainnet.Cmp(minMainnetBalance) < 0 {
f.lock.Unlock()
log.Warn("insufficient enough BNB on BSC mainnet", "address", mainnetAddr,
"balanceMainnet", balanceMainnet, "minimum mainnet BNB request", minMainnetBalance)
log.Warn("insufficient BNB on BSC mainnet", "address", mainnetAddr,
"balanceMainnet", balanceMainnet, "minMainnetBalance", minMainnetBalance)
// Send an error if failed to meet the minimum balance requirement
if err = sendError(wsconn, fmt.Errorf("%s, insufficient BNB on BSC mainnet(should >=%sBNB)",
address.Hex(), weiToEtherStringF2(minMainnetBalance))); err != nil {
Expand Down

0 comments on commit 4dba3d6

Please sign in to comment.