Skip to content

Commit

Permalink
revert: to tag 2.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
agustinustheo committed Mar 7, 2024
1 parent 2743a60 commit f8974bb
Show file tree
Hide file tree
Showing 92 changed files with 1,046 additions and 4,023 deletions.
2 changes: 1 addition & 1 deletion adapters/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default function APIAdapter(): Adapter {
name: '',
username: '',
address: '',
network: NetworkIdEnum.MYRIADOCTOPUS,
network: NetworkIdEnum.MYRIAD,
});

return user as AdapterUser;
Expand Down
Binary file removed docs/B1frL9ZP6.png
Binary file not shown.
Binary file removed docs/BJTrDqbvp.png
Binary file not shown.
Binary file removed docs/BkLc5qbDT.png
Binary file not shown.
Binary file removed docs/Bka9c9-w6.png
Binary file not shown.
Binary file removed docs/Byb2F5Wwa.png
Binary file not shown.
Binary file removed docs/HJfaF9bPa.png
Binary file not shown.
Binary file removed docs/Hk3G19-vp.png
Binary file not shown.
Binary file removed docs/HkjujcWD6.png
Binary file not shown.
Binary file removed docs/S1CCRYbva.png
Binary file not shown.
Binary file removed docs/SkpBK5bwT.png
Binary file not shown.
Binary file removed docs/Sy8jqcZDp.png
Binary file not shown.
Binary file removed docs/exclusive-content-escrow.png
Binary file not shown.
27 changes: 0 additions & 27 deletions docs/milestone-2-documentation.md

This file was deleted.

81 changes: 0 additions & 81 deletions docs/milestone-2-testing-guide.md

This file was deleted.

Binary file removed docs/rkGtjq-wa.png
Binary file not shown.
Binary file removed docs/send-tip-myriar.png
Binary file not shown.
Binary file removed docs/wallet-integration-selection-2.png
Binary file not shown.
Binary file removed docs/wallet-integration-selection.png
Binary file not shown.
29 changes: 0 additions & 29 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,10 @@ const withBundleAnalyzer = require('@next/bundle-analyzer')({
enabled: process.env.ANALYZE === 'true',
});

const CompressionPlugin = require('compression-webpack-plugin');
const zlib = require('zlib');

const { version } = require('./package.json');

