Skip to content

Commit

Permalink
feat(fixing rpc calls): rpc calls are not called by wagmi straight away
Browse files Browse the repository at this point in the history
  • Loading branch information
Torof committed Oct 25, 2024
1 parent ef290e6 commit 4ccf67a
Show file tree
Hide file tree
Showing 76 changed files with 50,743 additions and 23 deletions.
Binary file modified bun.lockb
Binary file not shown.
41 changes: 32 additions & 9 deletions frontend/next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// frontend/next.config.mjs
import "../env.mjs";
import { env } from "../env.mjs";
import path from 'path';
Expand Down Expand Up @@ -26,6 +27,36 @@ const nextConfig = {
return config;
},
transpilePackages: ['@graphql-mesh/http', '@graphql-mesh/merger-stitching', 'graphql-yoga'],

// Combined rewrites for both RPC and manifest
async rewrites() {
return [
{
source: '/api/rpc/:chain*',
destination: '/api/proxy/rpc/:chain*',
},
{
source: '/manifest.json',
destination: 'https://ledgity.finance/manifest.json',
}
]
},

// Add CORS headers
async headers() {
return [
{
source: '/api/:path*',
headers: [
{ key: 'Access-Control-Allow-Credentials', value: 'true' },
{ key: 'Access-Control-Allow-Origin', value: '*' },
{ key: 'Access-Control-Allow-Methods', value: 'GET,POST,OPTIONS' },
{ key: 'Access-Control-Allow-Headers', value: 'X-Requested-With, Content-Type, Authorization' },
],
}
]
},

images: {
remotePatterns: [
{
Expand All @@ -42,15 +73,7 @@ const nextConfig = {
},
],
},
async redirects() {
return [
{
source: "/app",
destination: "/app/invest",
permanent: true,
},
];
},

env: {
NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID: env.NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID,
NEXT_PUBLIC_INTEGRATOR_ID: env.NEXT_PUBLIC_INTEGRATOR_ID,
Expand Down
21 changes: 21 additions & 0 deletions frontend/node_modules/@types/node/LICENSE

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions frontend/node_modules/@types/node/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 4ccf67a

Please sign in to comment.