diff options
author | Péter Szilágyi <peterke@gmail.com> | 2017-07-18 02:19:16 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-18 02:19:16 +0800 |
commit | 4d2249773a6dbab04ec0656a9c6687a66a16edf0 (patch) | |
tree | df367175241a390d2749d71d01e121a5e50424aa | |
parent | 8a8fc5f8ef102eac661cd4c4ea8baf433be6cd09 (diff) | |
parent | 671ba3791d31e46c21a34b061b804536a98c0182 (diff) | |
download | dexon-4d2249773a6dbab04ec0656a9c6687a66a16edf0.tar dexon-4d2249773a6dbab04ec0656a9c6687a66a16edf0.tar.gz dexon-4d2249773a6dbab04ec0656a9c6687a66a16edf0.tar.bz2 dexon-4d2249773a6dbab04ec0656a9c6687a66a16edf0.tar.lz dexon-4d2249773a6dbab04ec0656a9c6687a66a16edf0.tar.xz dexon-4d2249773a6dbab04ec0656a9c6687a66a16edf0.tar.zst dexon-4d2249773a6dbab04ec0656a9c6687a66a16edf0.zip |
Merge pull request #14824 from karalabe/faucet-ignore-whitespace
cmd/faucet: ignore whitespace in gist content
-rw-r--r-- | cmd/faucet/faucet.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cmd/faucet/faucet.go b/cmd/faucet/faucet.go index c06c4365b..8cd62441e 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{}) { |