/** @type {import('next').NextConfig} */
const moduleExports = {
compress: true,
reactStrictMode: false,
experimental: {
styledComponent: true,
Expand Down Expand Up @@ -76,31 +72,6 @@ const moduleExports = {
use: ['@svgr/webpack'],
});

config.plugins.push(
new CompressionPlugin({
filename: '[path][base].gz',
algorithm: 'gzip',
test: /\.js$|\.css$|\.html$/,
threshold: 10240,
minRatio: 0.8,
}),
);

config.plugins.push(
new CompressionPlugin({
filename: '[path][base].br',
algorithm: 'brotliCompress',
test: /\.(js|css|html|svg)$/,
compressionOptions: {
params: {
[zlib.constants.BROTLI_PARAM_QUALITY]: 11,
},
},
threshold: 10240,
minRatio: 0.8,
}),
);

return config;
},
};
Expand Down
13 changes: 3 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
"@material-ui/core": "^4.12.3",
"@material-ui/icons": "^4.11.2",
"@material-ui/lab": "^4.0.0-alpha.60",
"@myriadsocial/ckeditor5-custom-build": "^0.0.1",
"@next/bundle-analyzer": "^12.1.0",
"@polkadot/api": "^9.14.2",
"@polkadot/extension-dapp": "^0.37.2",
Expand All @@ -56,22 +55,18 @@
"@udecode/plate": "^14.2.0",
"@udecode/plate-common": "^7.0.2",
"axios": "^0.26.1",
"compression-webpack-plugin": "10.0.0",
"date-fns": "^2.28.0",
"detect-browser": "^5.3.0",
"dotenv": "^16.0.1",
"emoji-picker-react": "^3.5.1",
"express": "^4.17.3",
"express-static-gzip": "^2.1.7",
"firebase": "^8.6.2",
"global": "^4.4.0",
"html-react-parser": "^3.0.8",
"html-to-text": "^9.0.5",
"http-proxy-middleware": "^2.0.4",
"i18next": "^21.6.7",
"i18next-browser-languagedetector": "^6.1.2",
"immutability-helper": "^3.1.1",
"js-sha256": "^0.11.0",
"lodash": "^4.17.21",
"millify": "^4.0.0",
"mux.js": "^6.0.1",
Expand All @@ -92,7 +87,6 @@
"react-dom": "^17.0.2",
"react-dropzone": "^11.3.4",
"react-i18next": "^11.15.3",
"react-icons": "^4.12.0",
"react-infinite-scroll-component": "^6.1.0",
"react-is": "^16.8.0",
"react-joyride": "^2.4.0",
Expand All @@ -111,15 +105,15 @@
"remark-gfm": "^3.0.1",
"remark-html": "^15.0.1",
"serve-index": "^1.9.1",
"sharp": "^0.32.6",
"sharp": "^0.30.7",
"slate": "^0.81.1",
"slate-history": "^0.66.0",
"slate-hyperscript": "^0.77.0",
"slate-react": "^0.81.0",
"styled-components": "^5.3.5",
"ua-parser-js": "^1.0.33",
"unique-names-generator": "^4.7.1",
"uuid": "^9.0.1",
"uuid": "^8.3.2",
"validator": "^13.7.0",
"yarn-deduplicate": "^5.0.0"
},
Expand Down Expand Up @@ -156,8 +150,7 @@
"nodemon": "^2.0.15",
"prettier-plugin-sh": "^0.12.8",
"prop-types": "^15.7.2",
"typescript": "latest",
"zlib": "^1.0.5"
"typescript": "latest"
},
"resolutions": {
"@polkadot/api": "^9.14.2",
Expand Down
2 changes: 0 additions & 2 deletions pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ import Head from 'next/head';
import CssBaseline from '@material-ui/core/CssBaseline';
import { ThemeProvider } from '@material-ui/core/styles';

import '../ckeditor.css';

import { SnackbarProvider } from 'notistack';
import { I18nextProvider } from 'react-i18next';
import { AppContextProvider } from 'src/context/AppContextProvider';
Expand Down
46 changes: 0 additions & 46 deletions pages/api/auth/[...nextauth].ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,52 +119,6 @@ const createOptions = (req: NextApiRequest) => ({
}
},
}),
CredentialsProvider({
id: 'tokenCredentials',
// The name to display on the sign in form (e.g. 'Sign in with...')
name: 'Token Credential',
// The credentials is used to generate a suitable form on the sign in page.
// You can specify whatever fields you are expecting to be submitted.
// e.g. domain, username, password, 2FA token, etc.
credentials: {
token: { label: 'Token', type: 'text' },
rpcUrl: { label: 'rpc url', type: 'text' },
instanceURL: { label: 'Instance url', type: 'text' },
},
async authorize(credentials) {
if (!credentials?.token) throw Error('no token!');

// Initialize instance api url
initialize({ apiURL: credentials.instanceURL });

const data = await AuthLinkAPI.loginWithAccessToken(
credentials.token,
credentials.rpcUrl,
);

if (!data?.token?.accessToken) throw Error('Failed to authorize user!');

try {
const user = data.user;
const accessToken = data.token.accessToken;
const payload = encryptMessage(accessToken, user.username);
const signInCredential = parseCredential(
user,
credentials,
LoginType.WALLET,
);

// Any object returned will be saved in `user` property of the JWT
return credentialToSession(signInCredential, payload);
} catch (error) {
// If failed, use instance url from session
initialize({ cookie: req.headers.cookie });

console.log('[api][Auth]', error);
return null;
}
},
}),
CredentialsProvider({
id: 'updateSession',
// The name to display on the sign in form (e.g. 'Sign in with...')
Expand Down
Binary file added public/images/login-background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/images/profile-default-bg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed public/sw.js.br
Binary file not shown.
Binary file removed public/sw.js.gz
Binary file not shown.
Binary file removed public/workbox-21ea936c.js.br
Binary file not shown.
Binary file removed public/workbox-21ea936c.js.gz
Binary file not shown.
9 changes: 0 additions & 9 deletions server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import next from 'next';

import * as dotenv from 'dotenv';
import express from 'express';
import expressStaticGzip from 'express-static-gzip';
import path from 'path';
import serveIndex from 'serve-index';

Expand All @@ -26,14 +25,6 @@ app.prepare().then(() => {
serveIndex(path.join(__dirname, '../docs')),
);

server.use(
'/_next/static',
expressStaticGzip('/_next/static', {
enableBrotli: true,
orderPreference: ['br', 'gz'],
}),
);

server.all('*', (req, res) => {
return handle(req, res);
});
Expand Down
1 change: 0 additions & 1 deletion src/components/AddSocialMedia/AddSocialMedia.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ const prefix: Record<SocialsEnum, string> = {
[SocialsEnum.VK]: '',
[SocialsEnum.WECHAT]: '',
[SocialsEnum.WEIBO]: '',
[SocialsEnum.X]: '',
};

export const AddSocialMedia: React.FC<AddSocialMediaProps> = props => {
Expand Down
6 changes: 1 addition & 5 deletions src/components/ExclusiveContentCreate/CurrencyOption.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,7 @@ export const CurrencyOption: React.FC<CurrencyOptionProps> = ({
};

const filterCurrency = balances.filter(balance => {
if (
balance.networkId === 'myriad' ||
balance.networkId === 'debio' ||
balance.networkId === 'rococo'
)
if (balance.networkId === 'myriad' || balance.networkId === 'debio')
return balance;
});

Expand Down
Loading

0 comments on commit f8974bb

Please sign in to comment.