forked from cerc-io/ipld-eth-server
Added sort method to ContractAttributes array
This commit is contained in:
@@ -13,7 +13,7 @@ type ContractSummary struct {
|
||||
NumberOfTransactions int
|
||||
LastTransaction *core.Transaction
|
||||
blockChain core.Blockchain
|
||||
Attributes []core.ContractAttribute
|
||||
Attributes core.ContractAttributes
|
||||
}
|
||||
|
||||
var NewContractNotWatchedErr = func(contractHash string) error {
|
||||
|
||||
@@ -106,9 +106,9 @@ var _ bool = Describe("The watched contract summary", func() {
|
||||
contractSummary, _ := watched_contracts.NewSummary(blockchain, repository, "0x123")
|
||||
|
||||
Expect(contractSummary.Attributes).To(Equal(
|
||||
[]core.ContractAttribute{
|
||||
{Name: "foo", Type: "string"},
|
||||
core.ContractAttributes{
|
||||
{Name: "baz", Type: "string"},
|
||||
{Name: "foo", Type: "string"},
|
||||
},
|
||||
))
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user