diff --git a/go.mod b/go.mod index 1589f0d..1dc6493 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.12 require ( github.com/asdine/storm v2.1.2+incompatible github.com/astaxie/beego v1.11.1 - github.com/blocktree/go-owcdrivers v1.0.0 + github.com/blocktree/go-owcdrivers v1.0.2 github.com/blocktree/go-owcrypt v1.0.0 github.com/blocktree/openwallet v1.2.1 github.com/bndr/gotabulate v1.1.2 diff --git a/go.sum b/go.sum index 2ea455f..b68bbcd 100644 --- a/go.sum +++ b/go.sum @@ -18,6 +18,8 @@ github.com/beego/x2j v0.0.0-20131220205130-a0352aadc542/go.mod h1:kSeGC/p1AbBiEp github.com/belogik/goes v0.0.0-20151229125003-e54d722c3aff/go.mod h1:PhH1ZhyCzHKt4uAasyx+ljRCgoezetRNf59CUtwUkqY= github.com/blocktree/go-owcdrivers v1.0.0 h1:dMxbi+In7On3fq/2cfaO+IdKY35l++4cPFe6jcdJanM= github.com/blocktree/go-owcdrivers v1.0.0/go.mod h1:AzbIxzzRcSszV/XwOiu83QqKuGTuWyCdCrVfGNt2bk8= +github.com/blocktree/go-owcdrivers v1.0.2 h1:rFUL4wexwn1nT++SCCXPFOjV2WfBJGHyclS8UW/sElk= +github.com/blocktree/go-owcdrivers v1.0.2/go.mod h1:AzbIxzzRcSszV/XwOiu83QqKuGTuWyCdCrVfGNt2bk8= github.com/blocktree/go-owcrypt v1.0.0 h1:u3B59ZjmZ6vB8NrIicUvKKiiDY2oeJCInWsEq1swwSY= github.com/blocktree/go-owcrypt v1.0.0/go.mod h1:5FCinL/4XVEqbmAFTOUgfMJVNJEw6WzVy624qsxzZC8= github.com/blocktree/openwallet v1.2.1 h1:t+AsfEZvBGxkhUYZWcOsuAoeFdNxSMJ9I1VOPqplPGM= diff --git a/tron/addr_decoder.go b/tron/addr_decoder.go index 1442551..98d85c7 100644 --- a/tron/addr_decoder.go +++ b/tron/addr_decoder.go @@ -72,7 +72,7 @@ func DecodeAddress(addr string, isTestnet bool) (string, []byte, error) { if err != nil { return "", nil, err } - toAddressBytes = append(codeType.Prefix(), toAddressBytes...) + toAddressBytes = append(codeType.Prefix, toAddressBytes...) return hex.EncodeToString(toAddressBytes), toAddressBytes, nil } diff --git a/tron/manager_txRef.go b/tron/manager_txRef.go index 43bf7da..786d64e 100644 --- a/tron/manager_txRef.go +++ b/tron/manager_txRef.go @@ -390,7 +390,7 @@ func (wm *WalletManager) validSignedTokenTransaction(txHash []byte, signature [] return fmt.Errorf("verify SignedTransactionRef failed:verify signature failed") } pkHash := owcrypt.Hash(pkBytes, 0, owcrypt.HASH_ALG_KECCAK256)[12:32] - pkgenAddress := append(codeType.Prefix(), pkHash...) + pkgenAddress := append(codeType.Prefix, pkHash...) pkgenAddressHex := hex.EncodeToString(pkgenAddress) if pkgenAddressHex != ownerAddressHex { return fmt.Errorf("verify SignedTransactionRef failed: signed address is not the owner address")