Skip to content

Commit

Permalink
fix: fix PR comments + unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
salimtb committed Dec 5, 2024
1 parent 51abcd1 commit cde651e
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/scripts/constants/sentry-state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ export const SENTRY_BACKGROUND_STATE = {
showExtensionInFullSizeView: true,
showFiatInTestnets: true,
showTestNetworks: true,
showBaseNetworkToast: false,
smartTransactionsOptInStatus: true,
tokenNetworkFilter: {},
showNativeTokenAsMainBalance: true,
Expand Down
1 change: 1 addition & 0 deletions app/scripts/fixtures/with-preferences.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export const FIXTURES_PREFERENCES = {
showExtensionInFullSizeView: false,
showFiatInTestnets: true,
showTestNetworks: true,
showBaseNetworkToast: false,
smartTransactionsOptInStatus: true,
useNativeCurrencyAsPrimaryCurrency: true,
petnamesEnabled: true,
Expand Down
1 change: 1 addition & 0 deletions test/data/mock-send-state.json
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@
"hideZeroBalanceTokens": false,
"showFiatInTestnets": false,
"showTestNetworks": true,
"showBaseNetworkToast": false,
"tokenNetworkFilter": {}
},
"seedPhraseBackedUp": null,
Expand Down
1 change: 1 addition & 0 deletions test/data/mock-state.json
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,7 @@
"showFiatInTestnets": false,
"showNativeTokenAsMainBalance": true,
"showTestNetworks": true,
"showBaseNetworkToast": false,
"smartTransactionsOptInStatus": true,
"tokenNetworkFilter": {},
"tokenSortConfig": {
Expand Down
1 change: 1 addition & 0 deletions test/e2e/restore/MetaMaskUserData.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"showExtensionInFullSizeView": false,
"showFiatInTestnets": false,
"showTestNetworks": false,
"showBaseNetworkToast": false,
"smartTransactionsOptInStatus": true
},
"theme": "light",
Expand Down
1 change: 1 addition & 0 deletions ui/components/app/toast-master/toast-master.js
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ function BaseNetworkToast() {
text={t('baseNetworkToastMessage')}
actionText={t('seeDetails')}
onActionClick={() => {
dispatch(setShowBaseNetworkToast(false));
dispatch(toggleNetworkMenu());
dispatch(
setEditedNetwork({
Expand Down
3 changes: 3 additions & 0 deletions ui/pages/routes/routes.component.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ describe('Routes Component', () => {
sortCallback: 'stringNumeric',
},
tokenNetworkFilter: {},
showBaseNetworkToast: false,
},
tokenBalances: {
'0x0dcd5d886577d5081b0c52e242ef29e70be3e7bc': '0x176270e2b862e4ed3',
Expand Down Expand Up @@ -309,6 +310,7 @@ describe('toast display', () => {
pendingApprovals: {},
pendingApprovalCount: 0,
preferences: {
showBaseNetworkToast: false,
tokenSortConfig: {
key: 'token-sort-key',
order: 'dsc',
Expand Down Expand Up @@ -340,6 +342,7 @@ describe('toast display', () => {
newPrivacyPolicyToastShownDate: new Date(0),
newPrivacyPolicyToastClickedOrClosed: true,
preferences: {
showBaseNetworkToast: false,
tokenSortConfig: {
key: 'token-sort-key',
order: 'dsc',
Expand Down

0 comments on commit cde651e

Please sign in to comment.