From 2185d9d87d7c311c231e670bd35163696e018f1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=BDiga=20Kokelj?= Date: Mon, 27 Nov 2023 10:05:52 +0100 Subject: [PATCH] additional renames --- integration/obscurogateway/gateway_user.go | 8 ++++---- integration/obscurogateway/tengateway_test.go | 18 +++++++++--------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/integration/obscurogateway/gateway_user.go b/integration/obscurogateway/gateway_user.go index f5e1096884..4820b32e97 100644 --- a/integration/obscurogateway/gateway_user.go +++ b/integration/obscurogateway/gateway_user.go @@ -16,7 +16,7 @@ type GatewayUser struct { Wallets []wallet.Wallet HTTPClient *ethclient.Client WSClient *ethclient.Client - ogClient *lib.TGLib + tgClient *lib.TGLib } func NewUser(wallets []wallet.Wallet, serverAddressHTTP string, serverAddressWS string) (*GatewayUser, error) { @@ -42,17 +42,17 @@ func NewUser(wallets []wallet.Wallet, serverAddressHTTP string, serverAddressWS Wallets: wallets, HTTPClient: httpClient, WSClient: wsClient, - ogClient: ogClient, + tgClient: ogClient, }, nil } func (u GatewayUser) RegisterAccounts() error { for _, w := range u.Wallets { - err := u.ogClient.RegisterAccount(w.PrivateKey(), w.Address()) + err := u.tgClient.RegisterAccount(w.PrivateKey(), w.Address()) if err != nil { return err } - fmt.Printf("Successfully registered address %s for user: %s.\n", w.Address().Hex(), u.ogClient.UserID()) + fmt.Printf("Successfully registered address %s for user: %s.\n", w.Address().Hex(), u.tgClient.UserID()) } return nil diff --git a/integration/obscurogateway/tengateway_test.go b/integration/obscurogateway/tengateway_test.go index 5e7b4e112e..95c6a88ad0 100644 --- a/integration/obscurogateway/tengateway_test.go +++ b/integration/obscurogateway/tengateway_test.go @@ -110,15 +110,15 @@ func TestTenGateway(t *testing.T) { func testMultipleAccountsSubscription(t *testing.T, httpURL, wsURL string, w wallet.Wallet) { user0, err := NewUser([]wallet.Wallet{w}, httpURL, wsURL) require.NoError(t, err) - fmt.Printf("Created user with UserID: %s\n", user0.ogClient.UserID()) + fmt.Printf("Created user with encryption token: %s\n", user0.tgClient.UserID()) user1, err := NewUser([]wallet.Wallet{datagenerator.RandomWallet(integration.TenChainID), datagenerator.RandomWallet(integration.TenChainID)}, httpURL, wsURL) require.NoError(t, err) - fmt.Printf("Created user with UserID: %s\n", user0.ogClient.UserID()) + fmt.Printf("Created user with encryption token: %s\n", user0.tgClient.UserID()) user2, err := NewUser([]wallet.Wallet{datagenerator.RandomWallet(integration.TenChainID), datagenerator.RandomWallet(integration.TenChainID)}, httpURL, wsURL) require.NoError(t, err) - fmt.Printf("Created user with UserID: %s\n", user0.ogClient.UserID()) + fmt.Printf("Created user with encryption token: %s\n", user0.tgClient.UserID()) // register all the accounts for that user err = user0.RegisterAccounts() @@ -243,7 +243,7 @@ func testMultipleAccountsSubscription(t *testing.T, httpURL, wsURL string, w wal } func testAreTxsMinted(t *testing.T, httpURL, wsURL string, w wallet.Wallet) { //nolint: unused - // set up the ogClient + // set up the tgClient ogClient := lib.NewTenGatewayLibrary(httpURL, wsURL) // join + register against the og @@ -270,7 +270,7 @@ func testAreTxsMinted(t *testing.T, httpURL, wsURL string, w wallet.Wallet) { // } func testErrorHandling(t *testing.T, httpURL, wsURL string, w wallet.Wallet) { - // set up the ogClient + // set up the tgClient ogClient := lib.NewTenGatewayLibrary(httpURL, wsURL) // join + register against the og @@ -312,7 +312,7 @@ func testErrorHandling(t *testing.T, httpURL, wsURL string, w wallet.Wallet) { } func testErrorsRevertedArePassed(t *testing.T, httpURL, wsURL string, w wallet.Wallet) { - // set up the ogClient + // set up the tgClient ogClient := lib.NewTenGatewayLibrary(httpURL, wsURL) // join + register against the og @@ -390,7 +390,7 @@ func testUnsubscribe(t *testing.T, httpURL, wsURL string, w wallet.Wallet) { // create a user with multiple accounts user, err := NewUser([]wallet.Wallet{w, datagenerator.RandomWallet(integration.TenChainID)}, httpURL, wsURL) require.NoError(t, err) - fmt.Printf("Created user with UserID: %s\n", user.ogClient.UserID()) + fmt.Printf("Created user with encryption token: %s\n", user.tgClient.UserID()) // register all the accounts for the user err = user.RegisterAccounts() @@ -440,7 +440,7 @@ func testClosingConnectionWhileSubscribed(t *testing.T, httpURL, wsURL string, w // create a user with multiple accounts user, err := NewUser([]wallet.Wallet{w, datagenerator.RandomWallet(integration.TenChainID)}, httpURL, wsURL) require.NoError(t, err) - fmt.Printf("Created user with UserID: %s\n", user.ogClient.UserID()) + fmt.Printf("Created user with encryption token: %s\n", user.tgClient.UserID()) // register all the accounts for the user err = user.RegisterAccounts() @@ -479,7 +479,7 @@ func testClosingConnectionWhileSubscribed(t *testing.T, httpURL, wsURL string, w assert.Equal(t, 0, len(userLogs)) // re-establish connection - wsClient, err := ethclient.Dial(wsURL + "/v1/" + "?token=" + user.ogClient.UserID()) + wsClient, err := ethclient.Dial(wsURL + "/v1/" + "?token=" + user.tgClient.UserID()) require.NoError(t, err) user.WSClient = wsClient