-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[vite-example-dapp] Create vite version of the example dapp for conve…
…nience
- Loading branch information
1 parent
5ea35e6
commit cbfc7a7
Showing
35 changed files
with
2,346 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
VITE_IC_FRONTEND_URL=http://localhost:3000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
VITE_IC_FRONTEND_URL=http://localhost:3000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[{"/Users/gabriele/workspace/identity-connect/apps/examples/dapp/src/AccountsSection/AccountsListItem.tsx":"1","/Users/gabriele/workspace/identity-connect/apps/examples/dapp/src/AccountsSection/AccountsSection.tsx":"2","/Users/gabriele/workspace/identity-connect/apps/examples/dapp/src/AccountsSection/index.ts":"3","/Users/gabriele/workspace/identity-connect/apps/examples/dapp/src/App.tsx":"4","/Users/gabriele/workspace/identity-connect/apps/examples/dapp/src/AppStateContext.ts":"5","/Users/gabriele/workspace/identity-connect/apps/examples/dapp/src/DappClientContext.ts":"6","/Users/gabriele/workspace/identity-connect/apps/examples/dapp/src/NewRequestSection/NewRequestSection.tsx":"7","/Users/gabriele/workspace/identity-connect/apps/examples/dapp/src/NewRequestSection/index.ts":"8","/Users/gabriele/workspace/identity-connect/apps/examples/dapp/src/main.tsx":"9","/Users/gabriele/workspace/identity-connect/apps/examples/dapp/src/utils/makeContext.tsx":"10","/Users/gabriele/workspace/identity-connect/apps/examples/dapp/src/utils/makeLocalStorageAppStateContext.ts":"11","/Users/gabriele/workspace/identity-connect/apps/examples/dapp/src/utils/useAsyncAction.ts":"12","/Users/gabriele/workspace/identity-connect/apps/examples/dapp/src/vite-env.d.ts":"13"},{"size":2113,"mtime":1697658845520,"results":"14","hashOfConfig":"15"},{"size":1058,"mtime":1697658845520,"results":"16","hashOfConfig":"15"},{"size":148,"mtime":1697658845520,"results":"17","hashOfConfig":"15"},{"size":476,"mtime":1697658845520,"results":"18","hashOfConfig":"15"},{"size":620,"mtime":1697658845520,"results":"19","hashOfConfig":"15"},{"size":1546,"mtime":1697658845520,"results":"20","hashOfConfig":"15"},{"size":7438,"mtime":1697658845521,"results":"21","hashOfConfig":"15"},{"size":154,"mtime":1697658845521,"results":"22","hashOfConfig":"15"},{"size":579,"mtime":1697658845521,"results":"23","hashOfConfig":"15"},{"size":1286,"mtime":1697658845521,"results":"24","hashOfConfig":"15"},{"size":2369,"mtime":1697658845521,"results":"25","hashOfConfig":"15"},{"size":492,"mtime":1697658845521,"results":"26","hashOfConfig":"15"},{"size":303,"mtime":1697658845521,"results":"27","hashOfConfig":"15"},{"filePath":"28","messages":"29","suppressedMessages":"30","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"18orfr",{"filePath":"31","messages":"32","suppressedMessages":"33","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"34","messages":"35","suppressedMessages":"36","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"37","messages":"38","suppressedMessages":"39","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"40","messages":"41","suppressedMessages":"42","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"43","messages":"44","suppressedMessages":"45","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"46","messages":"47","suppressedMessages":"48","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"49","messages":"50","suppressedMessages":"51","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"52","messages":"53","suppressedMessages":"54","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"55","messages":"56","suppressedMessages":"57","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"58","messages":"59","suppressedMessages":"60","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"61","messages":"62","suppressedMessages":"63","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"64","messages":"65","suppressedMessages":"66","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/Users/gabriele/workspace/identity-connect/apps/examples/dapp/src/AccountsSection/AccountsListItem.tsx",[],[],"/Users/gabriele/workspace/identity-connect/apps/examples/dapp/src/AccountsSection/AccountsSection.tsx",[],[],"/Users/gabriele/workspace/identity-connect/apps/examples/dapp/src/AccountsSection/index.ts",[],[],"/Users/gabriele/workspace/identity-connect/apps/examples/dapp/src/App.tsx",[],[],"/Users/gabriele/workspace/identity-connect/apps/examples/dapp/src/AppStateContext.ts",[],[],"/Users/gabriele/workspace/identity-connect/apps/examples/dapp/src/DappClientContext.ts",["67"],[],"/Users/gabriele/workspace/identity-connect/apps/examples/dapp/src/NewRequestSection/NewRequestSection.tsx",[],["68","69","70","71","72","73","74","75"],"/Users/gabriele/workspace/identity-connect/apps/examples/dapp/src/NewRequestSection/index.ts",[],[],"/Users/gabriele/workspace/identity-connect/apps/examples/dapp/src/main.tsx",[],[],"/Users/gabriele/workspace/identity-connect/apps/examples/dapp/src/utils/makeContext.tsx",[],["76"],"/Users/gabriele/workspace/identity-connect/apps/examples/dapp/src/utils/makeLocalStorageAppStateContext.ts",[],["77","78"],"/Users/gabriele/workspace/identity-connect/apps/examples/dapp/src/utils/useAsyncAction.ts",[],[],"/Users/gabriele/workspace/identity-connect/apps/examples/dapp/src/vite-env.d.ts",[],[],{"ruleId":"79","severity":1,"message":"80","line":43,"column":6,"nodeType":"81","endLine":43,"endColumn":33,"suggestions":"82"},{"ruleId":"83","severity":1,"message":"84","line":60,"column":5,"nodeType":"85","messageId":"86","endLine":60,"endColumn":16,"suppressions":"87"},{"ruleId":"83","severity":1,"message":"84","line":69,"column":5,"nodeType":"85","messageId":"86","endLine":69,"endColumn":16,"suppressions":"88"},{"ruleId":"83","severity":1,"message":"84","line":78,"column":5,"nodeType":"85","messageId":"86","endLine":78,"endColumn":16,"suppressions":"89"},{"ruleId":"83","severity":1,"message":"84","line":105,"column":5,"nodeType":"85","messageId":"86","endLine":105,"endColumn":16,"suppressions":"90"},{"ruleId":"83","severity":1,"message":"84","line":114,"column":5,"nodeType":"85","messageId":"86","endLine":114,"endColumn":16,"suppressions":"91"},{"ruleId":"83","severity":1,"message":"84","line":123,"column":5,"nodeType":"85","messageId":"86","endLine":123,"endColumn":16,"suppressions":"92"},{"ruleId":"83","severity":1,"message":"84","line":132,"column":5,"nodeType":"85","messageId":"86","endLine":132,"endColumn":16,"suppressions":"93"},{"ruleId":"83","severity":1,"message":"84","line":148,"column":5,"nodeType":"85","messageId":"86","endLine":148,"endColumn":16,"suppressions":"94"},{"ruleId":"95","severity":2,"message":"96","line":31,"column":27,"nodeType":"97","messageId":"98","endLine":34,"endColumn":4,"fix":"99","suppressions":"100"},{"ruleId":"101","severity":2,"message":"102","line":42,"column":33,"nodeType":"103","endLine":42,"endColumn":41,"suppressions":"104"},{"ruleId":"101","severity":2,"message":"105","line":44,"column":7,"nodeType":"103","endLine":44,"endColumn":16,"suppressions":"106"},"react-hooks/exhaustive-deps","React Hook useMemo has an unnecessary dependency: 'selectedNetwork'. Either exclude it or remove the dependency array.","ArrayExpression",["107"],"no-console","Unexpected console statement.","MemberExpression","unexpected",["108"],["109"],["110"],["111"],["112"],["113"],["114"],["115"],"react/function-component-definition","Function component is not a function declaration","ArrowFunctionExpression","function-declaration",{"range":"116","text":"117"},["118"],"react-hooks/rules-of-hooks","React Hook \"useState\" is called in function \"watch\" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter. React Hook names must start with the word \"use\".","Identifier",["119"],"React Hook \"useEffect\" is called in function \"watch\" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter. React Hook names must start with the word \"use\".",["120"],{"desc":"121","fix":"122"},{"kind":"123","justification":"124"},{"kind":"123","justification":"124"},{"kind":"123","justification":"124"},{"kind":"123","justification":"124"},{"kind":"123","justification":"124"},{"kind":"123","justification":"124"},{"kind":"123","justification":"124"},{"kind":"123","justification":"124"},[981,1190],"function ContextProvider({ children, ...props }: PropsWithChildren<TProps>) {\n const value = valueProvider(props as TProps);\n return <Context.Provider value={value}>{children}</Context.Provider>;\n }",{"kind":"123","justification":"124"},{"kind":"123","justification":"124"},{"kind":"123","justification":"124"},"Update the dependencies array to be: [appState]",{"range":"125","text":"126"},"directive","",[1511,1538],"[appState]"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// Copyright © Aptos | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
const devTools = ['./vite.config.ts']; | ||
|
||
module.exports = { | ||
env: { browser: true, es2020: true }, | ||
extends: ["@aptos-labs/eslint-config-adapter"], | ||
parserOptions: { | ||
project: ['tsconfig.json', 'tsconfig.node.json'], | ||
}, | ||
plugins: ['react-refresh'], | ||
root: true, | ||
rules: { | ||
'import/extensions': 'off', | ||
'import/no-extraneous-dependencies': ['error', { devDependencies: devTools }], | ||
'react-refresh/only-export-components': 'warn', | ||
'react/react-in-jsx-scope': 'off', | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
lerna-debug.log* | ||
|
||
node_modules | ||
dist | ||
dist-ssr | ||
*.local | ||
|
||
# Editor directories and files | ||
.vscode/* | ||
!.vscode/extensions.json | ||
.idea | ||
.DS_Store | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<link rel="icon" type="image/png" href="/favicon.ico"> | ||
<title>Example Dapp</title> | ||
</head> | ||
<body> | ||
<div id="root"></div> | ||
<script type="module" src="/src/main.tsx"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
{ | ||
"name": "@aptos-labs/wallet-adapter-vite-example", | ||
"private": true, | ||
"version": "0.0.0", | ||
"type": "module", | ||
"scripts": { | ||
"dev": "vite", | ||
"build": "tsc && vite build", | ||
"lint": "prettier --check src", | ||
"lint:fix": "prettier --write src && eslint --cache ./src --fix", | ||
"preview": "vite preview" | ||
}, | ||
"dependencies": { | ||
"@aptos-connect/wallet-api": "^0.0.3", | ||
"@aptos-labs/ts-sdk": "1.10.0-zeta.2", | ||
"@aptos-labs/wallet-adapter-ant-design": "workspace:*", | ||
"@aptos-labs/wallet-adapter-core": "workspace:*", | ||
"@aptos-labs/wallet-adapter-mui-design": "workspace:*", | ||
"@aptos-labs/wallet-adapter-react": "workspace:*", | ||
"@aptos-labs/wallet-standard": "^0.0.11", | ||
"@aptos-connect/wallet-adapter-plugin": "^0.0.3", | ||
"@bitget-wallet/aptos-wallet-adapter": "^0.1.0", | ||
"@blocto/aptos-wallet-adapter-plugin": "^0.2.2", | ||
"@flipperplatform/wallet-adapter-plugin": "^0.1.0", | ||
"@haechi-labs/face-aptos-adapter-plugin": "^0.0.4", | ||
"@haechi-labs/face-sdk": "^1.10.8", | ||
"@haechi-labs/face-types": "^1.10.8", | ||
"@identity-connect/wallet-adapter-plugin": "^1.2.5", | ||
"@martianwallet/aptos-wallet-adapter": "^0.0.5", | ||
"@msafe/aptos-wallet-adapter": "^1.0.11", | ||
"@okwallet/aptos-wallet-adapter": "^0.0.3", | ||
"@onekeyfe/aptos-wallet-adapter": "^0.1.2", | ||
"@openblockhq/aptos-wallet-adapter": "^0.1.5", | ||
"@pontem/wallet-adapter-plugin": "^0.2.1", | ||
"@rise-wallet/wallet-adapter": "^0.1.2", | ||
"@tp-lab/aptos-wallet-adapter": "^1.0.1", | ||
"@trustwallet/aptos-wallet-adapter": "^0.1.6", | ||
"@welldone-studio/aptos-wallet-adapter": "^0.1.4", | ||
"antd": "^5.1.2", | ||
"ethers": "^5.7.2", | ||
"fewcha-plugin-wallet-adapter": "^0.1.3", | ||
"petra-plugin-wallet-adapter": "^0.4.5", | ||
"react": "18.2.0", | ||
"react-dom": "18.2.0" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "^7.0.0", | ||
"@types/node": "^17.0.12", | ||
"@types/react": "18.0.28", | ||
"@types/react-dom": "^18.0.11", | ||
"@vitejs/plugin-react-swc": "^3.0.0", | ||
"autoprefixer": "^10.4.13", | ||
"eslint": "8.57.0", | ||
"eslint-plugin-react-refresh": "^0.3.4", | ||
"postcss": "^8.4.19", | ||
"tailwindcss": "^3.2.4", | ||
"typescript": "5.0.4", | ||
"vite": "^4.3.9" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module.exports = { | ||
plugins: { | ||
tailwindcss: {}, | ||
autoprefixer: {}, | ||
}, | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
identity-connect-57fa42a9-29c6-4f1e-939c-4eefa36d9ff5 |
Oops, something went wrong.