From a85a4cf97ede1a02b80632362bd965937708e18b Mon Sep 17 00:00:00 2001 From: Danica Shen Date: Fri, 4 Aug 2023 12:33:47 +0100 Subject: [PATCH] feat(878): add new incomingTxn component and change styles of settings (#20374) * feat(878): add new incomingTxn component and change styles of settings * feat(878): relocate openSea tab from rebase regression * feat(878): make UI and test modifications * feat(878): transfer to ts * feat(878): rename network-toggle.tsx --- app/_locales/en/messages.json | 6 + .../incoming-transaction-toggle.test.js.snap | 472 ++++++++++++ .../incoming-transaction-toggle.test.js | 209 +++++ .../incoming-transaction-toggle.tsx | 145 ++++ .../network-toggle.tsx | 104 +++ .../privacy-settings/setting.js | 37 +- .../advanced-tab.component.test.js.snap | 656 ++++++++++++++++ .../advanced-tab/advanced-tab.component.js | 209 ++--- .../advanced-tab.component.test.js | 6 + ui/pages/settings/alerts-tab/alerts-tab.scss | 1 + .../experimental-tab.test.js.snap | 42 +- .../experimental-tab.component.js | 38 +- ui/pages/settings/index.scss | 9 +- .../__snapshots__/security-tab.test.js.snap | 712 +++++++++--------- .../security-tab/security-tab.component.js | 487 ++++++------ .../settings-tab/settings-tab.component.js | 74 +- 16 files changed, 2443 insertions(+), 764 deletions(-) create mode 100644 ui/components/app/incoming-trasaction-toggle/__snapshots__/incoming-transaction-toggle.test.js.snap create mode 100644 ui/components/app/incoming-trasaction-toggle/incoming-transaction-toggle.test.js create mode 100644 ui/components/app/incoming-trasaction-toggle/incoming-transaction-toggle.tsx create mode 100644 ui/components/app/incoming-trasaction-toggle/network-toggle.tsx create mode 100644 ui/pages/settings/advanced-tab/__snapshots__/advanced-tab.component.test.js.snap diff --git a/app/_locales/en/messages.json b/app/_locales/en/messages.json index cf2684e9c..545a84f82 100644 --- a/app/_locales/en/messages.json +++ b/app/_locales/en/messages.json @@ -1397,6 +1397,9 @@ "enableAutoDetect": { "message": " Enable autodetect" }, + "enableForAllNetworks": { + "message": "Enable for all networks" + }, "enableFromSettings": { "message": " Enable it from Settings." }, @@ -3850,6 +3853,9 @@ "message": "This relies on $1 which will have access to your Ethereum address and your IP address. $2", "description": "$1 is the link to etherscan url and $2 is the link to the privacy policy of consensys APIs" }, + "showIncomingTransactionsInformation": { + "message": "This relies on each network which will have access to your Ethereum address and your IP address." + }, "showMore": { "message": "Show more" }, diff --git a/ui/components/app/incoming-trasaction-toggle/__snapshots__/incoming-transaction-toggle.test.js.snap b/ui/components/app/incoming-trasaction-toggle/__snapshots__/incoming-transaction-toggle.test.js.snap new file mode 100644 index 000000000..e842c4c0f --- /dev/null +++ b/ui/components/app/incoming-trasaction-toggle/__snapshots__/incoming-transaction-toggle.test.js.snap @@ -0,0 +1,472 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`IncomingTransactionToggle should render existing incoming transaction preferences 1`] = ` +
+
+

+ Show incoming transactions +

+

+ This relies on each network which will have access to your Ethereum address and your IP address. +

+
+

+ + Enable for all networks +

+