Skip to content

Commit

Permalink
fixing test
Browse files Browse the repository at this point in the history
  • Loading branch information
otherview committed Oct 13, 2023
1 parent 723f147 commit 6fc2c4d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
7 changes: 3 additions & 4 deletions tools/walletextension/test/wallet_extension_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import (
"github.com/obscuronet/go-obscuro/go/common"
"github.com/obscuronet/go-obscuro/go/rpc"
"github.com/obscuronet/go-obscuro/integration"
"github.com/obscuronet/go-obscuro/tools/walletextension"
"github.com/obscuronet/go-obscuro/tools/walletextension/accountmanager"
"github.com/stretchr/testify/assert"

Expand Down Expand Up @@ -150,9 +149,9 @@ func canInvokeSensitiveMethodsAfterSubmittingMultipleViewingKeys(t *testing.T, t

func cannotSubscribeOverHTTP(t *testing.T, testHelper *testHelper) {
respBody := makeHTTPEthJSONReq(testHelper.walletHTTPPort, rpc.Subscribe, []interface{}{rpc.SubscriptionTypeLogs})
fmt.Println(respBody)
if string(respBody) != walletextension.ErrSubscribeFailHTTP+"\n" {
t.Fatalf("expected response of '%s', got '%s'", walletextension.ErrSubscribeFailHTTP, string(respBody))

if string(respBody) != "received an eth_subscribe request but the connection does not support subscriptions" {
t.Fatalf("unexpected response %s", string(respBody))
}
}

Expand Down
2 changes: 0 additions & 2 deletions tools/walletextension/wallet_extension.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ import (
gethlog "github.com/ethereum/go-ethereum/log"
)

var ErrSubscribeFailHTTP = fmt.Sprintf("received an %s request but the connection does not support subscriptions", rpc.Subscribe)

// WalletExtension handles the management of viewing keys and the forwarding of Ethereum JSON-RPC requests.
type WalletExtension struct {
hostAddr string // The address on which the Obscuro host can be reached.
Expand Down

0 comments on commit 6fc2c4d

Please sign in to comment.