mirror of
https://github.com/arnaucube/hermez-node.git
synced 2026-02-07 11:26:44 +01:00
Fix hez addr format for exits
This commit is contained in:
@@ -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))
|
||||
}
|
||||
|
||||
@@ -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$
|
||||
|
||||
Reference in New Issue
Block a user