-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CT-808] Add pagination for pnl endpoint #1529
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -23,7 +23,7 @@ case $env in | |||||||||||||||||||||||||||||||||||||||||||||
"dev4") account=525975847385;; | ||||||||||||||||||||||||||||||||||||||||||||||
"dev5") account=917958511744;; | ||||||||||||||||||||||||||||||||||||||||||||||
"staging") account=677285201534;; | ||||||||||||||||||||||||||||||||||||||||||||||
"public-testnet") account=013339450148;; # public testnet | ||||||||||||||||||||||||||||||||||||||||||||||
"testnet") account=013339450148;; # public testnet | ||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add error handling for - cd services/$service
+ cd services/$service || exit Committable suggestion
Suggested change
Double quote to prevent globbing and word splitting. - cd services/$service
+ cd "services/$service" Committable suggestion
Suggested change
Use a subshell to avoid having to - cd services/$service
- pnpm build
- cd -
+ (cd "services/$service" && pnpm build) Committable suggestion
Suggested change
Double quote to prevent globbing and word splitting. - AWS_PROFILE=dydx-v4-$env aws ecr get-login-password --region ap-northeast-1 | docker login --username AWS --password-stdin $account.dkr.ecr.ap-northeast-1.amazonaws.com
+ AWS_PROFILE="dydx-v4-$env" aws ecr get-login-password --region ap-northeast-1 | docker login --username AWS --password-stdin "$account.dkr.ecr.ap-northeast-1.amazonaws.com" Committable suggestion
Suggested change
Double quote to prevent globbing and word splitting. - DOCKER_BUILDKIT=1 docker build \
- --platform linux/amd64 \
- -t $account.dkr.ecr.ap-northeast-1.amazonaws.com/$env-indexer-$service:$tag \
- -f $dockerfile \
- --build-arg service=$service \
- --build-arg NPM_TOKEN=$NPM_TOKEN .
+ DOCKER_BUILDKIT=1 docker build \
+ --platform linux/amd64 \
+ -t "$account.dkr.ecr.ap-northeast-1.amazonaws.com/$env-indexer-$service:$tag" \
+ -f "$dockerfile" \
+ --build-arg service="$service" \
+ --build-arg NPM_TOKEN="$NPM_TOKEN" . Committable suggestion
Suggested change
Double quote to prevent globbing and word splitting. - docker push $account.dkr.ecr.ap-northeast-1.amazonaws.com/$env-indexer-$service:$tag
+ docker push "$account.dkr.ecr.ap-northeast-1.amazonaws.com/$env-indexer-$service:$tag" Committable suggestion
Suggested change
Double quote to prevent globbing and word splitting. - AWS_PROFILE=dydx-v4-$env orb deploy $service $tag
+ AWS_PROFILE="dydx-v4-$env" orb deploy "$service" "$tag" Committable suggestion
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||||
"mainnet") account=332066407361;; # mainnet | ||||||||||||||||||||||||||||||||||||||||||||||
*) account=329916310755;; | ||||||||||||||||||||||||||||||||||||||||||||||
esac | ||||||||||||||||||||||||||||||||||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tip
Codebase Verification
Several files in the codebase still use the old function signature for
PnlTicksTable.findAll
.PnlTicksTable.findAll
are updated to handle pagination correctly.Locations to update:
validatePnlForSubaccount
functionPnlTicksTable.findAll
PnlTicksTable.findAll
is called without pagination parametersAnalysis chain
LGTM! Ensure pagination is handled correctly in the calling code.
Scripts Executed
The following scripts were executed for the analysis:
Script:
Length of output: 65
Script:
Length of output: 20249
Script:
Length of output: 3955