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

WIP: Fix playground #5

Closed
wants to merge 1 commit into from
Closed
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
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