fix(*): use category instead of type
This commit is contained in:
parent
ff7e0b0206
commit
3b844ee7c7
2
go.mod
2
go.mod
|
@ -21,7 +21,7 @@ require (
|
|||
github.com/magiconair/properties v1.8.1
|
||||
github.com/meshplus/bitxhub-core v0.1.0-rc1.0.20200903124405-b2c62dd8db89
|
||||
github.com/meshplus/bitxhub-kit v1.0.1-0.20200914065214-5161497a783c
|
||||
github.com/meshplus/bitxhub-model v1.0.0-rc4.0.20200927025558-ef1daaa6a629
|
||||
github.com/meshplus/bitxhub-model v1.0.0-rc4.0.20201009112846-79d2e6ddf10d
|
||||
github.com/meshplus/go-lightp2p v0.0.0-20200817105923-6b3aee40fa54
|
||||
github.com/mitchellh/go-homedir v1.1.0
|
||||
github.com/multiformats/go-multiaddr v0.2.2
|
||||
|
|
2
go.sum
2
go.sum
|
@ -557,6 +557,8 @@ github.com/meshplus/bitxhub-model v1.0.0-rc3/go.mod h1:ZCctQIYTlE3vJ8Lhkrgs9bWwN
|
|||
github.com/meshplus/bitxhub-model v1.0.0-rc4.0.20200514093243-7e8ae60d1c19/go.mod h1:QK8aACbxtZEA3Hk1BOCirW0uxMWLsMrLDpWz9FweIKM=
|
||||
github.com/meshplus/bitxhub-model v1.0.0-rc4.0.20200927025558-ef1daaa6a629 h1:pIzGxvl8l0HtJGIoF0ZUvXB2zXEVqcPA4XcISGSSB+o=
|
||||
github.com/meshplus/bitxhub-model v1.0.0-rc4.0.20200927025558-ef1daaa6a629/go.mod h1:QK8aACbxtZEA3Hk1BOCirW0uxMWLsMrLDpWz9FweIKM=
|
||||
github.com/meshplus/bitxhub-model v1.0.0-rc4.0.20201009112846-79d2e6ddf10d h1:q4Vig+IVhBvARLyeOsFw8gAdor0ajiBl6lGch1N65sk=
|
||||
github.com/meshplus/bitxhub-model v1.0.0-rc4.0.20201009112846-79d2e6ddf10d/go.mod h1:QK8aACbxtZEA3Hk1BOCirW0uxMWLsMrLDpWz9FweIKM=
|
||||
github.com/meshplus/go-bitxhub-client v1.0.0-rc3/go.mod h1:FpiCyf6KhydcqthrHdvvPhbPIcD92b+Ju8T7WvQtSyM=
|
||||
github.com/meshplus/go-lightp2p v0.0.0-20200817105923-6b3aee40fa54 h1:5Ip5AB7SxxQHg5SRtf2cCOI2wy1p75MQB12soPtPyf8=
|
||||
github.com/meshplus/go-lightp2p v0.0.0-20200817105923-6b3aee40fa54/go.mod h1:G89UJaeqCQFxFdp8wzy1AdKfMtDEhpySau0pjDNeeaw=
|
||||
|
|
|
@ -144,7 +144,7 @@ func getAccount(tx *pb.Transaction) (string, error) {
|
|||
if err := ibtp.Unmarshal(payload.Args[0].Value); err != nil {
|
||||
return "", fmt.Errorf("unmarshal ibtp from tx :%w", err)
|
||||
}
|
||||
account := fmt.Sprintf("%s-%s-%d", ibtp.From, ibtp.To, ibtp.Type)
|
||||
account := fmt.Sprintf("%s-%s-%d", ibtp.From, ibtp.To, ibtp.Category())
|
||||
return account, nil
|
||||
}
|
||||
return tx.From.Hex(), nil
|
||||
|
|
Loading…
Reference in New Issue