Browse Source

Fix hez addr format for exits

feature/sql-semaphore1
Arnau B 4 years ago
parent
commit
a50ddbe4e0
2 changed files with 0 additions and 8 deletions
  1. +0
    -5
      api/parsers.go
  2. +0
    -3
      db/migrations/0001.sql

+ 0
- 5
api/parsers.go

@ -14,8 +14,6 @@ import (
"github.com/iden3/go-iden3-crypto/babyjub" "github.com/iden3/go-iden3-crypto/babyjub"
) )
const exitIdx = "hez:EXIT:1"
// Query parsers // Query parsers
type querier interface { type querier interface {
@ -453,8 +451,5 @@ func ethAddrToHez(addr ethCommon.Address) string {
} }
func idxToHez(idx common.Idx, tokenSymbol string) string { func idxToHez(idx common.Idx, tokenSymbol string) string {
if idx == 1 {
return exitIdx
}
return "hez:" + tokenSymbol + ":" + strconv.Itoa(int(idx)) return "hez:" + tokenSymbol + ":" + strconv.Itoa(int(idx))
} }

+ 0
- 3
db/migrations/0001.sql

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

Loading…
Cancel
Save