Merge pull request #336 from hermeznetwork/fix/api1

Fix/api1
This commit is contained in:
laisolizq
2020-12-09 16:08:01 +01:00
committed by GitHub
13 changed files with 69 additions and 81 deletions

View File

@@ -170,7 +170,7 @@ func assertTx(t *testing.T, expected, actual *common.PoolL2Tx) {
token := tokens[expected.TokenID]
// If the token has value in USD setted
if token.USDUpdate != nil {
assert.Equal(t, token.USDUpdate.Unix(), actual.AbsoluteFeeUpdate.Unix())
assert.Less(t, token.USDUpdate.Unix()-3, actual.AbsoluteFeeUpdate.Unix())
expected.AbsoluteFeeUpdate = actual.AbsoluteFeeUpdate
// Set expected fee
f := new(big.Float).SetInt(expected.Amount)