From 671ba3791d31e46c21a34b061b804536a98c0182 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Mon, 17 Jul 2017 21:15:25 +0300 Subject: [PATCH] cmd/faucet: ignore whitespace in gist content --- cmd/faucet/faucet.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cmd/faucet/faucet.go b/cmd/faucet/faucet.go index c06c4365b5..8cd62441ed 100644 --- a/cmd/faucet/faucet.go +++ b/cmd/faucet/faucet.go @@ -413,8 +413,9 @@ func (f *faucet) apiHandler(conn *websocket.Conn) { // Iterate over all the files and look for Ethereum addresses var address common.Address for _, file := range gist.Files { - if len(file.Content) == 2+common.AddressLength*2 { - address = common.HexToAddress(file.Content) + content := strings.TrimSpace(file.Content) + if len(content) == 2+common.AddressLength*2 { + address = common.HexToAddress(content) } } if address == (common.Address{}) {