diff --git a/.github/workflows/do-not-merge.yml b/.github/workflows/do-not-merge.yml new file mode 100644 index 000000000..1315a282b --- /dev/null +++ b/.github/workflows/do-not-merge.yml @@ -0,0 +1,17 @@ +# Fails the pull request if it has the "DO-NOT-MERGE" label + +name: Check "DO-NOT-MERGE" label + +on: + pull_request: + types: [opened, reopened, labeled, unlabeled, synchronize] + +jobs: + do-not-merge: + runs-on: ubuntu-latest + if: ${{ contains(github.event.pull_request.labels.*.name, 'DO-NOT-MERGE') }} + steps: + - name: 'Check for label "DO-NOT-MERGE"' + run: | + echo 'This check fails PRs with the "DO-NOT-MERGE" label to block merging' + exit 1 diff --git a/app/_locales/en/messages.json b/app/_locales/en/messages.json index 017103ecd..451ea68a7 100644 --- a/app/_locales/en/messages.json +++ b/app/_locales/en/messages.json @@ -1636,6 +1636,12 @@ "general": { "message": "General" }, + "globalTitle": { + "message": "Global menu" + }, + "globalTourDescription": { + "message": "See your portfolio, connected sites, settings, and more" + }, "goBack": { "message": "Go back" }, @@ -2396,6 +2402,9 @@ "noNFTs": { "message": "No NFTs yet" }, + "noReport": { + "message": "No Report" + }, "noSnaps": { "message": "You don't have any snaps installed." }, @@ -3052,6 +3061,12 @@ "permissions": { "message": "Permissions" }, + "permissionsTitle": { + "message": "Permissions" + }, + "permissionsTourDescription": { + "message": "Find your connected accounts and manage permissions here" + }, "personalAddressDetected": { "message": "Personal address detected. Input the token contract address." }, @@ -3233,6 +3248,12 @@ "replace": { "message": "replace" }, + "reportLastRun": { + "message": "Report last run" + }, + "reportLastRunTooltip": { + "message": "The date and time of when the last AML/CFT report was run" + }, "requestFailed": { "message": "Request failed" }, @@ -3362,9 +3383,18 @@ "revokeSpendingCapTooltipText": { "message": "This third party will be unable to spend any more of your current or future tokens." }, + "riskRating": { + "message": "Risk rating" + }, + "riskRatingTooltip": { + "message": "The risk rating of the address you are interacting with based on your risk settings" + }, "rpcUrl": { "message": "New RPC URL" }, + "runReport": { + "message": "Run report" + }, "safeTransferFrom": { "message": "Safe transfer from" }, @@ -3579,6 +3609,9 @@ "showPrivateKeys": { "message": "Show Private Keys" }, + "showReport": { + "message": "Show report" + }, "showTestnetNetworks": { "message": "Show test networks" }, @@ -3649,7 +3682,7 @@ "description": "$1 is the dApp origin requesting the snap and $2 is the snap name" }, "snapInstallWarningCheck": { - "message": "Ensure that the permission below align with your intended actions. Only proceed with authors you trust." + "message": "Ensure that the permission below aligns with your intended actions. Only proceed with authors you trust." }, "snapInstallWarningCheckPlural": { "message": "Ensure that the permissions below align with your intended actions. Only proceed with authors you trust." @@ -4279,6 +4312,12 @@ "switchedTo": { "message": "You have switched to" }, + "switcherTitle": { + "message": "Network switcher" + }, + "switcherTourDescription": { + "message": "Click the icon to switch networks or add a new network" + }, "switchingNetworksCancelsPendingConfirmations": { "message": "Switching networks will cancel all pending confirmations" }, diff --git a/app/scripts/controllers/app-state.js b/app/scripts/controllers/app-state.js index cf61daff6..63eaf085d 100644 --- a/app/scripts/controllers/app-state.js +++ b/app/scripts/controllers/app-state.js @@ -46,6 +46,7 @@ export default class AppStateController extends EventEmitter { nftsDetectionNoticeDismissed: false, showTestnetMessageInDropdown: true, showBetaHeader: isBeta(), + showProductTour: true, trezorModel: null, currentPopupId: undefined, ...initState, @@ -331,6 +332,15 @@ export default class AppStateController extends EventEmitter { this.store.updateState({ showBetaHeader }); } + /** + * Sets whether the product tour should be shown + * + * @param showProductTour + */ + setShowProductTour(showProductTour) { + this.store.updateState({ showProductTour }); + } + /** * Sets a property indicating the model of the user's Trezor hardware wallet * diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index f6cdd0eba..494dd3c86 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -2061,6 +2061,8 @@ export default class MetamaskController extends EventEmitter { ), setShowBetaHeader: appStateController.setShowBetaHeader.bind(appStateController), + setShowProductTour: + appStateController.setShowProductTour.bind(appStateController), updateNftDropDownState: appStateController.updateNftDropDownState.bind(appStateController), setFirstTimeUsedNetwork: diff --git a/ui/components/app/signature-request-siwe/__snapshots__/signature-request-siwe.test.js.snap b/ui/components/app/signature-request-siwe/__snapshots__/signature-request-siwe.test.js.snap index 418b8dba0..d7106d17d 100644 --- a/ui/components/app/signature-request-siwe/__snapshots__/signature-request-siwe.test.js.snap +++ b/ui/components/app/signature-request-siwe/__snapshots__/signature-request-siwe.test.js.snap @@ -122,100 +122,100 @@ exports[`SignatureRequestSIWE (Sign in with Ethereum) should match snapshot 1`] class="box box--margin-top-2 box--margin-bottom-2 box--flex-direction-row" >

