forked from cerc-io/plugeth
all: add whitespace linter (#25312)
* golangci: typo Signed-off-by: Delweng <delweng@gmail.com> * golangci: add whietspace Signed-off-by: Delweng <delweng@gmail.com> * *: rm whitesapce using golangci-lint Signed-off-by: Delweng <delweng@gmail.com> * cmd/puppeth: revert accidental resurrection Co-authored-by: Péter Szilágyi <peterke@gmail.com>
This commit is contained in:
co-authored by
Péter Szilágyi
parent
6c4e5d06e7
commit
b196ad1c16
@@ -67,7 +67,6 @@ func (r *rulesetUI) Init(javascriptRules string) error {
|
||||
return nil
|
||||
}
|
||||
func (r *rulesetUI) execute(jsfunc string, jsarg interface{}) (goja.Value, error) {
|
||||
|
||||
// Instantiate a fresh vm engine every time
|
||||
vm := goja.New()
|
||||
|
||||
|
||||
@@ -152,7 +152,6 @@ func TestListRequest(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestSignTxRequest(t *testing.T) {
|
||||
|
||||
js := `
|
||||
function ApproveTx(r){
|
||||
console.log("transaction.from", r.transaction.from);
|
||||
@@ -245,7 +244,6 @@ func (d *dummyUI) OnSignerStartup(info core.StartupInfo) {
|
||||
|
||||
//TestForwarding tests that the rule-engine correctly dispatches requests to the next caller
|
||||
func TestForwarding(t *testing.T) {
|
||||
|
||||
js := ""
|
||||
ui := &dummyUI{make([]string, 0)}
|
||||
jsBackend := storage.NewEphemeralStorage()
|
||||
@@ -268,11 +266,8 @@ func TestForwarding(t *testing.T) {
|
||||
|
||||
expCalls := 6
|
||||
if len(ui.calls) != expCalls {
|
||||
|
||||
t.Errorf("Expected %d forwarded calls, got %d: %s", expCalls, len(ui.calls), strings.Join(ui.calls, ","))
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func TestMissingFunc(t *testing.T) {
|
||||
@@ -296,10 +291,8 @@ func TestMissingFunc(t *testing.T) {
|
||||
t.Errorf("Expected missing method to cause non-approval")
|
||||
}
|
||||
t.Logf("Err %v", err)
|
||||
|
||||
}
|
||||
func TestStorage(t *testing.T) {
|
||||
|
||||
js := `
|
||||
function testStorage(){
|
||||
storage.put("mykey", "myvalue")
|
||||
@@ -348,7 +341,6 @@ func TestStorage(t *testing.T) {
|
||||
t.Errorf("Unexpected data, expected '%v', got '%v'", exp, retval)
|
||||
}
|
||||
t.Logf("Err %v", err)
|
||||
|
||||
}
|
||||
|
||||
const ExampleTxWindow = `
|
||||
@@ -548,7 +540,6 @@ func (d *dontCallMe) OnApprovedTx(tx ethapi.SignTransactionResult) {
|
||||
// if it does, that would be bad since developers may rely on that to store data,
|
||||
// instead of using the disk-based data storage
|
||||
func TestContextIsCleared(t *testing.T) {
|
||||
|
||||
js := `
|
||||
function ApproveTx(){
|
||||
if (typeof foobar == 'undefined') {
|
||||
@@ -580,7 +571,6 @@ func TestContextIsCleared(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestSignData(t *testing.T) {
|
||||
|
||||
js := `function ApproveListing(){
|
||||
return "Approve"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user