Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 1.16.0 #2366

Merged
merged 30 commits into from
Aug 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
e1eadbc
feat: add "Transaction is executed" to success
iamacook Jul 31, 2023
dac1fea
Revert "feat: add "Transaction is executed" to success"
iamacook Jul 31, 2023
d86bacd
Fix: mobile pairing check (#2327)
katspaugh Jul 31, 2023
c031735
feat: add "Transaction is executed" to stepper (#2328)
iamacook Jul 31, 2023
793cd98
fix: replacement nonce dropdown style (#2318)
iamacook Jul 31, 2023
1a48103
fix: don't close flow in Safe Apps (#2333)
iamacook Aug 1, 2023
65d2663
feat: add Plausible Analytics to privacy policy (#2336)
iamacook Aug 1, 2023
9fd937a
fix: execute icon colour in dark mode (#2338)
iamacook Aug 1, 2023
e78930a
fix: Reopen QR modal in safe creation (#2294)
usame-algan Aug 1, 2023
2658166
feat: Safe App info button (#1726)
iamacook Aug 2, 2023
657da0f
Fix: warn if tx was already signed by connected wallet (#2322)
katspaugh Aug 2, 2023
661bafd
Feat: batch any tx (#2254)
katspaugh Aug 2, 2023
1db9568
Feat: show delegates (#2324)
katspaugh Aug 2, 2023
e99b511
fix: `useAsync` dependency arrays (#2291)
iamacook Aug 3, 2023
3410911
Feat: emoji identicons (#2305)
katspaugh Aug 4, 2023
beae29d
Refactor: onboard auto connect (#2343)
katspaugh Aug 4, 2023
bd9118c
fix: Open custom safe apps on click (#2350)
usame-algan Aug 7, 2023
8826af3
Fix: prevent key prop warning in EthHashInfo (#2351)
katspaugh Aug 7, 2023
d88bb03
Chore: rm Plausible Analytics script (#2346)
katspaugh Aug 7, 2023
7556391
fix: limit `origin` length (#2334)
iamacook Aug 7, 2023
3fbb439
Fix: tx can have been created w/o signatures (#2354)
katspaugh Aug 7, 2023
e3c0e31
Fix: cookie prefs checked checkbox color (#2356)
katspaugh Aug 7, 2023
425cf08
Fix: prevent an early redirect on the Safe Apps share page (#2358)
katspaugh Aug 8, 2023
7eedd71
fix: Replace transaction with 0 nonce (#2361)
usame-algan Aug 8, 2023
0be8488
fix: Use PNG instead of SVG for Redefine logo (#2362)
usame-algan Aug 8, 2023
90bdb23
Refactor: fetch pending queue only in 1/N Safes (#2353)
katspaugh Aug 8, 2023
84b6419
v1.16.0
katspaugh Aug 8, 2023
9750cec
feat: pending safes per chainId (#2295)
schmanu Aug 8, 2023
3d2ba01
Fix: extend the emoji set for eth addresses (#2368)
katspaugh Aug 8, 2023
402fde0
Fix: limit emoji avatars to owned Safes (#2376)
katspaugh Aug 10, 2023
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: 7 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@
"@next/next/no-img-element": "off",
"unused-imports/no-unused-imports-ts": "error",
"@typescript-eslint/consistent-type-imports": "error",
"no-constant-condition": "warn"
"no-constant-condition": "warn",
"react-hooks/exhaustive-deps": [
"warn",
{
"additionalHooks": "useAsync"
}
]
},
"ignorePatterns": ["node_modules/", ".next/", ".github/"],
"plugins": ["unused-imports", "@typescript-eslint"]
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,4 @@ yalc.lock
/public/sw.js.map
/public/workbox-*.js
/public/workbox-*.js.map
/public/fallback*
2 changes: 0 additions & 2 deletions cypress/e2e/add_owner.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ const offset = 7

describe('Adding an owner', () => {
before(() => {
cy.connectE2EWallet()

cy.visit(`/${TEST_SAFE}/settings/setup`)
cy.contains('button', 'Accept selection').click()

Expand Down
2 changes: 0 additions & 2 deletions cypress/e2e/create_safe.cy.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
describe('Create Safe', () => {
it('should create a new Safe', () => {
cy.connectE2EWallet()

cy.visit('/welcome')

// Close cookie banner
Expand Down
2 changes: 0 additions & 2 deletions cypress/e2e/non_owner_spending_limit.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ const SPENDING_LIMIT_SAFE = 'gor:0xBE3C5aFF7f66c23fe71c3047911f9Aa0026b281B'

describe('Check non-owner spending limit beneficiary modal', () => {
before(() => {
cy.connectE2EWallet()

cy.visit(`/${SPENDING_LIMIT_SAFE}/home`, { failOnStatusCode: false })

cy.contains('Accept selection').click()
Expand Down
2 changes: 0 additions & 2 deletions cypress/e2e/smoke/create_safe_simple.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ const OWNER_ADDRESS = '0xE297437d6b53890cbf004e401F3acc67c8b39665'

describe('Create Safe form', () => {
it('should navigate to the form', () => {
cy.connectE2EWallet()

cy.visit('/welcome')

// Close cookie banner
Expand Down
9 changes: 5 additions & 4 deletions cypress/e2e/smoke/create_tx.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ const currentNonce = 3

describe('Queue a transaction on 1/N', () => {
before(() => {
cy.connectE2EWallet()
cy.useProdCGW()

cy.visit(`/home?safe=${SAFE}`)
Expand Down Expand Up @@ -59,6 +58,8 @@ describe('Queue a transaction on 1/N', () => {
it('should create a queued transaction', () => {
cy.get('button[type="submit"]').should('not.be.disabled')

cy.wait(1000)

cy.contains('Native token transfer').should('be.visible')

// Changes nonce to next one
Expand All @@ -69,7 +70,7 @@ describe('Queue a transaction on 1/N', () => {
cy.contains('Estimated fee').should('exist')

// Asserting the sponsored info is present
cy.contains('Execute').should('be.visible')
cy.contains('Execute').scrollIntoView().should('be.visible')

cy.get('span').contains('Estimated fee').next().should('have.css', 'text-decoration-line', 'line-through')
cy.contains('Transactions per hour')
Expand All @@ -96,14 +97,14 @@ describe('Queue a transaction on 1/N', () => {
cy.get('@Paramsform').submit()

// Asserts the execute checkbox is uncheckable
cy.contains('No, only').click()
cy.contains('No, later').click()

cy.get('input[name="nonce"]')
.clear({ force: true })
.type(currentNonce + 10, { force: true })
.type('{enter}', { force: true })

cy.contains('Submit').click()
cy.contains('Sign').click()
})

it('should click the notification and see the transaction queued', () => {
Expand Down
4 changes: 1 addition & 3 deletions cypress/e2e/smoke/nfts.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ const TEST_SAFE = 'gor:0x97d314157727D517A706B5D08507A1f9B44AaaE9'

describe('Assets > NFTs', () => {
before(() => {
cy.connectE2EWallet()

cy.visit(`/balances/nfts?safe=${TEST_SAFE}`)
cy.contains('button', 'Accept selection').click()
cy.contains(/E2E Wallet @ G(ö|oe)rli/)
Expand Down Expand Up @@ -84,7 +82,7 @@ describe('Assets > NFTs', () => {
cy.contains('1')
cy.contains('2')
cy.get('b:contains("safeTransferFrom")').should('have.length', 2)
cy.contains('button:not([disabled])', 'Submit')
cy.contains('button:not([disabled])', 'Execute')
})
})
})
2 changes: 0 additions & 2 deletions cypress/e2e/smoke/pending_actions.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ const SAFE = 'gor:0xCD4FddB8FfA90012DFE11eD4bf258861204FeEAE'

describe('Pending actions', () => {
before(() => {
cy.connectE2EWallet()
cy.useProdCGW()

cy.visit(`/welcome`)
cy.contains('button', 'Accept selection').click()
})
Expand Down
2 changes: 0 additions & 2 deletions cypress/e2e/spending_limit.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ const SPENDING_LIMIT_SAFE = 'gor:0x28F95E682D1dd632b54Dc61740575f49DB39Eb7F'

describe('Check spending limit modal', () => {
before(() => {
cy.connectE2EWallet()

cy.visit(`/${SPENDING_LIMIT_SAFE}/home`, { failOnStatusCode: false })

cy.contains('Accept selection').click()
Expand Down
2 changes: 0 additions & 2 deletions cypress/e2e/tx_modal.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ const SAFE_NONCE = '6'

describe('Tx Modal', () => {
before(() => {
cy.connectE2EWallet()

// Open the Safe used for testing
cy.visit(`/${TEST_SAFE}`)
cy.contains('a', 'Accept selection').click()
Expand Down
2 changes: 0 additions & 2 deletions cypress/e2e/tx_simulation.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ const RECIPIENT_ADDRESS = '0x6a5602335a878ADDCa4BF63a050E34946B56B5bC'

describe('Tx Simulation', () => {
before(() => {
cy.connectE2EWallet()

// Open the Safe used for testing
cy.visit(`/${TEST_SAFE}/home`, { failOnStatusCode: false })
cy.contains('button', 'Accept selection').click()
Expand Down
7 changes: 0 additions & 7 deletions cypress/support/commands.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
Cypress.Commands.add('connectE2EWallet', () => {
cy.on('window:before:load', (window) => {
// Does not work unless `JSON.stringify` is used
window.localStorage.setItem('SAFE_v2__lastWallet', JSON.stringify('E2E Wallet'))
})
})

Cypress.Commands.add('useProdCGW', () => {
cy.on('window:before:load', (window) => {
window.localStorage.setItem('SAFE_v2__debugProdCgw', JSON.stringify(true))
Expand Down
11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"homepage": "https://github.com/safe-global/safe-wallet-web",
"license": "GPL-3.0",
"type": "module",
"version": "1.15.2",
"version": "1.16.0",
"scripts": {
"dev": "next dev",
"start": "next dev",
Expand Down Expand Up @@ -41,18 +41,18 @@
"@emotion/react": "^11.10.0",
"@emotion/server": "^11.10.0",
"@emotion/styled": "^11.10.0",
"@mui/icons-material": "^5.8.4",
"@mui/material": "^5.13.5",
"@mui/icons-material": "^5.14.3",
"@mui/material": "^5.14.3",
"@mui/x-date-pickers": "^5.0.12",
"@reduxjs/toolkit": "^1.9.5",
"@safe-global/safe-apps-sdk": "7.11.0",
"@safe-global/safe-core-sdk": "^3.3.4",
"@safe-global/safe-core-sdk-utils": "^1.7.4",
"@safe-global/safe-deployments": "^1.25.0",
"@safe-global/safe-ethers-lib": "^1.9.4",
"@safe-global/safe-gateway-typescript-sdk": "^3.7.3",
"@safe-global/safe-gateway-typescript-sdk": "^3.8.0",
"@safe-global/safe-modules-deployments": "^1.0.0",
"@safe-global/safe-react-components": "^2.0.5",
"@safe-global/safe-react-components": "^2.0.6",
"@sentry/react": "^7.28.1",
"@sentry/tracing": "^7.28.1",
"@truffle/hdwallet-provider": "^2.1.4",
Expand All @@ -69,6 +69,7 @@
"ethereum-blockies-base64": "^1.0.2",
"ethers": "5.7.2",
"exponential-backoff": "^3.1.0",
"framer-motion": "^10.13.1",
"fuse.js": "^6.6.2",
"js-cookie": "^3.0.1",
"lodash": "^4.17.21",
Expand Down
4 changes: 4 additions & 0 deletions public/images/common/batch.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions public/images/common/drag.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions public/images/common/empty-batch.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions public/images/common/success.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/transactions/redefine-dark-mode.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
38 changes: 0 additions & 38 deletions public/images/transactions/redefine-dark-mode.svg

This file was deleted.

Binary file added public/images/transactions/redefine.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion public/images/transactions/redefine.svg

This file was deleted.

4 changes: 4 additions & 0 deletions src/components/balances/AssetsTable/index.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ describe('AssetsTable', () => {
onChainSigning: false,
},
transactionExecution: true,
addressEmojis: false,
},
},
})
Expand Down Expand Up @@ -215,6 +216,7 @@ describe('AssetsTable', () => {
onChainSigning: false,
},
transactionExecution: true,
addressEmojis: false,
},
},
})
Expand Down Expand Up @@ -317,6 +319,7 @@ describe('AssetsTable', () => {
onChainSigning: false,
},
transactionExecution: true,
addressEmojis: false,
},
},
})
Expand Down Expand Up @@ -416,6 +419,7 @@ describe('AssetsTable', () => {
onChainSigning: false,
},
transactionExecution: true,
addressEmojis: false,
},
},
})
Expand Down
1 change: 1 addition & 0 deletions src/components/balances/HiddenTokenButton/index.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ describe('HiddenTokenToggle', () => {
onChainSigning: false,
},
transactionExecution: true,
addressEmojis: false,
},
},
})
Expand Down
61 changes: 61 additions & 0 deletions src/components/batch/BatchIndicator/BatchTooltip.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
import { type ReactElement, useEffect, useState } from 'react'
import { Box, SvgIcon } from '@mui/material'
import Tooltip, { type TooltipProps, tooltipClasses } from '@mui/material/Tooltip'
import { styled } from '@mui/material/styles'
import SuccessIcon from '@/public/images/common/success.svg'
import { TxEvent, txSubscribe } from '@/services/tx/txEvents'

const StyledTooltip = styled(({ className, ...props }: TooltipProps) => (
<Tooltip {...props} classes={{ popper: className }} />
))(({ theme }) => ({
[`& .${tooltipClasses.tooltip}`]: {
backgroundColor: theme.palette.background.paper,
color: theme.palette.text.primary,
fontSize: theme.typography.pxToRem(16),
fontWeight: 700,
border: `1px solid ${theme.palette.border.light}`,
marginTop: theme.spacing(2) + ' !important',
},
[`& .${tooltipClasses.arrow}`]: {
color: theme.palette.background.paper,
},
[`& .${tooltipClasses.arrow}:before`]: {
border: `1px solid ${theme.palette.border.light}`,
},
}))

const BatchTooltip = ({ children }: { children: ReactElement }) => {
const [showTooltip, setShowTooltip] = useState<boolean>(false)

// Click outside to close the tooltip
useEffect(() => {
const handleClickOutside = () => setShowTooltip(false)
document.addEventListener('click', handleClickOutside)
return () => document.removeEventListener('click', handleClickOutside)
}, [])

// Show tooltip when tx is added to batch
useEffect(() => {
return txSubscribe(TxEvent.BATCH_ADD, () => setShowTooltip(true))
}, [])

return (
<StyledTooltip
open={showTooltip}
onClose={() => setShowTooltip(false)}
arrow
title={
<Box display="flex" flexDirection="column" alignItems="center" p={2} gap={2}>
<Box fontSize="53px">
<SvgIcon component={SuccessIcon} inheritViewBox fontSize="inherit" />
</Box>
Transaction is added to batch
</Box>
}
>
<div>{children}</div>
</StyledTooltip>
)
}

export default BatchTooltip
24 changes: 24 additions & 0 deletions src/components/batch/BatchIndicator/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { Badge, ButtonBase, SvgIcon } from '@mui/material'
import BatchIcon from '@/public/images/common/batch.svg'
import { useDraftBatch } from '@/hooks/useDraftBatch'
import Track from '@/components/common/Track'
import { BATCH_EVENTS } from '@/services/analytics'
import BatchTooltip from './BatchTooltip'

const BatchIndicator = ({ onClick }: { onClick?: () => void }) => {
const { length } = useDraftBatch()

return (
<BatchTooltip>
<Track {...BATCH_EVENTS.BATCH_SIDEBAR_OPEN} label={length}>
<ButtonBase onClick={onClick} sx={{ p: 0.5 }}>
<Badge variant="standard" color="secondary" badgeContent={length}>
<SvgIcon component={BatchIcon} inheritViewBox fontSize="small" />
</Badge>
</ButtonBase>
</Track>
</BatchTooltip>
)
}

export default BatchIndicator
Loading
Loading