Skip to content
This repository has been archived by the owner on Nov 10, 2023. It is now read-only.

Release 3.18.0 #3399

Merged
merged 57 commits into from
Feb 3, 2022
Merged

Release 3.18.0 #3399

merged 57 commits into from
Feb 3, 2022

Conversation

katspaugh
Copy link
Member

@katspaugh katspaugh commented Feb 1, 2022

Features

Fixes

Refactoring

Chores

Regression issues:

katspaugh and others added 30 commits January 12, 2022 16:20
* Feature: dark mode

* Rename to hi-contrast mode; keep network colors

* Invert 0.9
* Show a meaningful error message on Safe creation

* Fix MM error formatting
* chore: Change amount sent title

* chore: Add/fix broken test(s)

* fix: Change number checking logic
* Chore: break down createTransaction

* Notifications

* chore: Don't destructure props

* chore: Continued refactor `createdTransaction`

* Refactor more

* chore: Refactor processTx + cleanup createTx

* fix: Lint

* chore: Remove unreachable error handling

* Fix process

* Merge create and process tx

* Custom nonce or recommended nonce

* Exit when no wallet connection

* Adjust processTx

* Return null in getContractErrorMessage

* Don't propose when executing with sigs (see #3269)

* chore: safeInstance as public field + rename arg

* fix: Update status

* fix: Use safeInstance from this

* build: Instantiate TxSender with every transaction

* chore: Improve error logging

* chore: Add further error logging

