mirror of
https://github.com/arnaucube/hermez-node.git
synced 2026-02-07 03:16:45 +01:00
Merge pull request #219 from hermeznetwork/feature/api-account-creation
Impl account creation auth endpoints
This commit is contained in:
@@ -46,7 +46,13 @@ func (l2db *L2DB) DB() *sqlx.DB {
|
||||
|
||||
// AddAccountCreationAuth inserts an account creation authorization into the DB
|
||||
func (l2db *L2DB) AddAccountCreationAuth(auth *common.AccountCreationAuth) error {
|
||||
return meddler.Insert(l2db.db, "account_creation_auth", auth)
|
||||
// return meddler.Insert(l2db.db, "account_creation_auth", auth)
|
||||
_, err := l2db.db.Exec(
|
||||
`INSERT INTO account_creation_auth (eth_addr, bjj, signature)
|
||||
VALUES ($1, $2, $3);`,
|
||||
auth.EthAddr, auth.BJJ, auth.Signature,
|
||||
)
|
||||
return err
|
||||
}
|
||||
|
||||
// GetAccountCreationAuth returns an account creation authorization into the DB
|
||||
|
||||
Reference in New Issue
Block a user