Skip to content

Commit

Permalink
moralis v2
Browse files Browse the repository at this point in the history
  • Loading branch information
locothedev committed Jun 3, 2022
1 parent 1331ce6 commit 3833b6f
Show file tree
Hide file tree
Showing 13 changed files with 2,878 additions and 2,715 deletions.
5 changes: 2 additions & 3 deletions apps/example/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { Route, Routes } from 'react-router-dom';
import { lazily } from 'react-lazily';
import { Suspense } from 'react';

const { Button, Logo, Typography, Avatar, BannerStrip, VerifyCode } = lazily(() => import('@web3uikit/core'));
// const { } = lazily(() => import('@web3uikit/ui'));
const { ConnectButton } = lazily(() => import('@web3uikit/ui'))
export const App = () => {
return (
<Routes>
Expand All @@ -19,7 +18,7 @@ export const App = () => {
<BannerStrip text='Hey this is a notification you should check out' type='standard' />
<VerifyCode />
</div>
{/* <ConnectWallet /> */}
<ConnectButton />
</Suspense>
}
/>
Expand Down
12 changes: 9 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,25 @@
"storybook": "start-storybook -p 6006"
},
"dependencies": {
"@babel/core": "^7.18.2",
"@jscutlery/semver": "^2.22.0",
"@nrwl/workspace": "^14.1.4",
"dotenv": "^16.0.1",
"nx": "^14.1.4"
"nx": "^14.1.4",
"tslib": "^2.3.0"
},
"devDependencies": {
"@mdx-js/react": "^2.1.1",
"@nrwl/eslint-plugin-nx": "14.1.5",
"@nrwl/jest": "14.1.9",
"@nrwl/js": "14.1.9",
"@nrwl/linter": "14.1.5",
"@storybook/addon-essentials": "^6.4.22",
"@storybook/addon-links": "^6.4.22",
"@storybook/react": "^6.4.22",
"@storybook/testing-react": "^1.2.4",
"@testing-library/jest-dom": "^5.16.4",
"@testing-library/react": "^13.2.0",
"@testing-library/jest-dom":"^5.16.4",
"@types/jest": "^27.5.1",
"@types/node": "^17.0.26",
"@types/react": "^18.0.6",
Expand All @@ -42,13 +46,15 @@
"eslint": "~8.12.0",
"eslint-config-prettier": "8.1.0",
"jest": "^28.1.0",
"jest-styled-components":"^7.0.8",
"jest-styled-components": "^7.0.8",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-lazily": "^0.9.1",
"rollup-plugin-dts": "^4.2.1",
"storybook-builder-vite": "^0.1.23",
"styled-components": "^5.3.5",
"ts-jest": "27.1.4",
"ts-node": "9.1.1",
"typescript": "^4.6.4",
"vite": "^2.9.5",
"vite-plugin-dts": "^1.1.1",
Expand Down
10 changes: 6 additions & 4 deletions packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,16 @@
"react-dom": "^18.0.0"
},
"devDependencies": {
"moralis": "^1.7.0",
"@types/react-blockies": "^1.4.1",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-moralis": "^1.3.5",
"typescript": "^4.6.4"
"react-router-dom": "^6.3.0"
},
"dependencies": {
"@ethersproject/transactions": "^5.6.2",
"@moralisweb3/evm-wallet-connect-connector": "2.0.0-alpha.1",
"@web3uikit/core": "0.1.0",
"@walletconnect/web3-provider": "^1.7.8"
"@web3uikit/styles": "0.1.0",
"react-blockies": "^1.4.1"
}
}
2 changes: 1 addition & 1 deletion packages/ui/src/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from './lib';
export * from './lib/ConnectButton/ConnectButton';
15 changes: 0 additions & 15 deletions packages/ui/src/lib/ConnectButton/ConnectButton.stories.tsx

This file was deleted.

13 changes: 0 additions & 13 deletions packages/ui/src/lib/ConnectButton/ConnectButton.styles.ts

This file was deleted.

24 changes: 7 additions & 17 deletions packages/ui/src/lib/ConnectButton/ConnectButton.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,7 @@
import { IConnectWalletProps } from './types';
import Moralis from 'moralis';
import { Button } from '@web3uikit/core';
const ConnectWallet = ({
text = 'Connect Wallet',
authType: provider,
}: IConnectWalletProps) => {
return (
<Button
theme="secondary"
text={text}
onClick={() => Moralis.enableWeb3({ provider })}
/>
);
};

export default ConnectWallet;
import { Button } from "@web3uikit/core"
import Moralis from '@moralisweb3/evm-wallet-connect-connector'
export const ConnectButton = () => {
return (
<Button text="Connect Wallet" onClick={() => Moralis.connect()}/>
)
}
2 changes: 0 additions & 2 deletions packages/ui/src/lib/ConnectButton/index.ts

This file was deleted.

17 changes: 0 additions & 17 deletions packages/ui/src/lib/ConnectButton/types.ts

This file was deleted.

1 change: 0 additions & 1 deletion packages/ui/src/lib/index.ts

This file was deleted.

2 changes: 1 addition & 1 deletion packages/ui/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
},
"include": ["src"],
"exclude": ["node_modules", "package.json"]
}
}
6 changes: 1 addition & 5 deletions packages/ui/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,7 @@ export default defineConfig({
define: {
pkgJson: { name, version },
},
plugins: [
react(),
tsconfigPaths(),
// dts(),
],
plugins: [react(), tsconfigPaths(), dts({ entryRoot: './src' })],
build: {
lib: {
entry: path.resolve(__dirname, 'src/index.ts'),
Expand Down
Loading

0 comments on commit 3833b6f

Please sign in to comment.