From e29bdd62c9550e421e93eca7aab4c36ea964336c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 21 Sep 2023 16:24:53 +0200 Subject: [PATCH 1/2] chore: bump @adobe/css-tools from 4.0.1 to 4.3.1 (#756) Bumps [@adobe/css-tools](https://github.com/adobe/css-tools) from 4.0.1 to 4.3.1. - [Changelog](https://github.com/adobe/css-tools/blob/main/History.md) - [Commits](https://github.com/adobe/css-tools/commits) --- updated-dependencies: - dependency-name: "@adobe/css-tools" dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index cb3c2a92..c6dbaada 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8,9 +8,9 @@ integrity sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA== "@adobe/css-tools@^4.0.1": - version "4.0.1" - resolved "https://registry.yarnpkg.com/@adobe/css-tools/-/css-tools-4.0.1.tgz#b38b444ad3aa5fedbb15f2f746dcd934226a12dd" - integrity sha512-+u76oB43nOHrF4DDWRLWDCtci7f3QJoEBigemIdIeTi1ODqjx6Tad9NCVnPRwewWlKkVab5PlK8DCtPTyX7S8g== + version "4.3.1" + resolved "https://registry.yarnpkg.com/@adobe/css-tools/-/css-tools-4.3.1.tgz#abfccb8ca78075a2b6187345c26243c1a0842f28" + integrity sha512-/62yikz7NLScCGAAST5SHdnjaDJQBDq0M2muyRTpf2VQhw6StBg2ALiu73zSJQ4fMVLA+0uBhBHAle7Wg+2kSg== "@adraffy/ens-normalize@1.9.0": version "1.9.0" From f2f9cb6f62e4b168d851e7f565b3e5208190200c Mon Sep 17 00:00:00 2001 From: Daniel <25051234+dasanra@users.noreply.github.com> Date: Thu, 21 Sep 2023 18:01:50 +0200 Subject: [PATCH 2/2] chore(tx-builder): remove gnosis-safe.io domain references (#758) --- .github/actions/release/action.yml | 3 + .github/workflows/safe-apps-e2e.yml | 2 +- apps/tx-builder/src/App.tsx | 4 - .../src/components/Banner/index.tsx | 109 ------------------ .../src/components/Banner/styles.module.css | 30 ----- apps/tx-builder/src/utils.ts | 8 -- cypress/support/e2e.js | 1 - 7 files changed, 4 insertions(+), 153 deletions(-) delete mode 100644 apps/tx-builder/src/components/Banner/index.tsx delete mode 100644 apps/tx-builder/src/components/Banner/styles.module.css diff --git a/.github/actions/release/action.yml b/.github/actions/release/action.yml index f349231f..81e1ff8e 100644 --- a/.github/actions/release/action.yml +++ b/.github/actions/release/action.yml @@ -33,6 +33,9 @@ inputs: react-app-mmi-environment: description: MMI environment required: true + react-app-walletconnect-project-id: + description: WalletConnect Project ID + required: true runs: using: composite diff --git a/.github/workflows/safe-apps-e2e.yml b/.github/workflows/safe-apps-e2e.yml index 05d3fa59..82532b32 100644 --- a/.github/workflows/safe-apps-e2e.yml +++ b/.github/workflows/safe-apps-e2e.yml @@ -61,7 +61,7 @@ jobs: - name: Set main Safe Apps base URL run: | - echo "SAFE_APPS_BASE_URL=https://apps.gnosis-safe.io" >> $GITHUB_ENV + echo "SAFE_APPS_BASE_URL=https://apps-portal.safe.global" >> $GITHUB_ENV if: ${{ github.ref == 'refs/heads/main' || github.event.schedule == '0 9 * * 1-5' }} - name: Checkout safe-react-apps diff --git a/apps/tx-builder/src/App.tsx b/apps/tx-builder/src/App.tsx index bb2ac896..1bbd5ed5 100644 --- a/apps/tx-builder/src/App.tsx +++ b/apps/tx-builder/src/App.tsx @@ -14,7 +14,6 @@ import { SAVE_BATCH_PATH, TRANSACTION_LIBRARY_PATH, } from './routes/routes' -import Banner from './components/Banner' const App = () => { return ( @@ -41,9 +40,6 @@ const App = () => { {/* Transaction Library Screen */} } /> - - {/* Banner */} - ) } diff --git a/apps/tx-builder/src/components/Banner/index.tsx b/apps/tx-builder/src/components/Banner/index.tsx deleted file mode 100644 index 609b4efe..00000000 --- a/apps/tx-builder/src/components/Banner/index.tsx +++ /dev/null @@ -1,109 +0,0 @@ -import { useEffect, useState } from 'react' -import { IconButton, Paper } from '@material-ui/core' -import CloseIcon from '@material-ui/icons/Close' -import styled from 'styled-components' -import { Button, Icon, Link, Text, Title } from '@gnosis.pm/safe-react-components' -import { exportBatches } from '../../lib/batches' -import { OLD_TX_BUILDER_URL, NEW_TX_BUILDER_URL, isOldDomain } from '../../utils' -import { localItem } from '../../lib/local-storage/local' -import css from './styles.module.css' -import { useSafeAppsSDK } from '@safe-global/safe-apps-react-sdk' - -const LS_KEY = 'rememberExportedBatches' - -type DialogProps = { - safe: string - networkPrefix: string - onClose?: () => void -} - -const openSafeApp = (safe: string, networkPrefix: string, safeAppUrl: string) => { - window.open( - `https://app.safe.global/apps/open?safe=${networkPrefix}:${safe}&appUrl=${safeAppUrl}`, - '_blank', - ) -} - -const NewDomainBody = ({ safe, networkPrefix, onClose }: DialogProps) => ( - <> - - Please make sure to migrate all transaction batches from the{' '} - openSafeApp(safe, networkPrefix, OLD_TX_BUILDER_URL)} size="xl"> - old Transaction Builder - {' '} - before 1st September. - - - -) - -const OldDomainBody = ({ safe, networkPrefix }: DialogProps) => ( - <> - - Please make sure to export all transaction batches before 1st September in order to import - them in the{' '} - openSafeApp(safe, networkPrefix, NEW_TX_BUILDER_URL)} size="xl"> - new Transaction Builder - - . - - - -) - -const Banner = () => { - const { safe, sdk } = useSafeAppsSDK() - const storedValue = localItem(LS_KEY).get() - const [showBanner, setShowBanner] = useState(storedValue ?? true) - const [networkPrefix, setNetworkPrefix] = useState('') - - const handleClose = () => { - setShowBanner(false) - localItem(LS_KEY).set(false) - } - - useEffect(() => { - ;(async () => { - try { - const { shortName } = await sdk.safe.getChainInfo() - - setNetworkPrefix(shortName) - } catch (e) { - console.error('Unable to get chain info:', e) - } - })() - }, [sdk]) - - return showBanner ? ( - -
- - - - -
- - New Transaction Builder domain - - {isOldDomain ? ( - - ) : ( - - )} -
- ) : null -} - -export default Banner - -const StyledTitle = styled(Title)` - margin: 16px 0 8px; -` diff --git a/apps/tx-builder/src/components/Banner/styles.module.css b/apps/tx-builder/src/components/Banner/styles.module.css deleted file mode 100644 index 8d3b5e95..00000000 --- a/apps/tx-builder/src/components/Banner/styles.module.css +++ /dev/null @@ -1,30 +0,0 @@ -.wrapper { - position: fixed; - bottom: 24px; - right: 24px; - width: 478px; - padding: 24px; - z-index: 1400; - border-radius: 8px; -} - -.header { - margin-bottom: 8px; - display: flex; - justify-content: space-between; - align-items: flex-start; -} - -.header :global .MuiIconButton-root { - margin-right: -8px; -} - -.infoIcon svg { - width: 32px; - height: 32px; -} - -.description { - text-align: justify !important; - margin-bottom: 16px !important; -} diff --git a/apps/tx-builder/src/utils.ts b/apps/tx-builder/src/utils.ts index f1fbfc69..f4155dff 100644 --- a/apps/tx-builder/src/utils.ts +++ b/apps/tx-builder/src/utils.ts @@ -282,11 +282,3 @@ export const evalTemplate = (templateUri: string, data: Record): const TEMPLATE_REGEX = /\{\{([^}]+)\}\}/g return templateUri.replace(TEMPLATE_REGEX, (_: string, key: string) => data[key]) } - -const OLD_BASE_URL = 'https://apps.gnosis-safe.io' -export const OLD_TX_BUILDER_URL = `${OLD_BASE_URL}/tx-builder` - -const NEW_BASE_URL = 'https://apps-portal.safe.global' -export const NEW_TX_BUILDER_URL = `${NEW_BASE_URL}/tx-builder` - -export const isOldDomain = decodeURIComponent(window.location.href).includes(OLD_TX_BUILDER_URL) diff --git a/cypress/support/e2e.js b/cypress/support/e2e.js index 29658647..5e2bd1b0 100644 --- a/cypress/support/e2e.js +++ b/cypress/support/e2e.js @@ -15,7 +15,6 @@ if (drainSafeUrl && drainSafeUrl.includes('safereactapps.review-react-hr.5afe.de warningCheckedCustomApps.push(new URL(drainSafeUrl).origin) } else { warningCheckedCustomApps = [ - 'https://apps.gnosis-safe.io', 'https://safe-apps.dev.5afe.dev', 'https://apps-portal.safe.global', ]