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)

View File

@@ -85,9 +85,6 @@ CREATE FUNCTION hez_idx(BIGINT, VARCHAR)
AS
$BODY$
BEGIN
IF $1 = 1 THEN
RETURN 'hez:EXIT:1';
END IF;
RETURN 'hez:' || $2 || ':' || $1;
END;
$BODY$