Skip to content

Commit

Permalink
feat(address check): add address check to /api/scores (#903)
Browse files Browse the repository at this point in the history
Co-authored-by: Chaitanya <[email protected]>
  • Loading branch information
Todmy and ChaituVR authored Oct 4, 2023
1 parent e57dc49 commit 88ac9a5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/rpc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,12 @@ router.post('/api/scores', async (req, res) => {
)
return rpcError(res, 500, 'something wrong with the strategies', null);

try {
addresses.forEach(getAddress);
} catch (e: any) {
return rpcError(res, 400, 'invalid address', null);
}

let result;
try {
result = await scores(
Expand Down

0 comments on commit 88ac9a5

Please sign in to comment.