Skip to content

Commit 5b74bb6

Browse files
holimankaralabe
authored andcommitted
signer: remove ineffectual assignments (#18049)
* signer: remove ineffectual assignments * signer: remove ineffectual assignments
1 parent eea3ae4 commit 5b74bb6

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

‎signer/core/abihelper_test.go‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@ func verify(t *testing.T, jsondata, calldata string, exp []interface{}) {
3838
cd := common.Hex2Bytes(calldata)
3939
sigdata, argdata := cd[:4], cd[4:]
4040
method, err := abispec.MethodById(sigdata)
41-
4241
if err != nil {
4342
t.Fatal(err)
4443
}
45-
4644
data, err := method.Inputs.UnpackValues(argdata)
47-
45+
if err != nil {
46+
t.Fatal(err)
47+
}
4848
if len(data) != len(exp) {
4949
t.Fatalf("Mismatched length, expected %d, got %d", len(exp), len(data))
5050
}

‎signer/rules/rules_test.go‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ func TestListRequest(t *testing.T) {
151151
t.Errorf("Couldn't create evaluator %v", err)
152152
return
153153
}
154-
resp, err := r.ApproveListing(&core.ListRequest{
154+
resp, _ := r.ApproveListing(&core.ListRequest{
155155
Accounts: accs,
156156
Meta: core.Metadata{Remote: "remoteip", Local: "localip", Scheme: "inproc"},
157157
})
@@ -515,7 +515,7 @@ func TestLimitWindow(t *testing.T) {
515515
r.OnApprovedTx(response)
516516
}
517517
// Fourth should fail
518-
resp, err := r.ApproveTx(dummyTx(h))
518+
resp, _ := r.ApproveTx(dummyTx(h))
519519
if resp.Approved {
520520
t.Errorf("Expected check to resolve to 'Reject'")
521521
}
@@ -609,8 +609,8 @@ func TestContextIsCleared(t *testing.T) {
609609
t.Fatalf("Failed to load bootstrap js: %v", err)
610610
}
611611
tx := dummyTxWithV(0)
612-
r1, err := r.ApproveTx(tx)
613-
r2, err := r.ApproveTx(tx)
612+
r1, _ := r.ApproveTx(tx)
613+
r2, _ := r.ApproveTx(tx)
614614
if r1.Approved != r2.Approved {
615615
t.Errorf("Expected execution context to be cleared between executions")
616616
}

0 commit comments

Comments
 (0)