Skip to content
This repository has been archived by the owner on Nov 29, 2024. It is now read-only.

Commit

Permalink
WIP: Fix playground
Browse files Browse the repository at this point in the history
  • Loading branch information
nezouse committed Oct 4, 2023
1 parent d3404f4 commit a64954c
Show file tree
Hide file tree
Showing 44 changed files with 8,611 additions and 753 deletions.
8 changes: 2 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@ensofinance/use-defi",
"name": "use-defi-monorepo",
"version": "0.2.3",
"description": "React hooks library to use with enso shortcuts infrastructure",
"main": "index.js",
Expand All @@ -19,15 +19,11 @@
"peerDependencies": {
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-query": "^3.39.3",
"viem": "^1.2.15",
"wagmi": "^1.3.9"
},
"dependencies": {
"@ethersproject/providers": "^5.7.2",
"axios": "^1.4.0",
"dotenv": "^16.3.1",
"query-string": "^8.1.0"
"dotenv": "^16.3.1"
},
"devDependencies": {
"@rollup/plugin-commonjs": "^25.0.2",
Expand Down
14 changes: 14 additions & 0 deletions playground/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "playground",
"private": true,
"scripts": {
"dev": "vite dev"
},
"devDependencies": {
"vite": "^4.4.0"
},
"dependencies": {
"@ensofinance/use-defi": "workspace:^",
"util": "^0.12.4"
}
}
315 changes: 315 additions & 0 deletions playground/pnpm-lock.yaml

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

4 changes: 2 additions & 2 deletions playground/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useExecutePosition, useMultichainRoute, usePositions } from '@ensofinance/use-defi';
import { useCrossChainRoute, useExecutePosition, usePositions } from '@ensofinance/use-defi';
import { parseUnits } from 'viem';

import './App.css';
Expand Down Expand Up @@ -33,7 +33,7 @@ function App() {
},
});

const { execute: executeMultichainRoute } = useMultichainRoute({
const { execute: executeMultichainRoute } = useCrossChainRoute({
tokenIn,
tokenOut: '0xae7ab96520de3a18e5e111b5eaab095312d7fe84',
destinationChainId: 1,
Expand Down
9 changes: 9 additions & 0 deletions playground/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,13 @@ export default defineConfig({
preventAssignment: true,
}),
],
define: {
global: 'globalThis',
},
resolve: {
alias: {
process: 'process/browser',
util: 'util',
},
},
});
Loading

0 comments on commit a64954c

Please sign in to comment.