diff --git a/src/coin/mocks/PersistibleSet.go b/src/coin/mocks/PersistibleSet.go deleted file mode 100644 index 87125a38..00000000 --- a/src/coin/mocks/PersistibleSet.go +++ /dev/null @@ -1,127 +0,0 @@ -// Code generated by mockery v1.0.0. DO NOT EDIT. - -package mocks - -import core "github.com/fibercrypto/fibercryptowallet/src/core" -import mock "github.com/stretchr/testify/mock" - -// PersistibleSet is an autogenerated mock type for the PersistibleSet type -type PersistibleSet struct { - mock.Mock -} - -// CreateWallet provides a mock function with given fields: name, seed, walletType, isEncryptrd, pwd, scanAddressesN -func (_m *PersistibleSet) CreateWallet(name string, seed string, walletType string, isEncryptrd bool, pwd core.PasswordReader, scanAddressesN int) (core.Wallet, error) { - ret := _m.Called(name, seed, walletType, isEncryptrd, pwd, scanAddressesN) - - var r0 core.Wallet - if rf, ok := ret.Get(0).(func(string, string, string, bool, core.PasswordReader, int) core.Wallet); ok { - r0 = rf(name, seed, walletType, isEncryptrd, pwd, scanAddressesN) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(core.Wallet) - } - } - - var r1 error - if rf, ok := ret.Get(1).(func(string, string, string, bool, core.PasswordReader, int) error); ok { - r1 = rf(name, seed, walletType, isEncryptrd, pwd, scanAddressesN) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// Decrypt provides a mock function with given fields: walletName, password -func (_m *PersistibleSet) Decrypt(walletName string, password core.PasswordReader) { - _m.Called(walletName, password) -} - -// DefaultWalletType provides a mock function with given fields: -func (_m *PersistibleSet) DefaultWalletType() string { - ret := _m.Called() - - var r0 string - if rf, ok := ret.Get(0).(func() string); ok { - r0 = rf() - } else { - r0 = ret.Get(0).(string) - } - - return r0 -} - -// Encrypt provides a mock function with given fields: walletName, password -func (_m *PersistibleSet) Encrypt(walletName string, password core.PasswordReader) { - _m.Called(walletName, password) -} - -// GetWallet provides a mock function with given fields: id -func (_m *PersistibleSet) GetWallet(id string) core.Wallet { - ret := _m.Called(id) - - var r0 core.Wallet - if rf, ok := ret.Get(0).(func(string) core.Wallet); ok { - r0 = rf(id) - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(core.Wallet) - } - } - - return r0 -} - -// IsEncrypted provides a mock function with given fields: walletName -func (_m *PersistibleSet) IsEncrypted(walletName string) (bool, error) { - ret := _m.Called(walletName) - - var r0 bool - if rf, ok := ret.Get(0).(func(string) bool); ok { - r0 = rf(walletName) - } else { - r0 = ret.Get(0).(bool) - } - - var r1 error - if rf, ok := ret.Get(1).(func(string) error); ok { - r1 = rf(walletName) - } else { - r1 = ret.Error(1) - } - - return r0, r1 -} - -// ListWallets provides a mock function with given fields: -func (_m *PersistibleSet) ListWallets() core.WalletIterator { - ret := _m.Called() - - var r0 core.WalletIterator - if rf, ok := ret.Get(0).(func() core.WalletIterator); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).(core.WalletIterator) - } - } - - return r0 -} - -// SupportedWalletTypes provides a mock function with given fields: -func (_m *PersistibleSet) SupportedWalletTypes() []string { - ret := _m.Called() - - var r0 []string - if rf, ok := ret.Get(0).(func() []string); ok { - r0 = rf() - } else { - if ret.Get(0) != nil { - r0 = ret.Get(0).([]string) - } - } - - return r0 -} diff --git a/src/coin/skycoin/models/wallet.go b/src/coin/skycoin/models/wallet.go index df8d106f..386c534d 100644 --- a/src/coin/skycoin/models/wallet.go +++ b/src/coin/skycoin/models/wallet.go @@ -825,11 +825,7 @@ func NewWalletDirectory(dirPath string) *WalletDirectory { type WalletDirectory struct { // Implements WallentEnv interface WalletDir string - wltService core.PersistibleSet -} - -func (wd *WalletDirectory) SetWltService(wltSrv core.PersistibleSet) { - wd.wltService = wltSrv + wltService *SkycoinLocalWallet } func lookupWallet(env core.WalletEnv, firstAddr string) (core.Wallet, error) { diff --git a/src/core/wallet.go b/src/core/wallet.go index 1f5a94d7..518dc0b5 100644 --- a/src/core/wallet.go +++ b/src/core/wallet.go @@ -24,11 +24,6 @@ type WalletSet interface { SupportedWalletTypes() []string } -type PersistibleSet interface { - WalletSet - WalletStorage -} - // WalletStorage provides access to the underlying wallets data store type WalletStorage interface { // Encrypt protects wallet data using cryptography diff --git a/src/models/walletsManager.go b/src/models/walletsManager.go index 83ca2e64..90d4e27c 100644 --- a/src/models/walletsManager.go +++ b/src/models/walletsManager.go @@ -799,7 +799,6 @@ func (walletM *WalletManager) sendTo(wltId, destinationAddress, amount string) * } logWalletManager.Info("Transaction created") return qTxn - } func (walletM *WalletManager) signTxn(wltIds, address []string, source string, tmpPwd interface{}, index []int, qTxn *QTransaction) *QTransaction {