From: Chengcheng Zhang <943420582@qq.com> Date: Tue, 2 Jul 2019 14:10:20 +0000 (+0800) Subject: remove GetAccount X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=b4ce72a65610234c9776864c2c814bf1b824a3ed;p=bytom%2Fvapor.git remove GetAccount --- diff --git a/database/wallet_store.go b/database/wallet_store.go index eb4ee671..6efd0a2d 100644 --- a/database/wallet_store.go +++ b/database/wallet_store.go @@ -281,19 +281,6 @@ func (store *WalletStore) DeleteWalletUTXOs() { } } -// GetAccount get account value by account ID -func (store *WalletStore) GetAccount(accountID string) (*acc.Account, error) { - rawAccount := store.walletDB.Get(AccountIDKey(accountID)) - if rawAccount == nil { - return nil, fmt.Errorf("failed get account, accountID: %s ", accountID) - } - account := new(acc.Account) - if err := json.Unmarshal(rawAccount, account); err != nil { - return nil, err - } - return account, nil -} - // GetAsset get asset by assetID func (store *WalletStore) GetAsset(assetID *bc.AssetID) (*asset.Asset, error) { definitionByte := store.walletDB.Get(asset.ExtAssetKey(assetID)) diff --git a/wallet/store.go b/wallet/store.go index 0349b806..7d9b05bc 100644 --- a/wallet/store.go +++ b/wallet/store.go @@ -18,7 +18,6 @@ type WalletStore interface { DeleteUnconfirmedTransaction(string) DeleteWalletTransactions() DeleteWalletUTXOs() - GetAccount(string) (*acc.Account, error) GetAsset(*bc.AssetID) (*asset.Asset, error) GetControlProgram(bc.Hash) (*acc.CtrlProgram, error) GetGlobalTransactionIndex(string) []byte