Skip to content

Commit

Permalink
Follow up ethereum#732
Browse files Browse the repository at this point in the history
  • Loading branch information
thanhnguyennguyen committed Sep 26, 2019
1 parent 43a4c51 commit a3e5206
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tomox/mongodb.go
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,7 @@ func (db *MongoDatabase) CommitOrder(cacheKey string, o *OrderItem) error {
o.Key = cacheKey
}

//query := bson.M{"key": cacheKey}
query := bson.M{"hash": o.Hash}
query := bson.M{"hash": o.Hash.Hex()}

_, err := sc.DB(db.dbName).C("orders").Upsert(query, o)

Expand All @@ -260,7 +259,7 @@ func (db *MongoDatabase) CommitTrade(t *Trade) error {
t.CreatedAt = time.Now()
t.UpdatedAt = time.Now()

query := bson.M{"hash": t.Hash}
query := bson.M{"hash": t.Hash.Hex()}

_, err := sc.DB(db.dbName).C("trades").Upsert(query, t)

Expand Down

0 comments on commit a3e5206

Please sign in to comment.