Skip to content

Commit

Permalink
FIx router errors
Browse files Browse the repository at this point in the history
  • Loading branch information
adamiak committed Oct 18, 2024
1 parent 94ac06a commit f63db02
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions packages/backend/src/api/routers/FrontendRouter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -424,14 +424,6 @@ export function createFrontendRouter(
applyControllerResult(ctx, result)
})

router.get('/installMetamask', async (ctx) => {
const givenUser = getGivenUser(ctx)
const result = await escapeHatchController.getFreezeRequestActionPage(
givenUser
)
applyControllerResult(ctx, result)
})

router.get(
'/escape/:positionOrVaultId',
withTypedContext(
Expand Down Expand Up @@ -524,6 +516,18 @@ export function createFrontendRouter(
)
)

router.get('/tos', async (ctx) => {
const givenUser = getGivenUser(ctx)
const result = await staticPageController.getTermsOfServicePage(givenUser)
applyControllerResult(ctx, result)
})

router.get('/metamask-required', async (ctx) => {
const givenUser = getGivenUser(ctx)
const result = await staticPageController.getInstallMetaMaskPage(givenUser)
applyControllerResult(ctx, result)
})

if (config.starkex.tradingMode === 'perpetual') {
if (!forcedTradeOfferController) {
throw new Error(
Expand Down

0 comments on commit f63db02

Please sign in to comment.