cmd/faucet: ignore whitespace in gist content

release/1.7
Péter Szilágyi 7 years ago
parent 23c6fcdbe8
commit 671ba3791d
No known key found for this signature in database
GPG Key ID: E9AE538CEDF8293D
  1. 5
      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{}) {

Loading…
Cancel
Save