Skip to content

Commit

Permalink
update go mod
Browse files Browse the repository at this point in the history
  • Loading branch information
zhiquan911 committed Apr 15, 2019
1 parent 4c2682f commit 2646256
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down
2 changes: 1 addition & 1 deletion tron/addr_decoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
2 changes: 1 addition & 1 deletion tron/manager_txRef.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 2646256

Please sign in to comment.