Message:

-
Click to sign in and accept the Terms of Service: https://community.metamask.io/tos -
+

URI:

-
http://localhost:8080 -
+

Version:

-
1 -
+

Chain ID:

-
1 -
+

Nonce:

-
STMt6KQMwwdOXE306 -
+

Issued At:

-
2023-03-18T21:40:40.823Z -
+

Resources: 2

-
ipfs://Qme7ss3ARVgxv6rXqVPiikMJ8u2NLgmgszg13pYrDKEoiu https://example.com/my-web2-claim.json -
+

diff --git a/ui/components/app/signature-request-siwe/signature-request-siwe-message/index.scss b/ui/components/app/signature-request-siwe/signature-request-siwe-message/index.scss index d78461332..36739dab5 100644 --- a/ui/components/app/signature-request-siwe/signature-request-siwe-message/index.scss +++ b/ui/components/app/signature-request-siwe/signature-request-siwe-message/index.scss @@ -8,6 +8,5 @@ &__sub-text { white-space: pre-line; overflow: hidden; - word-wrap: break-word; } } diff --git a/ui/components/app/signature-request-siwe/signature-request-siwe-message/signature-request-siwe-message.js b/ui/components/app/signature-request-siwe/signature-request-siwe-message/signature-request-siwe-message.js index e92912dda..565703ef2 100644 --- a/ui/components/app/signature-request-siwe/signature-request-siwe-message/signature-request-siwe-message.js +++ b/ui/components/app/signature-request-siwe/signature-request-siwe-message/signature-request-siwe-message.js @@ -1,11 +1,12 @@ import React from 'react'; import PropTypes from 'prop-types'; import Box from '../../../ui/box'; -import Typography from '../../../ui/typography'; +import { Text } from '../../../component-library'; import { FLEX_DIRECTION, - TypographyVariant, + OVERFLOW_WRAP, + TextVariant, } from '../../../../helpers/constants/design-system'; const SignatureRequestSIWEMessage = ({ data }) => { @@ -14,21 +15,22 @@ const SignatureRequestSIWEMessage = ({ data }) => { {data.map(({ label, value }, i) => ( - {label} - - + {value} - + ))} diff --git a/ui/components/app/signature-request-siwe/signature-request-siwe.js b/ui/components/app/signature-request-siwe/signature-request-siwe.js index de7441cb7..5fab50ab2 100644 --- a/ui/components/app/signature-request-siwe/signature-request-siwe.js +++ b/ui/components/app/signature-request-siwe/signature-request-siwe.js @@ -64,7 +64,15 @@ export default function SignatureRequestSIWE({ const isSIWEDomainValid = checkSIWEDomain(); const [isShowingDomainWarning, setIsShowingDomainWarning] = useState(false); - const [agreeToDomainWarning, setAgreeToDomainWarning] = useState(false); + const [hasAgreedToDomainWarning, setHasAgreedToDomainWarning] = + useState(false); + + const showSecurityProviderBanner = + (txData?.securityProviderResponse?.flagAsDangerous !== undefined && + txData?.securityProviderResponse?.flagAsDangerous !== + SECURITY_PROVIDER_MESSAGE_SEVERITIES.NOT_MALICIOUS) || + (txData?.securityProviderResponse && + Object.keys(txData.securityProviderResponse).length === 0); const onSign = useCallback( async (event) => { @@ -96,15 +104,13 @@ export default function SignatureRequestSIWE({ isSIWEDomainValid={isSIWEDomainValid} subjectMetadata={targetSubjectMetadata} /> - {(txData?.securityProviderResponse?.flagAsDangerous !== undefined && - txData?.securityProviderResponse?.flagAsDangerous !== - SECURITY_PROVIDER_MESSAGE_SEVERITIES.NOT_MALICIOUS) || - (txData?.securityProviderResponse && - Object.keys(txData.securityProviderResponse).length === 0) ? ( + + {showSecurityProviderBanner && ( - ) : null} + )} + {!isMatchingAddress && ( } >
setAgreeToDomainWarning((checked) => !checked)} + onClick={() => setHasAgreedToDomainWarning((checked) => !checked)} />