-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2552d72
commit 0c5ecca
Showing
2 changed files
with
6 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,7 +31,6 @@ type StakeWiseTestManager struct { | |
// The ID of the baseline snapshot | ||
baselineSnapshotID string | ||
|
||
mainNode *StakeWiseNode | ||
mainNodeAddress common.Address | ||
nsEmail string | ||
} | ||
|
@@ -117,13 +116,13 @@ func NewStakeWiseTestManager() (*StakeWiseTestManager, error) { | |
|
||
// Initialize test manager by generating a new wallet, starting the StakeWise node, and registering with NodeSet | ||
func (m *StakeWiseTestManager) SetupTest() error { | ||
m.mainNode = m.GetNode() | ||
mainNode := m.GetNode() | ||
m.nsEmail = "[email protected]" | ||
// Generate a new wallet | ||
derivationPath := string(wallet.DerivationPath_Default) | ||
index := uint64(0) | ||
password := "test_password123" | ||
hdNode := m.mainNode.GetHyperdriveNode() | ||
hdNode := mainNode.GetHyperdriveNode() | ||
hd := hdNode.GetApiClient() | ||
recoverResponse, err := hd.Wallet.Recover(&derivationPath, keys.DefaultMnemonic, &index, password, true) | ||
if err != nil { | ||
|
@@ -132,7 +131,7 @@ func (m *StakeWiseTestManager) SetupTest() error { | |
m.mainNodeAddress = recoverResponse.Data.AccountAddress | ||
|
||
// Set up NodeSet with the StakeWise vault | ||
sp := m.mainNode.GetServiceProvider() | ||
sp := mainNode.GetServiceProvider() | ||
res := sp.GetResources() | ||
nsMgr := m.GetNodeSetMockServer().GetManager() | ||
nsDB := nsMgr.GetDatabase() | ||
|
@@ -147,7 +146,7 @@ func (m *StakeWiseTestManager) SetupTest() error { | |
} | ||
|
||
// Register the primary | ||
err = m.registerWithNodeset(m.mainNode, m.mainNodeAddress) | ||
err = m.registerWithNodeset(mainNode, m.mainNodeAddress) | ||
if err != nil { | ||
return fmt.Errorf("error registering with nodeset: %v", err) | ||
} | ||
|
@@ -158,10 +157,6 @@ func (m *StakeWiseTestManager) SetupTest() error { | |
// === Getters === | ||
// =============== | ||
|
||
func (m *StakeWiseTestManager) GetMainNode() *StakeWiseNode { | ||
return m.mainNode | ||
} | ||
|
||
func (m *StakeWiseTestManager) GetModuleName() string { | ||
return "hyperdrive-stakewise" | ||
} | ||
|