Skip to content

Commit

Permalink
#15 - remove api folder
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianscatularo committed Mar 18, 2024
1 parent 600215e commit 5f58626
Show file tree
Hide file tree
Showing 11 changed files with 9 additions and 339 deletions.
3 changes: 0 additions & 3 deletions frontend/.babelrc

This file was deleted.

2 changes: 1 addition & 1 deletion frontend/components/wallets/Cosmos.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export function CosmosWalletButton({
if (connected === 'true') {
connect()
}
}, [])
}, [chainName, connect])

// The initial value of `isWalletNotExist` is false.
// When the user clicks on connect, the value of `isWalletNotExist` is first set to false,
Expand Down
9 changes: 5 additions & 4 deletions frontend/integration/api.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import { VersionedTransaction } from '@solana/web3.js'
import { NextApiRequest, NextApiResponse } from 'next'
import handlerFundTransaction from '../pages/api/grant/v1/fund_transaction'
import {
getAmountAndProofRoute,
getFundTransactionRoute,
handleAmountAndProofResponse,
handleFundTransaction,
} from '../utils/api'
import { ClaimInfo, Ecosystem } from '../claim_sdk/claim'
import handlerAmountAndProof from '../pages/api/grant/v1/amount_and_proof'

//import handlerAmountAndProof from '../pages/api/grant/v1/amount_and_proof'
//import handlerFundTransaction from '../pages/api/grant/v1/fund_transaction'

export class NextApiResponseMock {
public jsonBody: any
Expand Down Expand Up @@ -36,7 +37,7 @@ export async function mockfetchFundTransaction(
} as unknown as NextApiRequest
const res = new NextApiResponseMock()

await handlerFundTransaction(req, res as unknown as NextApiResponse)
//await handlerFundTransaction(req, res as unknown as NextApiResponse)
return handleFundTransaction(res.statusCode, res.jsonBody)
}

Expand All @@ -53,7 +54,7 @@ export async function mockFetchAmountAndProof(
} as unknown as NextApiRequest
const res = new NextApiResponseMock()

await handlerAmountAndProof(req, res as unknown as NextApiResponse)
//await handlerAmountAndProof(req, res as unknown as NextApiResponse)
return handleAmountAndProofResponse(
ecosystem,
identity,
Expand Down
4 changes: 2 additions & 2 deletions frontend/middleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ export function middleware(req) {
`

// NextResponse object does not have a body property so we use Response instead
return new Response(body, {
/*return new Response(body, {
status: 200,
headers: {
'Content-Type': 'text/html',
},
})
})*/
}
2 changes: 1 addition & 1 deletion frontend/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function useRedirect(isVersionChecked: boolean) {
// 2. there is a last state -> redirect to that page
if (lastStep === null) router.replace('/')
if (lastStep) router.replace(lastStep)
}, [isVersionChecked])
}, [isVersionChecked, lastStep, router, pathname])

useEffect(() => {
if (!isVersionChecked) return
Expand Down
68 changes: 0 additions & 68 deletions frontend/pages/api/auth/[...nextauth].ts

This file was deleted.

54 changes: 0 additions & 54 deletions frontend/pages/api/grant/v1/amount_and_proof.ts

This file was deleted.

51 changes: 0 additions & 51 deletions frontend/pages/api/grant/v1/discord_signed_message.ts

This file was deleted.

39 changes: 0 additions & 39 deletions frontend/pages/api/grant/v1/evm_breakdown.ts

This file was deleted.

77 changes: 0 additions & 77 deletions frontend/pages/api/grant/v1/fund_transaction.ts

This file was deleted.

Loading

0 comments on commit 5f58626

Please sign in to comment.