Skip to content

Commit

Permalink
fix: merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
sahar-fehri committed May 6, 2024
2 parents c602b33 + 44e29aa commit 99c3db1
Show file tree
Hide file tree
Showing 16 changed files with 52 additions and 154 deletions.
54 changes: 10 additions & 44 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -407,54 +407,20 @@ jobs:
command: |
#!/bin/bash
# GitHub Personal Access Token for API Authentication
GITHUB_TOKEN="${GITHUB_TOKEN}"
BRANCH="${CIRCLE_BRANCH}"
# Fetch the PRs associated with the current branch and check the response
PR_RESPONSE=$(curl -s -H "Authorization: token ${GITHUB_TOKEN}" \
"https://api.github.com/repos/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/pulls?state=open&head=${CIRCLE_PROJECT_USERNAME}:${BRANCH}")
echo "https://api.github.com/repos/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/pulls?state=open&head=${CIRCLE_PROJECT_USERNAME}:${BRANCH}"
# Check if the response contains valid JSON
if ! echo "$PR_RESPONSE" | jq empty; then
echo "Failed to parse JSON response."
echo "$PR_RESPONSE"
exit 1
fi
# Check if we received an array of PRs
if ! echo "$PR_RESPONSE" | jq -e '. | type == "array"'; then
echo "$PR_RESPONSE"
echo "Expected an array of PRs, got something else."
exit 1
fi
GH_LABEL=team-mmi
# Check if the array of PRs is empty
PR_COUNT=$(echo "$PR_RESPONSE" | jq '. | length')
echo $CIRCLE_PULL_REQUESTS | sed 's/,/\n/g'
# If no PRs are found, exit gracefully
if [ "$PR_COUNT" -eq 0 ]; then
echo "No open PRs found. Exiting."
echo "false" > ./RUN_MMI_OPTIONAL
exit 0
fi
# Extract label names from the PR_RESPONSE
LABEL_NAMES=$(echo "$PR_RESPONSE" | jq -r '.[0].labels[].name')
# See if any associated PRs have matching label
HAS_MATCHING_PR=$(echo $CIRCLE_PULL_REQUESTS \
| sed -e 's#,#\n#g' -e 's#/github.com/#/api.github.com/repos/#g' -e 's#/pull/#/pulls/#g' \
| xargs -n1 curl -s \
| jq -s "map((.labels|map(select(.name==\"${GH_LABEL}\"))))|flatten|length > 0")
echo "Labels found: $LABEL_NAMES"
echo "${GH_LABEL} tag presence: ${HAS_MATCHING_PR}"
# Check if "team-mmi" label is present
if echo "$LABEL_NAMES" | grep -qw "team-mmi"; then
echo "team-mmi tag found."
# assign the RUN_MMI_OPTIONAL variable to true
echo "true" > ./RUN_MMI_OPTIONAL
else
echo "team-mmi tag not found."
# assign the RUN_MMI_OPTIONAL variable to false
echo "false" > ./RUN_MMI_OPTIONAL
fi
# assign the RUN_MMI_OPTIONAL variable
echo "${HAS_MATCHING_PR}" > ./RUN_MMI_OPTIONAL
- persist_to_workspace:
root: .
paths:
Expand Down
12 changes: 4 additions & 8 deletions app/_locales/en/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 4 additions & 14 deletions lavamoat/browserify/beta/policy.json
Original file line number Diff line number Diff line change
Expand Up @@ -728,26 +728,16 @@
},
"@metamask/address-book-controller": {
"packages": {
"@metamask/address-book-controller>@metamask/controller-utils": true,
"@metamask/base-controller": true
"@metamask/address-book-controller>@metamask/base-controller": true,
"@metamask/controller-utils": true
}
},
"@metamask/address-book-controller>@metamask/controller-utils": {
"@metamask/address-book-controller>@metamask/base-controller": {
"globals": {
"URL": true,
"console.error": true,
"fetch": true,
"setTimeout": true
},
"packages": {
"@ethereumjs/tx>@ethereumjs/util": true,
"@metamask/controller-utils>@spruceid/siwe-parser": true,
"@metamask/ethjs>@metamask/ethjs-unit": true,
"@metamask/utils": true,
"bn.js": true,
"browserify>buffer": true,
"eslint>fast-deep-equal": true,
"eth-ens-namehash": true
"immer": true
}
},
"@metamask/announcement-controller": {
Expand Down
18 changes: 4 additions & 14 deletions lavamoat/browserify/desktop/policy.json
Original file line number Diff line number Diff line change
Expand Up @@ -728,26 +728,16 @@
},
"@metamask/address-book-controller": {
"packages": {
"@metamask/address-book-controller>@metamask/controller-utils": true,
"@metamask/base-controller": true
"@metamask/address-book-controller>@metamask/base-controller": true,
"@metamask/controller-utils": true
}
},
"@metamask/address-book-controller>@metamask/controller-utils": {
"@metamask/address-book-controller>@metamask/base-controller": {
"globals": {
"URL": true,
"console.error": true,
"fetch": true,
"setTimeout": true
},
"packages": {
"@ethereumjs/tx>@ethereumjs/util": true,
"@metamask/controller-utils>@spruceid/siwe-parser": true,
"@metamask/ethjs>@metamask/ethjs-unit": true,
"@metamask/utils": true,
"bn.js": true,
"browserify>buffer": true,
"eslint>fast-deep-equal": true,
"eth-ens-namehash": true
"immer": true
}
},
"@metamask/announcement-controller": {
Expand Down
18 changes: 4 additions & 14 deletions lavamoat/browserify/flask/policy.json
Original file line number Diff line number Diff line change
Expand Up @@ -728,26 +728,16 @@
},
"@metamask/address-book-controller": {
"packages": {
"@metamask/address-book-controller>@metamask/controller-utils": true,
"@metamask/base-controller": true
"@metamask/address-book-controller>@metamask/base-controller": true,
"@metamask/controller-utils": true
}
},
"@metamask/address-book-controller>@metamask/controller-utils": {
"@metamask/address-book-controller>@metamask/base-controller": {
"globals": {
"URL": true,
"console.error": true,
"fetch": true,
"setTimeout": true
},
"packages": {
"@ethereumjs/tx>@ethereumjs/util": true,
"@metamask/controller-utils>@spruceid/siwe-parser": true,
"@metamask/ethjs>@metamask/ethjs-unit": true,
"@metamask/utils": true,
"bn.js": true,
"browserify>buffer": true,
"eslint>fast-deep-equal": true,
"eth-ens-namehash": true
"immer": true
}
},
"@metamask/announcement-controller": {
Expand Down
18 changes: 4 additions & 14 deletions lavamoat/browserify/main/policy.json
Original file line number Diff line number Diff line change
Expand Up @@ -728,26 +728,16 @@
},
"@metamask/address-book-controller": {
"packages": {
"@metamask/address-book-controller>@metamask/controller-utils": true,
"@metamask/base-controller": true
"@metamask/address-book-controller>@metamask/base-controller": true,
"@metamask/controller-utils": true
}
},
"@metamask/address-book-controller>@metamask/controller-utils": {
"@metamask/address-book-controller>@metamask/base-controller": {
"globals": {
"URL": true,
"console.error": true,
"fetch": true,
"setTimeout": true
},
"packages": {
"@ethereumjs/tx>@ethereumjs/util": true,
"@metamask/controller-utils>@spruceid/siwe-parser": true,
"@metamask/ethjs>@metamask/ethjs-unit": true,
"@metamask/utils": true,
"bn.js": true,
"browserify>buffer": true,
"eslint>fast-deep-equal": true,
"eth-ens-namehash": true
"immer": true
}
},
"@metamask/announcement-controller": {
Expand Down
18 changes: 4 additions & 14 deletions lavamoat/browserify/mmi/policy.json
Original file line number Diff line number Diff line change
Expand Up @@ -867,26 +867,16 @@
},
"@metamask/address-book-controller": {
"packages": {
"@metamask/address-book-controller>@metamask/controller-utils": true,
"@metamask/base-controller": true
"@metamask/address-book-controller>@metamask/base-controller": true,
"@metamask/controller-utils": true
}
},
"@metamask/address-book-controller>@metamask/controller-utils": {
"@metamask/address-book-controller>@metamask/base-controller": {
"globals": {
"URL": true,
"console.error": true,
"fetch": true,
"setTimeout": true
},
"packages": {
"@ethereumjs/tx>@ethereumjs/util": true,
"@metamask/controller-utils>@spruceid/siwe-parser": true,
"@metamask/ethjs>@metamask/ethjs-unit": true,
"@metamask/utils": true,
"bn.js": true,
"browserify>buffer": true,
"eslint>fast-deep-equal": true,
"eth-ens-namehash": true
"immer": true
}
},
"@metamask/announcement-controller": {
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@
"@metamask-institutional/transaction-update": "^0.2.0",
"@metamask/abi-utils": "^2.0.2",
"@metamask/accounts-controller": "^11.0.0",
"@metamask/address-book-controller": "^3.1.7",
"@metamask/address-book-controller": "^4.0.1",
"@metamask/announcement-controller": "^6.1.0",
"@metamask/approval-controller": "^6.0.0",
"@metamask/assets-controllers": "^29.0.0",
Expand Down Expand Up @@ -572,7 +572,6 @@
"nock": "^13.2.9",
"node-fetch": "^2.6.1",
"nyc": "^15.1.0",
"polyfill-crypto.getrandomvalues": "^1.0.0",
"postcss": "^8.4.32",
"postcss-rtlcss": "^4.0.9",
"prettier": "^2.7.1",
Expand Down
2 changes: 0 additions & 2 deletions shared/constants/methods-tags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ export const methodsWithConfirmation = [
...methodsRequiringNetworkSwitch,
'wallet_requestPermissions',
'wallet_requestSnaps',
'wallet_snap',
'wallet_invokeSnap',
'eth_decrypt',
'eth_sign',
'eth_requestAccounts',
Expand Down
4 changes: 2 additions & 2 deletions shared/modules/selectors/smart-transactions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
type SmartTransactionsMetaMaskState = {
metamask: {
preferences: {
smartTransactionsOptInStatus: boolean | null;
smartTransactionsOptInStatus?: boolean | null;
};
internalAccounts: {
selectedAccount: string;
Expand Down Expand Up @@ -62,7 +62,7 @@ type SmartTransactionsMetaMaskState = {
export const getSmartTransactionsOptInStatus = (
state: SmartTransactionsMetaMaskState,
): boolean | null => {
return state.metamask.preferences?.smartTransactionsOptInStatus;
return state.metamask.preferences?.smartTransactionsOptInStatus ?? null;
};

export const getCurrentChainSupportsSmartTransactions = (
Expand Down
2 changes: 1 addition & 1 deletion test/helpers/setup-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ if (!window.crypto) {
}
if (!window.crypto.getRandomValues) {
// eslint-disable-next-line node/global-require
window.crypto.getRandomValues = require('polyfill-crypto.getrandomvalues');
window.crypto.getRandomValues = require('crypto').webcrypto.getRandomValues;
}

// TextEncoder/TextDecoder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ describe('ConfirmTitle', () => {
expect(getByText('Signature request')).toBeInTheDocument();
expect(
getByText(
'Only sign this message if you fully understand the content and trust the requesting site',
'Only confirm this message if you approve the content and trust the requesting site.',
),
).toBeInTheDocument();
});
Expand All @@ -38,7 +38,7 @@ describe('ConfirmTitle', () => {
expect(getByText('Signature request')).toBeInTheDocument();
expect(
getByText(
'Review everything below before continuing. Once done, this transaction can’t be undone',
'Only confirm this message if you approve the content and trust the requesting site.',
),
).toBeInTheDocument();
});
Expand Down
4 changes: 2 additions & 2 deletions ui/pages/confirmations/components/confirm/title/title.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ const ConfirmTitle: React.FC = memo(() => {

const typeToDescTKey: Partial<Record<TransactionType, string>> = useMemo(
() => ({
[TransactionType.personalSign]: t('confirmTitleDescPersonalSignature'),
[TransactionType.signTypedData]: t('confirmTitleDescTypedDataSignature'),
[TransactionType.personalSign]: t('confirmTitleDescSignature'),
[TransactionType.signTypedData]: t('confirmTitleDescSignature'),
[TransactionType.contractInteraction]: t(
'confirmTitleDescContractInteractionTransaction',
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ exports[`Confirm matches snapshot for personal signature type 1`] = `
<p
class="mm-box mm-text mm-text--body-md mm-text--text-align-center mm-box--padding-bottom-4 mm-box--color-text-alternative"
>
Only sign this message if you fully understand the content and trust the requesting site
Only confirm this message if you approve the content and trust the requesting site.
</p>
<div
class="mm-box mm-box--margin-bottom-4 mm-box--padding-2 mm-box--background-color-background-default mm-box--rounded-md"
Expand Down Expand Up @@ -373,7 +373,7 @@ exports[`Confirm should match snapshot for typed sign signature 1`] = `
<p
class="mm-box mm-text mm-text--body-md mm-text--text-align-center mm-box--padding-bottom-4 mm-box--color-text-alternative"
>
Review everything below before continuing. Once done, this transaction can’t be undone
Only confirm this message if you approve the content and trust the requesting site.
</p>
<div
class="mm-box mm-box--margin-bottom-4 mm-box--padding-2 mm-box--background-color-background-default mm-box--rounded-md"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ function useConfirmationRecipientInfo() {
const currentConfirmation = useSelector(
currentConfirmationSelector,
) as Confirmation;
const allAccounts = useSelector(accountsWithSendEtherInfoSelector);

const allAccounts = useSelector(accountsWithSendEtherInfoSelector);

Expand Down

0 comments on commit 99c3db1

Please sign in to comment.