Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: stcelo v1 WC v2 fix attempts #140

Merged
merged 2 commits into from
Jul 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 32 additions & 5 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,45 @@ const webpack = require('webpack');
const nextConfig = {
reactStrictMode: false,
swcMinify: true,
webpack: (config, { isServer }) => {
if (!isServer) {
config.resolve.fallback.net = false;
config.resolve.fallback.fs = false;
}
webpack: (config) => {
config.resolve.fallback = { fs: false, net: false, tls: false };
config.plugins.push(
new webpack.BannerPlugin({
banner: 'For third party licenses check /THIRD_PARTY_LICENSES.txt',
})
);
config.optimization.minimizer = [];
return config;
},
async headers() {
return [
{
source: '/manifest.json',
headers: [
{
key: 'Access-Control-Allow-Origin',
value: '*',
},
{
key: 'Access-Control-Allow-Methods',
value: 'GET,OPTIONS',
},
{
key: 'Access-Control-Allow-Headers',
value: 'X-Requested-With, content-type, Authorization',
},
],
},
];
},
async rewrites() {
return [
{
source: '/manifest.json',
destination: '/site.webmanifest',
},
];
},
};

module.exports = nextConfig;
4 changes: 3 additions & 1 deletion src/pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CeloProvider, useCelo } from '@celo/react-celo';
import { CeloProvider, Mainnet, useCelo } from '@celo/react-celo';
import '@celo/react-celo/lib/styles.css';
import dayjs from 'dayjs';
import relativeTime from 'dayjs/plugin/relativeTime';
Expand Down Expand Up @@ -35,6 +35,8 @@ const App = ({ Component, pageProps, router }: AppProps) => {
url: '',
walletConnectProjectId: '3bcdb6756cdd7179c359c03ae1e8aca2',
}}
defaultNetwork={Mainnet.name}
networks={[Mainnet]}
connectModal={{
title: <span>Connect Wallet</span>,
providersOptions: { searchable: false },
Expand Down