Skip to content

Commit

Permalink
fix linting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Defi-Moses committed Sep 17, 2024
1 parent d35d50a commit b7ba450
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion packages/rest-api/src/controllers/bridgeTxInfoController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ export const bridgeTxInfoController = async (req, res) => {
}

try {
const { fromChain, toChain, amount, destAddress, fromToken, toToken } = req.query
const { fromChain, toChain, amount, destAddress, fromToken, toToken } =
req.query

if (!isAddress(fromToken) || !isAddress(toToken)) {
return res.status(400).json({ error: 'Invalid token address' })
Expand Down
5 changes: 4 additions & 1 deletion packages/rest-api/src/tests/swapTxInfoRoute.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@ describe('Swap TX Info Route with Real Synapse Service', () => {
address: 'invalid_address',
})
expect(response.status).toBe(400)
expect(response.body.error).toHaveProperty('message', 'Invalid Ethereum address')
expect(response.body.error).toHaveProperty(
'message',
'Invalid Ethereum address'
)
}, 10_000)

it('should return 400 for unsupported chain, with error message', async () => {
Expand Down

0 comments on commit b7ba450

Please sign in to comment.