Move type conversion to presenter

This commit is contained in:
Matt Krump
2017-11-29 09:32:34 -06:00
parent b26bcf74e9
commit b2dfe1e486
7 changed files with 25 additions and 40 deletions
+4 -4
View File
@@ -1,8 +1,9 @@
package fakes
import (
"github.com/8thlight/vulcanizedb/pkg/core"
"sort"
"github.com/8thlight/vulcanizedb/pkg/core"
)
type Blockchain struct {
@@ -24,9 +25,8 @@ func (blockchain *Blockchain) GetContractAttributes(contractHash string) (core.C
return contractAttributes, nil
}
func (blockchain *Blockchain) GetContractStateAttribute(contractHash string, attributeName string) (*string, error) {
result := new(string)
*result = blockchain.contractAttributes[contractHash][attributeName]
func (blockchain *Blockchain) GetContractStateAttribute(contractHash string, attributeName string) (interface{}, error) {
result := blockchain.contractAttributes[contractHash][attributeName]
return result, nil
}