Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
2a8dc033
Unverified
Commit
2a8dc033
authored
Sep 29, 2023
by
Ethen Pociask
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[indexer.client] Addressed PR feedback
parent
1d72344f
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
45 additions
and
52 deletions
+45
-52
extensions.json
.vscode/extensions.json
+10
-10
settings.json
.vscode/settings.json
+26
-26
deposits.go
indexer/api/routes/deposits.go
+3
-7
validator_test.go
indexer/api/routes/validator_test.go
+2
-2
withdrawals.go
indexer/api/routes/withdrawals.go
+3
-6
bridge_transfers_e2e_test.go
indexer/e2e_tests/bridge_transfers_e2e_test.go
+1
-1
No files found.
.vscode/extensions.json
View file @
2a8dc033
...
...
@@ -9,4 +9,4 @@
"juanblanco.solidity"
,
"golang.go"
,
],
}
\ No newline at end of file
}
\ No newline at end of file
.vscode/settings.json
View file @
2a8dc033
...
...
@@ -25,4 +25,4 @@
"eslint.format.enable"
:
true
,
"editorconfig.generateAuto"
:
false
,
"files.trimTrailingWhitespace"
:
true
}
\ No newline at end of file
}
\ No newline at end of file
indexer/api/routes/deposits.go
View file @
2a8dc033
...
...
@@ -52,24 +52,20 @@ func (h Routes) L1DepositsHandler(w http.ResponseWriter, r *http.Request) {
err
=
h
.
v
.
ValidateCursor
(
cursor
)
if
err
!=
nil
{
http
.
Error
(
w
,
err
.
Error
(),
http
.
StatusBadRequest
)
h
.
logger
.
Error
(
"Invalid cursor param"
,
"param"
,
cursor
)
h
.
logger
.
Error
(
err
.
Error
())
return
h
.
logger
.
Error
(
"Invalid cursor param"
,
"param"
,
cursor
,
"err"
,
err
.
Error
())
}
limit
,
err
:=
h
.
v
.
ParseValidateLimit
(
limitQuery
)
if
err
!=
nil
{
http
.
Error
(
w
,
err
.
Error
(),
http
.
StatusBadRequest
)
h
.
logger
.
Error
(
"Invalid limit param"
,
"param"
,
limitQuery
)
h
.
logger
.
Error
(
err
.
Error
())
h
.
logger
.
Error
(
"Invalid limit param"
,
"param"
,
limitQuery
,
"err"
,
err
.
Error
())
return
}
deposits
,
err
:=
h
.
view
.
L1BridgeDepositsByAddress
(
address
,
cursor
,
limit
)
if
err
!=
nil
{
http
.
Error
(
w
,
"Internal server error reading deposits"
,
http
.
StatusInternalServerError
)
h
.
logger
.
Error
(
"Unable to read deposits from DB"
)
h
.
logger
.
Error
(
err
.
Error
())
h
.
logger
.
Error
(
"Unable to read deposits from DB"
,
"err"
,
err
.
Error
())
return
}
...
...
indexer/api/routes/validator_test.go
View file @
2a8dc033
...
...
@@ -6,7 +6,7 @@ import (
"github.com/stretchr/testify/require"
)
func
Test
_
ParseValidateLimit
(
t
*
testing
.
T
)
{
func
TestParseValidateLimit
(
t
*
testing
.
T
)
{
v
:=
Validator
{}
// (1) Happy case
...
...
@@ -25,7 +25,7 @@ func Test_ParseValidateLimit(t *testing.T) {
require
.
Error
(
t
,
err
,
"limit must be an integer value"
)
}
func
Test
_
ParseValidateAddress
(
t
*
testing
.
T
)
{
func
TestParseValidateAddress
(
t
*
testing
.
T
)
{
v
:=
Validator
{}
// (1) Happy case
...
...
indexer/api/routes/withdrawals.go
View file @
2a8dc033
...
...
@@ -44,24 +44,21 @@ func (h Routes) L2WithdrawalsHandler(w http.ResponseWriter, r *http.Request) {
address
,
err
:=
h
.
v
.
ParseValidateAddress
(
addressValue
)
if
err
!=
nil
{
http
.
Error
(
w
,
err
.
Error
(),
http
.
StatusBadRequest
)
h
.
logger
.
Error
(
"Invalid address param"
,
"param"
,
addressValue
)
h
.
logger
.
Error
(
err
.
Error
())
h
.
logger
.
Error
(
"Invalid address param"
,
"param"
,
addressValue
,
"err"
,
err
)
return
}
err
=
h
.
v
.
ValidateCursor
(
cursor
)
if
err
!=
nil
{
http
.
Error
(
w
,
err
.
Error
(),
http
.
StatusBadRequest
)
h
.
logger
.
Error
(
"Invalid cursor param"
,
"param"
,
cursor
)
h
.
logger
.
Error
(
err
.
Error
())
h
.
logger
.
Error
(
"Invalid cursor param"
,
"param"
,
cursor
,
"err"
,
err
)
return
}
limit
,
err
:=
h
.
v
.
ParseValidateLimit
(
limitQuery
)
if
err
!=
nil
{
http
.
Error
(
w
,
err
.
Error
(),
http
.
StatusBadRequest
)
h
.
logger
.
Error
(
"Invalid query params"
)
h
.
logger
.
Error
(
err
.
Error
())
h
.
logger
.
Error
(
"Invalid query params"
,
"err"
,
err
)
return
}
...
...
indexer/e2e_tests/bridge_transfers_e2e_test.go
View file @
2a8dc033
...
...
@@ -447,7 +447,7 @@ func TestE2EBridgeTransfersCursoredWithdrawals(t *testing.T) {
}
}
func
Test
_
ClientGetWithdrawals
(
t
*
testing
.
T
)
{
func
TestClientGetWithdrawals
(
t
*
testing
.
T
)
{
testSuite
:=
createE2ETestSuite
(
t
)
// (1) Generate contract bindings for the L1 and L2 standard bridges
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment