Skip to content

Commit 79ce553

Browse files
authored
signer/storage: fix a badly ordered error check (#21379)
1 parent 8e7bee9 commit 79ce553

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

‎cmd/clef/docs/setup.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ with minimal requirements.
9494
On the `client` qube, we need to create a listener which will receive the request from the Dapp, and proxy it.
9595

9696

97-
[qubes-client.py](qubes/client/qubes-client.py):
97+
[qubes-client.py](qubes/qubes-client.py):
9898

9999
```python
100100

‎cmd/faucet/faucet.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ <h1 style="text-align: center;"><i class="fa fa-bath" aria-hidden="true"></i> {{
4949
<div class="row">
5050
<div class="col-lg-8 col-lg-offset-2">
5151
<div class="input-group">
52-
<input id="url" name="url" type="text" class="form-control" placeholder="Social network URL containing your Ethereum address...">
52+
<input id="url" name="url" type="text" class="form-control" placeholder="Social network URL containing your Ethereum address..."/>
5353
<span class="input-group-btn">
5454
<button class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Give me Ether <i class="fa fa-caret-down" aria-hidden="true"></i></button>
5555
<ul class="dropdown-menu dropdown-menu-right">{{range $idx, $amount := .Amounts}}

‎signer/storage/aes_gcm_storage.go‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,11 +151,11 @@ func encrypt(key []byte, plaintext []byte, additionalData []byte) ([]byte, []byt
151151
return nil, nil, err
152152
}
153153
aesgcm, err := cipher.NewGCM(block)
154-
nonce := make([]byte, aesgcm.NonceSize())
155-
if _, err := io.ReadFull(rand.Reader, nonce); err != nil {
154+
if err != nil {
156155
return nil, nil, err
157156
}
158-
if err != nil {
157+
nonce := make([]byte, aesgcm.NonceSize())
158+
if _, err := io.ReadFull(rand.Reader, nonce); err != nil {
159159
return nil, nil, err
160160
}
161161
ciphertext := aesgcm.Seal(nil, nonce, plaintext, additionalData)

0 commit comments

Comments
 (0)