From a50ddbe4e0d5103b3c57fa830e309caeb8d78d1c Mon Sep 17 00:00:00 2001 From: Arnau B Date: Wed, 9 Dec 2020 14:04:15 +0100 Subject: [PATCH] Fix hez addr format for exits --- api/parsers.go | 5 ----- db/migrations/0001.sql | 3 --- 2 files changed, 8 deletions(-) diff --git a/api/parsers.go b/api/parsers.go index 9bf4fac..20e9536 100644 --- a/api/parsers.go +++ b/api/parsers.go @@ -14,8 +14,6 @@ import ( "github.com/iden3/go-iden3-crypto/babyjub" ) -const exitIdx = "hez:EXIT:1" - // Query parsers type querier interface { @@ -453,8 +451,5 @@ func ethAddrToHez(addr ethCommon.Address) string { } func idxToHez(idx common.Idx, tokenSymbol string) string { - if idx == 1 { - return exitIdx - } return "hez:" + tokenSymbol + ":" + strconv.Itoa(int(idx)) } diff --git a/db/migrations/0001.sql b/db/migrations/0001.sql index 20fd9f0..73434af 100644 --- a/db/migrations/0001.sql +++ b/db/migrations/0001.sql @@ -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$