diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4673e2f..7b5bf35 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,6 +15,7 @@ jobs: - name: Build Frontend env: CI: false # needed otherwise dependencies warnings stop the job + REACT_APP_RAINBOW_PROJECT_ID: ${{ secrets.REACT_APP_RAINBOW_PROJECT_ID }} run: yarn --cwd python_web3_wallet/frontend build - name: Cache frontend build uses: actions/cache@v4 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index b35b439..323d3cc 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -28,6 +28,7 @@ jobs: - name: Build Frontend env: CI: false # needed otherwise dependencies warnings stop the job + REACT_APP_RAINBOW_PROJECT_ID: ${{ secrets.REACT_APP_RAINBOW_PROJECT_ID }} run: yarn --cwd python_web3_wallet/frontend build - name: Build a binary wheel and a source tarball run: poetry build diff --git a/pyproject.toml b/pyproject.toml index 4b29eeb..68a259c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "python-web3-wallet" -version = "0.0.14" +version = "0.0.15" description = "Streamlit component that allows users to connect a wallet and send transactions with dynamic recipients and amounts" authors = ["Gnosis AI "] license = "MIT" diff --git a/python_web3_wallet/frontend/.env.example b/python_web3_wallet/frontend/.env.example index 74d6fcc..cc74d22 100644 --- a/python_web3_wallet/frontend/.env.example +++ b/python_web3_wallet/frontend/.env.example @@ -1,4 +1,4 @@ PORT=3001 BROWSER=none -REACT_APP_RAINBOW_PROJECT_ID= -PYPI_TOKEN= \ No newline at end of file +REACT_APP_DEBUG_VARIABLE=false +REACT_APP_RAINBOW_PROJECT_ID= \ No newline at end of file diff --git a/python_web3_wallet/frontend/package.json b/python_web3_wallet/frontend/package.json index db88171..2c2fd3f 100644 --- a/python_web3_wallet/frontend/package.json +++ b/python_web3_wallet/frontend/package.json @@ -9,12 +9,18 @@ "react-dom": "^18.3.1", "streamlit-component-lib": "^2.0.0", "viem": "~2.21.55", + "react-scripts": "5.0.1", + "typescript": "5.5.2", + "@types/node": "^12.20.55", + "@types/react": "^16.14.62", + "@types/react-dom": "^16.9.25", "wagmi": "^2.14.1" }, "scripts": { - "start": "react-scripts start", - "build": "react-scripts build", - "test": "react-scripts test", + "dev": "GENERATE_SOURCEMAP=false react-scripts start", + "start": "GENERATE_SOURCEMAP=false react-scripts start", + "build": "GENERATE_SOURCEMAP=false react-scripts build", + "test": "react-scripts test --transformIgnorePatterns \"node_modules/(?!@rainbow-me)/\"", "eject": "react-scripts eject" }, "eslintConfig": { @@ -32,13 +38,5 @@ "last 1 safari version" ] }, - "homepage": ".", - "devDependencies": { - "@types/node": "^12.20.55", - "@types/react": "^16.14.62", - "@types/react-dom": "^16.9.25", - "react-scripts": "^5.0.1", - "tailwindcss": "^3.4.16", - "typescript": "5.5.2" - } + "homepage": "." } diff --git a/python_web3_wallet/frontend/src/index.tsx b/python_web3_wallet/frontend/src/index.tsx index cb44163..5dd47cc 100644 --- a/python_web3_wallet/frontend/src/index.tsx +++ b/python_web3_wallet/frontend/src/index.tsx @@ -3,7 +3,7 @@ import ReactDOM from "react-dom"; import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; import { getDefaultConfig, RainbowKitProvider } from "@rainbow-me/rainbowkit"; import { WagmiProvider } from "wagmi"; -import { Chain, gnosis, localhost } from "wagmi/chains"; +import { gnosis } from "wagmi/chains"; import PythonWeb3Wallet from "./PythonWeb3Wallet"; const queryClient = new QueryClient(); @@ -18,6 +18,8 @@ const queryClient = new QueryClient(); // }, // } as const satisfies Chain; +console.log('debug', process.env.REACT_APP_DEBUG_VARIABLE); + const config = getDefaultConfig({ appName: 'app', projectId: process.env.REACT_APP_RAINBOW_PROJECT_ID!, diff --git a/python_web3_wallet/frontend/yarn.lock b/python_web3_wallet/frontend/yarn.lock index c7390e7..5d3bbf4 100644 --- a/python_web3_wallet/frontend/yarn.lock +++ b/python_web3_wallet/frontend/yarn.lock @@ -8294,6 +8294,11 @@ node-addon-api@^7.0.0: resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-7.1.1.tgz#1aba6693b0f255258a049d621329329322aad558" integrity sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ== +node-env@^0.1.6: + version "0.1.6" + resolved "https://registry.yarnpkg.com/node-env/-/node-env-0.1.6.tgz#dc6570f0f912e58a9e7b72beeed2602ecfd63e21" + integrity sha512-rsDgeMTG8e5yRv4lllatqj/fKtMHt2H8RUQW1EuBL2p2t7Gbj8oa6MVns8v/f9a3Yl0IN5G2MurTc+E00V1qUw== + node-fetch-native@^1.6.4: version "1.6.4" resolved "https://registry.yarnpkg.com/node-fetch-native/-/node-fetch-native-1.6.4.tgz#679fc8fd8111266d47d7e72c379f1bed9acff06e" @@ -9703,7 +9708,7 @@ react-remove-scroll@2.6.0: use-callback-ref "^1.3.0" use-sidecar "^1.1.2" -react-scripts@^5.0.1: +react-scripts@5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/react-scripts/-/react-scripts-5.0.1.tgz#6285dbd65a8ba6e49ca8d651ce30645a6d980003" integrity sha512-8VAmEm/ZAwQzJ+GOMLbBsTdDKOpuZh7RPs0UymvBR2vRk4iZWCskjbFnxqjrzoIvlNNRZ3QJFx6/qDSi6zSnaQ== @@ -10876,7 +10881,7 @@ table-layout@^1.0.2: typical "^5.2.0" wordwrapjs "^4.0.0" -tailwindcss@^3.0.2, tailwindcss@^3.4.16: +tailwindcss@^3.0.2: version "3.4.16" resolved "https://registry.yarnpkg.com/tailwindcss/-/tailwindcss-3.4.16.tgz#35a7c3030844d6000fc271878db4096b6a8d2ec9" integrity sha512-TI4Cyx7gDiZ6r44ewaJmt0o6BrMCT5aK5e0rmJ/G9Xq3w7CX/5VXl/zIPEJZFUK5VEqwByyhqNPycPlvcK4ZNw==