Co-authored-by: katspaugh <381895+katspaugh@users.noreply.github.com>
Bumps [@openzeppelin/contracts](https://github.com/OpenZeppelin/openzeppelin-contracts) from 4.4.1 to 4.4.2.
- [Release notes](https://github.com/OpenZeppelin/openzeppelin-contracts/releases)
- [Changelog](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/CHANGELOG.md)
- [Commits](OpenZeppelin/openzeppelin-contracts@v4.4.1...v4.4.2)

---
updated-dependencies:
- dependency-name: "@openzeppelin/contracts"
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* fix: Map legacy subdomains to shortNames

* fix: Default shortName

* chore: Only set default shortName
…ient (#3273)

* pass current origin to the safe apps endpoint, add access controls to types

* pass current origin to the safe apps endpoint, add access controls to types

* update deps

* cmon javascript build ples

* fix param casing, update sdk

* Update build desktop app github action

Co-authored-by: Daniel Sanchez <daniel.sanchez@gnosis.pm>
* Build: create a hook for getting the recommended nonce

* Build: extract "can execute transaction" to a hook

* Build: remove unused return type

* Build: use "can execute" hook to retrieve condition to show the checkbox

* Refactor: use ComponentProps to get component types

* Fix: remove from tests logic extracted to hook

* refactor: refactor the useCanExecuteType to test the logic

* refactor: exclude the spending limit logic from useCanTxExecute

* refactor: use useCanTxExecute in other review modals

* fix: improve useCanTxExecute types and logic

* refactor: do not return isExecution from useEstimateTransactionGas

* fix: approve modal logic

* build: include PENDING_FAILED transactions in awaiting for execution

* build: flag execution to calculate tx gas

* build: include PENDING_FAILED tx status in showing execution tooltip and icon

* fix: adjust tests to reflect latest logic

* fix: add missing hook dependency

* fix: avoid race conditions when fetching from the backend

* fix: implement minor PR comments

* build: display the Execute checkbox if safe nonce is edited to be next

* fix: update tests to take manualSafeNonce

* fix: remove wrong check

* refactor: rename execution related variables

* fix: rename variable

* Obtain isOffChainSignature by calling a function instead of prop drilling

* Calculate tx gas even for off chain transactions

* fix TransactionFees rendering
Bumps [shelljs](https://github.com/shelljs/shelljs) from 0.8.4 to 0.8.5.
- [Release notes](https://github.com/shelljs/shelljs/releases)
- [Changelog](https://github.com/shelljs/shelljs/blob/master/CHANGELOG.md)
- [Commits](shelljs/shelljs@v0.8.4...v0.8.5)

---
updated-dependencies:
- dependency-name: shelljs
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Added camera access permission to the safe apps iframe

* fixed issue in the getSafeApps mocks to avoid make real http request during tests running
* Fix: xDai -> Gnosis Chain

* chore: Update deployment link

* Rm "Safe" from deployment links

* chore: Add /xdai to root routes

* chore: Extract root /xdai redirection

* build: Fixed xDai redirect + shortName root routes

* chore: Fix shortName, update deploy + shortName

* fix: shortName root routes + exact xDai redirect

* Rm prod check

Co-authored-by: iamacook <aaron.cook@gnosis.pm>
* chore: Update license year

* chore: Add license range
* fix: Execute depending on approval

* fix: Keep `isExecution` + move return logic

* fix: Use nonce from params
* build: Add ens domain to provider info

* feat: Add ens reverse lookup function

* fix: ENS Lookup only on account change

* chore: Cleanup code + add types

* fix: Tweak logic + add return type

* chore: Remove empty string constant

* fix: Compare against ChainId

* chore: Move resolver into try catch + compare strs

Co-authored-by: iamacook <aaron.cook@gnosis.pm>
* fix: Make tx data horizontally scrollable

* build: Automatically line break tx data if there is not enough space

* refactor: Use ValueWrapper in parent component

* refactor: Move ValueWrapper to parent component

* fix: Remove white-space nowrap from MethodDetails labels
* build: Basic DevTool structure

* style: Adjust layout for dev tools infos

* build: Add nextTransaction selector

* chore: Lazy import DevTools

* fix: Add suspense

* chore: Lazy load based on flag

* fix: Disable buttons when insufficient funds

* chore: Lazy import CGW toggle

* fix: Extract Safe address from URL

Co-authored-by: Usame Algan <usame.algan@gnosis.pm>
* Use Core SDK to disable Safe modules

* Use Core SDK to enable SpendingLimit module

* Fix title in Remove Module Modal

* Fix calculateSpendingLimit useEffect

* Update safe-core-sdk depency to v1.3.0
* build: Broadcast local status updates

* fix: Tests + rename key

* chore: Tweak BroadcastChannel test setup

* fix: Check if BroadcastChannel is supported

* fix: Tweak BroadcastChannel support
* refactor: rely on onboard for provider watching

* chore: remove key check

* fix: ENS support + notifications after full load

* feat: use fallthroughs + remove console error

* fix: reset web3 on wallet disconnection

* fix: wallet is loaded when one flag is true

* fix: default fallthrough logic

* chore: cleanup code structure

* fix: always dispatch wallet store actions
iamacook and others added 6 commits January 31, 2022 17:15
* fix: remove sidebar scroll behaviour

* fix: scroll to center
* fix: don't load devtools lazily

* fix: memoize dev tools
* refactor: use TxModalWrapper in ApproveTxModal

PR comments

Show only nonce when creating a multisig tx

Revert parametersStatus changes

Partially revert #3257 (it was buggy)

Rm snackbar

Onchain sig or execution

* Fix: pass tx nonce

* Fix 1/1 can execute

* parseFloat -> parseInt

* Check internal tx threshold, not current policy

* Pass calculated safeTxGas to useEstimateTransactionGas

Co-authored-by: Diogo Soares <diogo.soares@gnosis.pm>
@katspaugh katspaugh added this to the 3.18.0 milestone Feb 1, 2022
@github-actions
Copy link

github-actions bot commented Feb 1, 2022

ESLint Summary View Full Report

Annotations are provided inline on the Files Changed tab. You can also see all annotations that were generated on the annotations page.

Type Occurrences Fixable
Errors 0 0
Warnings 0 0
Ignored 16 N/A
  • Result: ✅ success
  • Annotations: 0 total

Report generated by eslint-plus-action

@coveralls
Copy link

coveralls commented Feb 1, 2022

Pull Request Test Coverage Report for Build 1788345920

  • 209 of 619 (33.76%) changed or added relevant lines in 95 files are covered.
  • 22 unchanged lines in 17 files lost coverage.
  • Overall coverage increased (+1.5%) to 33.65%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/components/AppLayout/Header/index.tsx 0 1 0.0%
src/components/AppLayout/index.tsx 0 1 0.0%
src/components/Modal/index.tsx 1 2 50.0%
src/components/SafeListSidebar/SafeList/SafeListItem.tsx 0 1 0.0%
src/logic/safe/store/middleware/notificationsMiddleware.ts 0 1 0.0%
src/logic/safe/transactions/offchainSigner/EIP712Signer.ts 2 3 66.67%
src/logic/safe/utils/spendingLimits.ts 1 2 50.0%
src/routes/CreateSafePage/steps/OwnersAndConfirmationsNewSafeStep.tsx 13 14 92.86%
src/routes/opening/index.tsx 0 1 0.0%
src/routes/safe/components/Apps/components/AddAppForm/index.tsx 0 1 0.0%
Files with Coverage Reduction New Missed Lines %
src/components/AppLayout/Sidebar/index.tsx 1 0%
src/logic/safe/store/actions/processTransaction.ts 1 3.45%
src/logic/safe/transactions/gas.ts 1 27.12%
src/routes/CreateSafePage/components/SafeCreationProcess.tsx 1 4.76%
src/routes/safe/components/Apps/components/SignMessageModal/ReviewMessage.tsx 1 76.19%
src/routes/safe/components/Settings/Advanced/ModulesTable.tsx 1 70.97%
src/routes/safe/components/Settings/Advanced/RemoveGuardModal.tsx 1 70.0%
src/routes/safe/components/Settings/ManageOwners/AddOwnerModal/index.tsx 1 0%
src/routes/safe/components/Transactions/helpers/EditTxParametersForm/index.tsx 1 18.52%
src/routes/safe/components/Transactions/TxList/ActionModal.tsx 1 5.56%
Totals Coverage Status
Change from base Build 1729738510: 1.5%
Covered Lines: 3166
Relevant Lines: 8447

💛 - Coveralls

@github-actions
Copy link

github-actions bot commented Feb 1, 2022

Deployment links

🟠 Rinkeby Mainnet 🟣 Polygon 🟡 BSC Arbitrum 🟢 Gnosis Chain

@github-actions
Copy link

github-actions bot commented Feb 1, 2022

E2E Tests Failed
Check the results here: https://github.com/gnosis/safe-react-e2e-tests/actions/runs/1788378288

Failed tests:

  • ❌ Add an existing safe Add an existing safe
  • ❌ Read-only transaction creation and review Read-only transaction creation and review

@JagoFigueroa
Copy link

JagoFigueroa commented Feb 1, 2022

Hola guys! I see that this is still an issue #3385 and is a critical fix for us on safe-apps for this release. Taking the liberty to add it to the list.

@katspaugh
Copy link
Member Author

@JagoFigueroa it's fixed, thanks for flagging 👍

@francovenica francovenica self-assigned this Feb 1, 2022
* style: form input error label and maxPrioFee placeholder

* Revert centering the form input error label

* Export DEFAULT_MAX_PRIO_FEE to be used as input placeholder and save value fallback

* Change minValue error label copy

* Change tests according to the error copy change
@francovenica
Copy link
Contributor

francovenica commented Feb 1, 2022

Testing the ticket #3284 in this PR, I wanted to see a tx with the tx data properly displayed, but the tx in this release branch has the raw data and the warning of "unexpected delegate call".
Can we check why in this PR is an unexpected delegate call? can it be some "prod flags" or something like that?

https://pr3399--safereact.review-safe.gnosisdev.com/app/eth:0x8675B754342754A30A2AeF474D114d8460bca19b/transactions/0xe46f2dfc2ec4a2b1c48dd58aefa8252dab4a096f47c5b7126f590ce37fa0d85a

@francovenica
Copy link
Contributor

Issue.
Testing the legacy redirect ("apps/#/safes/ADDRESS/balances") I tried a safe that is from rinkeby, and in this PR loads automatically in eth.
The issue is that, after failing to load in eth and showing you the error of "The safe couldn't be loaded, back to the main page" you go to the main page, but entering in the network again remembers this broken safe as a valid safe by default.
If a safe fails to load in the current network it should not be remembered as a default safe the next time you visit the network

Try https://pr3399--safereact.review-safe.gnosisdev.com/app/#/safes/0x9913B9180C20C6b0F21B6480c84422F6ebc4B808/balances
After failing to load go to the homepage
Re enter the eth chain using the top right network selector
The app will try to enter into this failed safe gain instead of ignoring it.

@iamacook
Copy link
Member

iamacook commented Feb 1, 2022

Can we check why in this PR is an unexpected delegate call? can it be some "prod flags" or something like that?

The delegate call is not marked as trusted (txData.trustedDelegateCallTarget) on production.

image

@iamacook
Copy link
Member

iamacook commented Feb 1, 2022

The issue is that, after failing to load in eth and showing you the error of "The safe couldn't be loaded, back to the main page" you go to the main page, but entering in the network again remembers this broken safe as a valid safe by default. If a safe fails to load in the current network it should not be remembered as a default safe the next time you visit the network

Can you add this as a separate issue please? It's storing the invalid Safe in the currentSession. I don't think this is critical to the release but a general bug.

@francovenica
Copy link
Contributor

The issue is that, after failing to load in eth and showing you the error of "The safe couldn't be loaded, back to the main page" you go to the main page, but entering in the network again remembers this broken safe as a valid safe by default. If a safe fails to load in the current network it should not be remembered as a default safe the next time you visit the network

Can you add this as a separate issue please? It's storing the invalid Safe in the currentSession. I don't think this is critical to the release but a general bug.

I agree is not critical, still kinda weird that it just broke. I'll report it separtedly

@francovenica
Copy link
Contributor

Ok, I went through every ticket in the list and those that can be tested are working fine.

I still have to finish the regression itself: sign tx in different devices and networks, check AB, owner administration, spending limit, NFT, etc.
I'll finish with that tomorrow

@francovenica
Copy link
Contributor

francovenica commented Feb 2, 2022

I'm having issues with Trezor. When I try to execute a tx in a safe where the trezor is NOT owner. The gas estimation always fail for that one
image

In a safe 1/x create a tx and leave it in queue
Connect with a trezor non-owner of that safe
Try to execute the tx
https://pr3399--safereact.review-safe.gnosisdev.com/app/rin:0xFfDC1BcdeC18b1196e7FA04246295DE3A17972Ac/transactions/0xaacd51a5b438c4595cfda6550f418fe73d621c9dafa5c33069738f435ec63a5e

@francovenica
Copy link
Contributor

The issue of non-owners was solved here and can be merged #3419

I didn't find anything else critical. (actually everything works pretty good)
The release looks good to go

Copy link
Member

@iamacook iamacook left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀🚀🚀

@katspaugh katspaugh merged commit fc89458 into main Feb 3, 2022
@katspaugh katspaugh deleted the release/3.18.0 branch February 3, 2022 08:28
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.