OSDN Git Service

add account_store.go
[bytom/vapor.git] / wallet / annotated.go
index 9b5e9fc..dbb0350 100644 (file)
@@ -81,7 +81,7 @@ func (w *Wallet) getAliasDefinition(assetID bc.AssetID) (string, json.RawMessage
 }
 
 // annotateTxs adds account data to transactions
-func annotateTxsAccount(txs []*query.AnnotatedTx, store Store) {
+func annotateTxsAccount(txs []*query.AnnotatedTx, store WalletStorer) {
        for i, tx := range txs {
                for j, input := range tx.Inputs {
                        //issue asset tx input SpentOutputID is nil
@@ -106,7 +106,7 @@ func annotateTxsAccount(txs []*query.AnnotatedTx, store Store) {
        }
 }
 
-func getAccountFromACP(program []byte, store Store) (*account.Account, error) {
+func getAccountFromACP(program []byte, store WalletStorer) (*account.Account, error) {
        var hash common.Hash
        accountCP := account.CtrlProgram{}
        localAccount := account.Account{}
@@ -121,7 +121,7 @@ func getAccountFromACP(program []byte, store Store) (*account.Account, error) {
                return nil, err
        }
 
-       accountValue := store.GetAccount(accountCP.AccountID)
+       accountValue := store.GetAccountByAccountID(accountCP.AccountID)
        if accountValue == nil {
                return nil, fmt.Errorf("failed get account:%s ", accountCP.AccountID)
        }