Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev' into feat/eip5792-update
Browse files Browse the repository at this point in the history
  • Loading branch information
schmanu committed May 30, 2024
2 parents f5e0527 + 3da9a4e commit 97d8ce7
Show file tree
Hide file tree
Showing 117 changed files with 875 additions and 5,317 deletions.
24 changes: 10 additions & 14 deletions .github/workflows/deploy-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,21 +51,17 @@ jobs:

# Update the GitHub release with a checksummed archive
- name: Upload archive
uses: actions/upload-release-asset@v1
- uses: Shopify/upload-[email protected]
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ env.ARCHIVE_NAME }}.tar.gz
asset_name: ${{ env.ARCHIVE_NAME }}.tar.gz
asset_content_type: application/gzip
env:
GITHUB_TOKEN: ${{ github.token }}
path: ${{ env.ARCHIVE_NAME }}.tar.gz
name: ${{ env.ARCHIVE_NAME }}.tar.gz
content-type: application/gzip
repo-token: ${{ github.token }}

- name: Upload checksum
uses: actions/upload-release-asset@v1
uses: Shopify/upload-[email protected]
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ env.ARCHIVE_NAME }}-sha256-checksum.txt
asset_name: ${{ env.ARCHIVE_NAME }}-sha256-checksum.txt
asset_content_type: text/plain
env:
GITHUB_TOKEN: ${{ github.token }}
path: ${{ env.ARCHIVE_NAME }}-sha256-checksum.txt
name: ${{ env.ARCHIVE_NAME }}-sha256-checksum.txt
content-type: text/plain
repo-token: ${{ github.token }}
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ Here's the list of all the environment variables:
| `NEXT_PUBLIC_FIREBASE_VAPID_KEY_PRODUCTION` | FCM vapid key on production
| `NEXT_PUBLIC_FIREBASE_OPTIONS_STAGING` | FCM `initializeApp` options on staging
| `NEXT_PUBLIC_FIREBASE_VAPID_KEY_STAGING` | FCM vapid key on staging
| `NEXT_PUBLIC_SOCIAL_WALLET_OPTIONS_PRODUCTION` | Web3Auth and Google credentials (production)
| `NEXT_PUBLIC_SOCIAL_WALLET_OPTIONS_STAGING` | Web3Auth and Google credentials (staging)
| `NEXT_PUBLIC_SPINDL_SDK_KEY` | [Spindl](http://spindl.xyz) SDK key

If you don't provide some of the variables, the corresponding features will be disabled in the UI.
Expand Down
16 changes: 0 additions & 16 deletions cypress/e2e/pages/create_wallet.pages.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,22 +87,6 @@ export function verifySponsorMessageIsPresent() {
cy.get(networkFeeSection).contains(sponsorStr).should('exist')
}

export function verifyGoogleConnectBtnIsDisabled() {
cy.get(googleConnectBtn).should('be.disabled')
}

export function verifyGoogleConnectBtnIsEnabled() {
cy.get(googleConnectBtn).should('not.be.disabled')
}

export function verifyGoogleSignin() {
return cy.get(googleSignedinBtn).should('exist')
}

export function verifyGoogleAccountInfoInHeader() {
return cy.get(accountInfoHeader).should('exist')
}

export function verifyPolicy1_1() {
cy.contains(policy1_2).should('exist')
// TOD: Need data-cy for containers
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/pages/owners.pages.js
Original file line number Diff line number Diff line change
Expand Up @@ -242,5 +242,5 @@ export function verifyThreshold(startValue, endValue) {
cy.get(thresholdInput).parent().click()
cy.get(thresholdList).contains(endValue).should('be.visible')
cy.get(thresholdList).find('li').should('have.length', endValue)
cy.get('body').click()
cy.get('body').click({ force: true })
}
53 changes: 0 additions & 53 deletions cypress/e2e/regression/create_safe_google.cy.js

This file was deleted.

2 changes: 1 addition & 1 deletion cypress/support/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export const getPermissionsUrl = '/get-permissions'
export const appSettingsUrl = '/settings/safe-apps'
export const setupUrl = '/settings/setup?safe='
export const dataSettingsUrl = '/settings/data?safe='
export const securityUrl = '/settings/security-login?safe='
export const securityUrl = '/settings/setup?safe='
export const invalidAppUrl = 'https://my-invalid-custom-app.com/manifest.json'
export const validAppUrlJson = 'https://my-valid-custom-app.com/manifest.json'
export const validAppUrl = 'https://my-valid-custom-app.com'
Expand Down
8 changes: 2 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "safe-wallet-web",
"homepage": "https://github.com/safe-global/safe-wallet-web",
"license": "GPL-3.0",
"version": "1.36.5",
"version": "1.37.0",
"type": "module",
"scripts": {
"dev": "next dev",
Expand Down Expand Up @@ -62,7 +62,6 @@
"@safe-global/safe-modules-deployments": "^1.2.0",
"@sentry/react": "^7.91.0",
"@spindl-xyz/attribution-lite": "^1.4.0",
"@tkey-mpc/common-types": "^8.2.2",
"@truffle/hdwallet-provider": "^2.1.4",
"@walletconnect/utils": "^2.13.1",
"@walletconnect/web3wallet": "^1.12.1",
Expand All @@ -73,20 +72,17 @@
"@web3-onboard/ledger": "2.3.2",
"@web3-onboard/trezor": "^2.4.2",
"@web3-onboard/walletconnect": "^2.5.4",
"@web3auth/mpc-core-kit": "^1.1.3",
"blo": "^1.1.1",
"bn.js": "^5.2.1",
"classnames": "^2.3.1",
"date-fns": "^2.30.0",
"ethers": "^6.11.1",
"exponential-backoff": "^3.1.0",
"firebase": "^10.3.1",
"framer-motion": "^10.13.1",
"fuse.js": "^6.6.2",
"idb-keyval": "^6.2.1",
"js-cookie": "^3.0.1",
"lodash": "^4.17.21",
"next": "^14.1.0",
"next": "^14.1.1",
"papaparse": "^5.3.2",
"qrcode.react": "^3.1.0",
"react": "^18.2.0",
Expand Down
9 changes: 7 additions & 2 deletions src/components/balances/AssetsHeader/index.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
import type { ReactElement, ReactNode } from 'react'
import { useMemo, type ReactElement, type ReactNode } from 'react'

import NavTabs from '@/components/common/NavTabs'
import PageHeader from '@/components/common/PageHeader'
import { balancesNavItems } from '@/components/sidebar/SidebarNavigation/config'

import css from '@/components/common/PageHeader/styles.module.css'
import { useCurrentChain } from '@/hooks/useChains'
import { isRouteEnabled } from '@/utils/chains'

const AssetsHeader = ({ children }: { children?: ReactNode }): ReactElement => {
const chain = useCurrentChain()
const navItems = useMemo(() => balancesNavItems.filter((item) => isRouteEnabled(item.href, chain)), [chain])

return (
<PageHeader
title="Assets"
action={
<div className={css.pageHeader}>
<div className={css.navWrapper}>
<NavTabs tabs={balancesNavItems} />
<NavTabs tabs={navItems} />
</div>
{children && <div className={css.actionsWrapper}>{children}</div>}
</div>
Expand Down
33 changes: 0 additions & 33 deletions src/components/batch/BatchSidebar/BatchReorder.tsx

This file was deleted.

25 changes: 2 additions & 23 deletions src/components/batch/BatchSidebar/BatchTxItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { type DraftBatchItem } from '@/store/batchSlice'
import TxType from '@/components/transactions/TxType'
import TxInfo from '@/components/transactions/TxInfo'
import DeleteIcon from '@/public/images/common/delete.svg'
import DragIcon from '@/public/images/common/drag.svg'
import TxData from '@/components/transactions/TxDetails/TxData'
import { MethodDetails } from '@/components/transactions/TxDetails/TxData/DecodedData/MethodDetails'
import { TxDataRow } from '@/components/transactions/TxDetails/Summary/TxDataRow'
Expand All @@ -17,19 +16,9 @@ type BatchTxItemProps = DraftBatchItem & {
id: string
count: number
onDelete?: (id: string) => void
draggable?: boolean
dragging?: boolean
}

const BatchTxItem = ({
id,
count,
timestamp,
txDetails,
onDelete,
dragging = false,
draggable = false,
}: BatchTxItemProps) => {
const BatchTxItem = ({ id, count, timestamp, txDetails, onDelete }: BatchTxItemProps) => {
const txSummary = useMemo(
() => ({
timestamp,
Expand Down Expand Up @@ -61,18 +50,8 @@ const BatchTxItem = ({
<div className={css.number}>{count}</div>

<Accordion elevation={0} sx={{ flex: 1 }} onChange={handleExpand}>
<AccordionSummary expandIcon={<ExpandMoreIcon />} disabled={dragging} className={css.accordion}>
<AccordionSummary expandIcon={<ExpandMoreIcon />} className={css.accordion}>
<Box flex={1} display="flex" alignItems="center" gap={2} py={0.4} width="100%">
{draggable && (
<SvgIcon
component={DragIcon}
inheritViewBox
fontSize="small"
className={css.dragHandle}
onClick={(e: MouseEvent) => e.stopPropagation()}
/>
)}

<TxType tx={txSummary} />

<Box flex={1}>
Expand Down
8 changes: 3 additions & 5 deletions src/components/batch/BatchSidebar/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { type SyntheticEvent, useEffect } from 'react'
import { useCallback, useContext } from 'react'
import dynamic from 'next/dynamic'
import { Button, Divider, Drawer, IconButton, SvgIcon, Typography } from '@mui/material'
import CloseIcon from '@mui/icons-material/Close'
import { useDraftBatch, useUpdateBatch } from '@/hooks/useDraftBatch'
Expand All @@ -13,13 +12,12 @@ import { BATCH_EVENTS } from '@/services/analytics'
import CheckWallet from '@/components/common/CheckWallet'
import PlusIcon from '@/public/images/common/plus.svg'
import EmptyBatch from './EmptyBatch'

const BatchReorder = dynamic(() => import('./BatchReorder'))
import BatchTxList from './BatchTxList'

const BatchSidebar = ({ isOpen, onToggle }: { isOpen: boolean; onToggle: (open: boolean) => void }) => {
const { txFlow, setTxFlow } = useContext(TxModalContext)
const batchTxs = useDraftBatch()
const [, deleteTx, onReorder] = useUpdateBatch()
const [, deleteTx] = useUpdateBatch()

const closeSidebar = useCallback(() => {
onToggle(false)
Expand Down Expand Up @@ -73,7 +71,7 @@ const BatchSidebar = ({ isOpen, onToggle }: { isOpen: boolean; onToggle: (open:
{batchTxs.length ? (
<>
<div className={css.txs}>
<BatchReorder txItems={batchTxs} onDelete={deleteTx} onReorder={onReorder} />
<BatchTxList txItems={batchTxs} onDelete={deleteTx} />
</div>

<CheckWallet>
Expand Down
Loading

0 comments on commit 97d8ce7

Please sign in to comment.