From 6ffdecf072a0f02d046a1719b2100c91805b2a51 Mon Sep 17 00:00:00 2001 From: armaniferrante Date: Sun, 16 May 2021 18:41:42 -0700 Subject: [PATCH] Reclassify peer and dev dependencies --- package.json | 59 ++++++++++++++++------------- src/swap/components/context/Dex.tsx | 3 -- tsconfig.npm.json | 4 +- yarn.lock | 11 +++--- 4 files changed, 41 insertions(+), 36 deletions(-) diff --git a/package.json b/package.json index 15e5b18..24fe155 100644 --- a/package.json +++ b/package.json @@ -1,35 +1,23 @@ { "name": "@project-serum/swap-ui", - "version": "0.1.0-alpha.1", + "version": "0.1.0-alpha.5", "main": "dist/index.js", + "types": "dist/index.d.ts", "homepage": ".", "dependencies": { + "react-async-hook": "^3.6.2", + "@project-serum/serum": "^0.13.34", + "@project-serum/swap": "^0.1.0-alpha.8", + "@solana/spl-token": "^0.1.4" + }, + "peerDependencies": { + "react": "^17.0.2", + "@solana/web3.js": "^1.10.1", + "@solana/spl-token-registry": "^0.2.86", + "@project-serum/anchor": "^0.6.0-beta.1", "@material-ui/core": "^4.11.4", "@material-ui/icons": "^4.11.2", - "@material-ui/lab": "^4.0.0-alpha.58", - "@project-serum/anchor": "^0.5.1-beta.2", - "@project-serum/serum": "^0.13.34", - "@project-serum/sol-wallet-adapter": "^0.2.0", - "@project-serum/swap": "^0.1.0-alpha.7", - "@solana/spl-token": "^0.1.4", - "@solana/spl-token-registry": "^0.2.86", - "@solana/web3.js": "^1.10.1", - "@testing-library/jest-dom": "^5.11.4", - "@testing-library/react": "^11.1.0", - "@testing-library/user-event": "^12.1.10", - "@types/jest": "^26.0.15", - "@types/node": "^12.0.0", - "@types/react": "^17.0.0", - "@types/react-dom": "^17.0.0", - "bs58": "^4.0.1", - "material-ui-popup-state": "^1.8.3", - "notistack": "^1.0.7", - "react": "^17.0.2", - "react-async-hook": "^3.6.2", - "react-dom": "^17.0.2", - "react-scripts": "4.0.3", - "typescript": "^4.1.2", - "web-vitals": "^1.0.1" + "@material-ui/lab": "^4.0.0-alpha.58" }, "scripts": { "start": "react-scripts start", @@ -60,8 +48,27 @@ ] }, "devDependencies": { + "@material-ui/core": "^4.11.4", + "@material-ui/icons": "^4.11.2", + "@material-ui/lab": "^4.0.0-alpha.58", + "@project-serum/sol-wallet-adapter": "^0.2.0", + "@testing-library/jest-dom": "^5.11.4", + "@testing-library/react": "^11.1.0", + "@testing-library/user-event": "^12.1.10", + "@types/jest": "^26.0.15", + "@types/node": "^12.0.0", + "@types/react": "^17.0.0", + "@types/react-dom": "^17.0.0", + "react": "^17.0.2", "gh-pages": "^3.1.0", - "prettier": "^2.3.0" + "prettier": "^2.3.0", + "bs58": "^4.0.1", + "material-ui-popup-state": "^1.8.3", + "notistack": "^1.0.7", + "react-dom": "^17.0.2", + "react-scripts": "4.0.3", + "typescript": "^4.1.2", + "web-vitals": "^1.0.1" }, "files": [ "dist" diff --git a/src/swap/components/context/Dex.tsx b/src/swap/components/context/Dex.tsx index 9f31c9e..640d2ab 100644 --- a/src/swap/components/context/Dex.tsx +++ b/src/swap/components/context/Dex.tsx @@ -378,9 +378,6 @@ function wormholeNativeMarket( // Returns the market address of the 1-1 sollet<->wormhole swap market if it // exists. Otherwise, returns null. -// -// TODO: swap transactions dont work for wormhole yet, since the client -// doesnt do any wormhole checks. async function wormholeSolletMarket( conn: Connection, fromMint: PublicKey, diff --git a/tsconfig.npm.json b/tsconfig.npm.json index 779a51a..d603e80 100644 --- a/tsconfig.npm.json +++ b/tsconfig.npm.json @@ -20,7 +20,9 @@ "noEmit": false, "jsx": "react-jsx", "typeRoots": ["types/", "node_modules/@types"], - "outDir": "dist" + "outDir": "dist", + "declaration": true, + "declarationDir": "dist" }, "include": [ "src/swap/" diff --git a/yarn.lock b/yarn.lock index 88791d4..1917c41 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1588,16 +1588,15 @@ bs58 "^4.0.1" eventemitter3 "^4.0.4" -"@project-serum/swap@^0.1.0-alpha.7": - version "0.1.0-alpha.7" - resolved "https://registry.yarnpkg.com/@project-serum/swap/-/swap-0.1.0-alpha.7.tgz#82bdd06e57814b9a42cf127c26b53bfc3b48438b" - integrity sha512-oZU9bA0znbIcxCKM1sxjOjxHCV1n5iPNowbYhtmsbhH6DczgjIsPO3gGJ00TJOBPkOn7gdtynpDAhGar3tSBPw== +"@project-serum/swap@^0.1.0-alpha.8": + version "0.1.0-alpha.8" + resolved "https://registry.yarnpkg.com/@project-serum/swap/-/swap-0.1.0-alpha.8.tgz#1df677bc4dc1c0293bb759179f126e1b8ca87ea4" + integrity sha512-NWHFewsGgNpA+AN+FsLyZ74Ir5eoYvzvPPKytTEwDR5Q5Q8lxWlBDfpYB3tyio/36VmYdyImb+FAvU8pREmofg== dependencies: "@project-serum/anchor" "^0.5.1-beta.2" "@project-serum/serum" "^0.13.34" "@solana/spl-token" "^0.1.3" "@solana/spl-token-registry" "^0.2.86" - "@solana/web3.js" "^1.2.0" base64-js "^1.5.1" bn.js "^5.1.2" @@ -1685,7 +1684,7 @@ tweetnacl "^1.0.0" ws "^7.0.0" -"@solana/web3.js@^1.10.1", "@solana/web3.js@^1.2.0", "@solana/web3.js@^1.9.1": +"@solana/web3.js@^1.2.0", "@solana/web3.js@^1.9.1": version "1.10.1" resolved "https://registry.yarnpkg.com/@solana/web3.js/-/web3.js-1.10.1.tgz#b3e7197a2628c26c54227963741b1788bb67f7ff" integrity sha512-5zepm+AaVfC6uao/WxKT7SlemqgGEp+x7XUv+018RURIx+XEcF+G2ZgjrIbjy5OoXJyfz+wGw8Or2fxsypderA==