From 6507377ab08050c23bc757b691f317c79b046f3e Mon Sep 17 00:00:00 2001 From: Lionell Briones Date: Thu, 6 Jul 2023 19:56:03 +0800 Subject: [PATCH 01/20] added new UI --- package-lock.json | 107 +++--- .../Confirm/AddNetwork/AddNetwork.vue | 2 +- .../Confirm/ConfirmForm/ConfirmForm.vue | 2 +- .../Confirm/NetworkSwitch/NetworkSwitch.vue | 2 +- .../helpers/QuickAddress/QuickAddress.vue | 6 +- .../WalletConnectModal.scss | 41 +++ .../WalletConnectModal/WalletConnectModal.vue | 319 ++++++++++++++++++ .../helpers/WalletConnectModal/index.js | 1 + .../WalletHomeMain/WalletHomeMain.vue | 41 +-- .../walletconnect/WalletConnectController.js | 17 +- .../WalletConnectV2Controller.js | 19 +- src/icons/DisconnectIcon.vue | 6 +- src/icons/ShareIcon.vue | 11 + src/icons/index.js | 4 + src/store/actions.js | 3 + src/views/Popup/Popup.vue | 8 +- src/views/ProviderChange/ProviderChange.vue | 2 +- 17 files changed, 482 insertions(+), 109 deletions(-) create mode 100644 src/components/helpers/WalletConnectModal/WalletConnectModal.scss create mode 100644 src/components/helpers/WalletConnectModal/WalletConnectModal.vue create mode 100644 src/components/helpers/WalletConnectModal/index.js create mode 100644 src/icons/ShareIcon.vue diff --git a/package-lock.json b/package-lock.json index fc22ac454..b7a398cb1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -31,8 +31,8 @@ "@toruslabs/openlogin-subkey": "^4.2.0", "@toruslabs/openlogin-utils": "^4.5.1", "@uniswap/default-token-list": "^11.2.0", - "@walletconnect/sign-client": "^2.8.1", - "@walletconnect/utils": "^2.8.1", + "@walletconnect/sign-client": "^2.8.6", + "@walletconnect/utils": "^2.8.6", "await-semaphore": "^0.1.3", "bignumber.js": "^9.1.1", "bn.js": "^5.2.1", @@ -4619,6 +4619,29 @@ "integrity": "sha512-Iu8Tbg3f+emIIMmI2ycSI8QcEuAUgPTgHwesDU1eKMLE4YC/c/sFbGc70QgMq31ijRftV0R7vCm9co6rldCeOA==", "dev": true }, + "node_modules/@walletconnect/core": { + "version": "2.8.6", + "resolved": "https://registry.npmjs.org/@walletconnect/core/-/core-2.8.6.tgz", + "integrity": "sha512-rnSqm1KJLcww/v6+UH8JeibQkJ3EKgyUDPfEK0stSEkrIUIcXaFlq3Et8S+vgV8bPhI0MVUhAhFL5OJZ3t2ryg==", + "dependencies": { + "@walletconnect/heartbeat": "1.2.1", + "@walletconnect/jsonrpc-provider": "1.0.13", + "@walletconnect/jsonrpc-types": "1.0.3", + "@walletconnect/jsonrpc-utils": "1.0.8", + "@walletconnect/jsonrpc-ws-connection": "^1.0.11", + "@walletconnect/keyvaluestorage": "^1.0.2", + "@walletconnect/logger": "^2.0.1", + "@walletconnect/relay-api": "^1.0.9", + "@walletconnect/relay-auth": "^1.0.4", + "@walletconnect/safe-json": "^1.0.2", + "@walletconnect/time": "^1.0.2", + "@walletconnect/types": "2.8.6", + "@walletconnect/utils": "2.8.6", + "events": "^3.3.0", + "lodash.isequal": "4.5.0", + "uint8arrays": "^3.1.0" + } + }, "node_modules/@walletconnect/environment": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@walletconnect/environment/-/environment-1.0.1.tgz", @@ -4676,9 +4699,9 @@ } }, "node_modules/@walletconnect/jsonrpc-ws-connection": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/@walletconnect/jsonrpc-ws-connection/-/jsonrpc-ws-connection-1.0.11.tgz", - "integrity": "sha512-TiFJ6saasKXD+PwGkm5ZGSw0837nc6EeFmurSPgIT/NofnOV4Tv7CVJqGQN0rQYoJUSYu21cwHNYaFkzNpUN+w==", + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/@walletconnect/jsonrpc-ws-connection/-/jsonrpc-ws-connection-1.0.12.tgz", + "integrity": "sha512-HAcadga3Qjt1Cqy+qXEW6zjaCs8uJGdGQrqltzl3OjiK4epGZRdvSzTe63P+t/3z+D2wG+ffEPn0GVcDozmN1w==", "dependencies": { "@walletconnect/jsonrpc-utils": "^1.0.6", "@walletconnect/safe-json": "^1.0.2", @@ -4748,48 +4771,33 @@ } }, "node_modules/@walletconnect/sign-client": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/@walletconnect/sign-client/-/sign-client-2.8.1.tgz", - "integrity": "sha512-6DbpjP9BED2YZOZdpVgYo0HwPBV7k99imnsdMFrTn16EFAxhuYP0/qPwum9d072oNMGWJSA6d4rzc8FHNtHsCA==", + "version": "2.8.6", + "resolved": "https://registry.npmjs.org/@walletconnect/sign-client/-/sign-client-2.8.6.tgz", + "integrity": "sha512-rOFTKTHP7oJfXgYHX7+SdB8VbcsEE3ZFG/bMdmZboWaBim1mrY3vUyDdKrNr0VgI3AwBiEQezQDfKxBX0pMSQQ==", "dependencies": { - "@walletconnect/core": "2.8.1", + "@walletconnect/core": "2.8.6", "@walletconnect/events": "^1.0.1", "@walletconnect/heartbeat": "1.2.1", "@walletconnect/jsonrpc-utils": "1.0.8", "@walletconnect/logger": "^2.0.1", "@walletconnect/time": "^1.0.2", - "@walletconnect/types": "2.8.1", - "@walletconnect/utils": "2.8.1", + "@walletconnect/types": "2.8.6", + "@walletconnect/utils": "2.8.6", "events": "^3.3.0" } }, - "node_modules/@walletconnect/sign-client/node_modules/@walletconnect/core": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/@walletconnect/core/-/core-2.8.1.tgz", - "integrity": "sha512-mN9Zkdl/NeThntK8cydDoQOW6jUEpOeFgYR1RCKPLH51VQwlbdSgvvQIeanSQXEY4U7AM3x8cs1sxqMomIfRQg==", + "node_modules/@walletconnect/time": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@walletconnect/time/-/time-1.0.2.tgz", + "integrity": "sha512-uzdd9woDcJ1AaBZRhqy5rNC9laqWGErfc4dxA9a87mPdKOgWMD85mcFo9dIYIts/Jwocfwn07EC6EzclKubk/g==", "dependencies": { - "@walletconnect/heartbeat": "1.2.1", - "@walletconnect/jsonrpc-provider": "1.0.13", - "@walletconnect/jsonrpc-types": "1.0.3", - "@walletconnect/jsonrpc-utils": "1.0.8", - "@walletconnect/jsonrpc-ws-connection": "^1.0.11", - "@walletconnect/keyvaluestorage": "^1.0.2", - "@walletconnect/logger": "^2.0.1", - "@walletconnect/relay-api": "^1.0.9", - "@walletconnect/relay-auth": "^1.0.4", - "@walletconnect/safe-json": "^1.0.2", - "@walletconnect/time": "^1.0.2", - "@walletconnect/types": "2.8.1", - "@walletconnect/utils": "2.8.1", - "events": "^3.3.0", - "lodash.isequal": "4.5.0", - "uint8arrays": "^3.1.0" + "tslib": "1.14.1" } }, - "node_modules/@walletconnect/sign-client/node_modules/@walletconnect/types": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/@walletconnect/types/-/types-2.8.1.tgz", - "integrity": "sha512-MLISp85b+27vVkm3Wkud+eYCwySXCdOrmn0yQCSN6DnRrrunrD05ksz4CXGP7h2oXUvvXPDt/6lXBf1B4AfqrA==", + "node_modules/@walletconnect/types": { + "version": "2.8.6", + "resolved": "https://registry.npmjs.org/@walletconnect/types/-/types-2.8.6.tgz", + "integrity": "sha512-Z/PFa3W1XdxeTcCtdR6lUsFgZfU/69wWJBPyclPwn7cu1+eriuCr6XZXQpJjib3flU+HnwHiXeUuqZaheehPxw==", "dependencies": { "@walletconnect/events": "^1.0.1", "@walletconnect/heartbeat": "1.2.1", @@ -4799,18 +4807,10 @@ "events": "^3.3.0" } }, - "node_modules/@walletconnect/time": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@walletconnect/time/-/time-1.0.2.tgz", - "integrity": "sha512-uzdd9woDcJ1AaBZRhqy5rNC9laqWGErfc4dxA9a87mPdKOgWMD85mcFo9dIYIts/Jwocfwn07EC6EzclKubk/g==", - "dependencies": { - "tslib": "1.14.1" - } - }, "node_modules/@walletconnect/utils": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/@walletconnect/utils/-/utils-2.8.1.tgz", - "integrity": "sha512-d6p9OX3v70m6ijp+j4qvqiQZQU1vbEHN48G8HqXasyro3Z+N8vtcB5/gV4pTYsbWgLSDtPHj49mzbWQ0LdIdTw==", + "version": "2.8.6", + "resolved": "https://registry.npmjs.org/@walletconnect/utils/-/utils-2.8.6.tgz", + "integrity": "sha512-wcy6e5+COYo7tfNnW8YqidnATdJDIW6vDiWWE7A1F78Sl/VflkaevB9cIgyn8eLdxC1SxXgGoeC2oLP90nnHJg==", "dependencies": { "@stablelib/chacha20poly1305": "1.0.1", "@stablelib/hkdf": "1.0.1", @@ -4820,7 +4820,7 @@ "@walletconnect/relay-api": "^1.0.9", "@walletconnect/safe-json": "^1.0.2", "@walletconnect/time": "^1.0.2", - "@walletconnect/types": "2.8.1", + "@walletconnect/types": "2.8.6", "@walletconnect/window-getters": "^1.0.1", "@walletconnect/window-metadata": "^1.0.1", "detect-browser": "5.3.0", @@ -4828,19 +4828,6 @@ "uint8arrays": "^3.1.0" } }, - "node_modules/@walletconnect/utils/node_modules/@walletconnect/types": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/@walletconnect/types/-/types-2.8.1.tgz", - "integrity": "sha512-MLISp85b+27vVkm3Wkud+eYCwySXCdOrmn0yQCSN6DnRrrunrD05ksz4CXGP7h2oXUvvXPDt/6lXBf1B4AfqrA==", - "dependencies": { - "@walletconnect/events": "^1.0.1", - "@walletconnect/heartbeat": "1.2.1", - "@walletconnect/jsonrpc-types": "1.0.3", - "@walletconnect/keyvaluestorage": "^1.0.2", - "@walletconnect/logger": "^2.0.1", - "events": "^3.3.0" - } - }, "node_modules/@walletconnect/window-getters": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@walletconnect/window-getters/-/window-getters-1.0.1.tgz", diff --git a/src/components/Confirm/AddNetwork/AddNetwork.vue b/src/components/Confirm/AddNetwork/AddNetwork.vue index 6fcfacea2..699142db1 100644 --- a/src/components/Confirm/AddNetwork/AddNetwork.vue +++ b/src/components/Confirm/AddNetwork/AddNetwork.vue @@ -18,7 +18,7 @@ - +
{{ t('dappProvider.requestFrom') }}
diff --git a/src/components/Confirm/ConfirmForm/ConfirmForm.vue b/src/components/Confirm/ConfirmForm/ConfirmForm.vue index b4b4d152c..7faffca39 100644 --- a/src/components/Confirm/ConfirmForm/ConfirmForm.vue +++ b/src/components/Confirm/ConfirmForm/ConfirmForm.vue @@ -380,7 +380,7 @@
- + diff --git a/src/components/Confirm/NetworkSwitch/NetworkSwitch.vue b/src/components/Confirm/NetworkSwitch/NetworkSwitch.vue index 30d71f6da..93b235b17 100644 --- a/src/components/Confirm/NetworkSwitch/NetworkSwitch.vue +++ b/src/components/Confirm/NetworkSwitch/NetworkSwitch.vue @@ -18,7 +18,7 @@ - +
{{ t('dappProvider.requestFrom') }}
diff --git a/src/components/helpers/QuickAddress/QuickAddress.vue b/src/components/helpers/QuickAddress/QuickAddress.vue index 5c8e1a522..e62a67d1f 100644 --- a/src/components/helpers/QuickAddress/QuickAddress.vue +++ b/src/components/helpers/QuickAddress/QuickAddress.vue @@ -1,6 +1,9 @@