diff --git a/wormhole/send.go b/wormhole/send.go index 2e2d1c5..39890da 100644 --- a/wormhole/send.go +++ b/wormhole/send.go @@ -175,7 +175,7 @@ func (c *Client) SendText(ctx context.Context, msg string, opts ...SendOption) ( close(ch) return } else { - sendErr(fmt.Errorf("unexpected answer")) + sendErr(errors.New("unexpected answer")) return } }() @@ -423,7 +423,7 @@ func (c *Client) sendFileDirectory(ctx context.Context, offer *offerMsg, r io.Re } shaSum := hex.EncodeToString(hasher.Sum(nil)) - if strings.ToLower(ack.SHA256) != shaSum { + if strings.EqualFold(ack.SHA256, shaSum) { sendErr(fmt.Errorf("receiver sha256 mismatch %s vs %s", ack.SHA256, shaSum)) return }