From 43654833cba6de3be7555b50d353aba858f7deeb Mon Sep 17 00:00:00 2001
From: Mihail Polev
Date: Tue, 17 May 2022 17:25:30 +0700
Subject: [PATCH] =?UTF-8?q?feat:=20=E2=9C=A8create=20Verify=20Transaction?=
=?UTF-8?q?=20screens?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../ethereum/ui/eth-verify-transaction.vue | 530 ++++++++++++++++++
.../src/providers/ethereum/ui/routes.ts | 7 +
.../polkadot/ui/dot-verify-transaction.vue | 200 +++++++
.../src/providers/polkadot/ui/routes.ts | 6 +
.../ui/action/icons/common/right-chevron.vue | 20 +
.../src/ui/action/icons/raw/eth-green.png | Bin 0 -> 1066 bytes
.../ui/action/views/modal-forgot/index.vue | 84 +++
.../ui/action/views/modal-preload/index.vue | 75 +++
.../src/ui/action/views/modal-sign/index.vue | 156 ++++++
.../components/best-offer-error.vue | 14 +-
.../ui/action/views/transaction-fee/index.vue | 58 +-
.../extension/src/ui/provider-pages/main.ts | 3 +-
12 files changed, 1150 insertions(+), 3 deletions(-)
create mode 100644 packages/extension/src/providers/ethereum/ui/eth-verify-transaction.vue
create mode 100644 packages/extension/src/providers/polkadot/ui/dot-verify-transaction.vue
create mode 100644 packages/extension/src/ui/action/icons/common/right-chevron.vue
create mode 100644 packages/extension/src/ui/action/icons/raw/eth-green.png
create mode 100644 packages/extension/src/ui/action/views/modal-forgot/index.vue
create mode 100644 packages/extension/src/ui/action/views/modal-preload/index.vue
create mode 100644 packages/extension/src/ui/action/views/modal-sign/index.vue
diff --git a/packages/extension/src/providers/ethereum/ui/eth-verify-transaction.vue b/packages/extension/src/providers/ethereum/ui/eth-verify-transaction.vue
new file mode 100644
index 000000000..499a9bdf7
--- /dev/null
+++ b/packages/extension/src/providers/ethereum/ui/eth-verify-transaction.vue
@@ -0,0 +1,530 @@
+
+
+
+
+

+
Ethereum
+
+
Verify transaction
+
+
+
+
+

+
+
My account nickname
+
+
12.34 dot
+
+ {{
+ $filters.replaceWithEllipsis(
+ "0x14502CF6C0A13167Dc340E25Dabf5FBDB68R5967",
+ 6,
+ 4
+ )
+ }}
+
+
+
+
+
+
+
+

+
+
Mathchain
+
https://explorer-galois.mathchain.org/#/
+
+
+
+
+

+
+
+
+
+
+
+
+ Warning: you will allow this DApp to spend any amount of ETH at any
+ time in the future. Please proceed only if you are trust this DApp.
+
+
+
+
+
+
+
+
+
+
Show data
+
+
+
Function type: Register Proxy 0xddd81f82
+
Parameters: []
+
HEX data: 4 BYTES
+
0xddd81f82
+
Verified contract on Etherscan
+
Decoded by Truffle
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/packages/extension/src/providers/ethereum/ui/routes.ts b/packages/extension/src/providers/ethereum/ui/routes.ts
index fd93d4cc4..ee6d006a5 100644
--- a/packages/extension/src/providers/ethereum/ui/routes.ts
+++ b/packages/extension/src/providers/ethereum/ui/routes.ts
@@ -1,6 +1,8 @@
import ethAccounts from "./eth-accounts.vue";
import ethSign from "./eth-sign.vue";
import ethSignMessage from "./eth-sign-message.vue";
+import ethVerifyTransaction from "./eth-verify-transaction.vue";
+
import { RouteRecordRaw } from "vue-router";
export const routes = {
ethAccounts: {
@@ -18,6 +20,11 @@ export const routes = {
component: ethSignMessage,
name: "ethSignMessage",
},
+ ethVerifyTransaction: {
+ path: "eth-verify-transaction",
+ component: ethVerifyTransaction,
+ name: "ethVerifyTransaction",
+ },
};
export default (namespace: string): RouteRecordRaw[] => {
return Object.values(routes).map((route) => {
diff --git a/packages/extension/src/providers/polkadot/ui/dot-verify-transaction.vue b/packages/extension/src/providers/polkadot/ui/dot-verify-transaction.vue
new file mode 100644
index 000000000..d81df5465
--- /dev/null
+++ b/packages/extension/src/providers/polkadot/ui/dot-verify-transaction.vue
@@ -0,0 +1,200 @@
+
+
+
+
+

+
Polkadot
+
+
Verify transaction
+
+
+
+
+

+
+
My account nickname
+
+
12.34 dot
+
+ {{
+ $filters.replaceWithEllipsis(
+ "0x14502CF6C0A13167Dc340E25Dabf5FBDB68R5967",
+ 6,
+ 4
+ )
+ }}
+
+
+
+
+
+
+
+

+
+
Polkadot
+
+ https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc.polkadot.io#/explorer
+
+
+
+
+
+

+
+
+
+
+
+
+
+ Warning: you will allow this DApp to spend any amount of ETH at any
+ time in the future. Please proceed only if you are trust this DApp.
+
+
+
+
+
+
+
+
+
+
Show data
+
+
+
Function type: Register Proxy 0xddd81f82
+
Parameters: []
+
HEX data: 4 BYTES
+
0xddd81f82
+
Verified contract on Etherscan
+
Decoded by Truffle
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/packages/extension/src/providers/polkadot/ui/routes.ts b/packages/extension/src/providers/polkadot/ui/routes.ts
index fa9ee4a36..1e305b422 100644
--- a/packages/extension/src/providers/polkadot/ui/routes.ts
+++ b/packages/extension/src/providers/polkadot/ui/routes.ts
@@ -3,6 +3,7 @@ import dotTxApprove from "./dot-approvetx.vue";
import dotApproveSign from "./dot-approvesign.vue";
import dotSignMessage from "./dot-sign-message.vue";
import dotUpdateMetadata from "./dot-update-metadata.vue";
+import dotVerifyTransaction from "./dot-verify-transaction.vue";
import { RouteRecordRaw } from "vue-router";
export const routes = {
dotAccounts: {
@@ -30,6 +31,11 @@ export const routes = {
component: dotUpdateMetadata,
name: "dotUpdateMetadata",
},
+ dotVerifyTransaction: {
+ path: "dot-verify-transaction",
+ component: dotVerifyTransaction,
+ name: "dotVerifyTransaction",
+ },
};
export default (namespace: string): RouteRecordRaw[] => {
diff --git a/packages/extension/src/ui/action/icons/common/right-chevron.vue b/packages/extension/src/ui/action/icons/common/right-chevron.vue
new file mode 100644
index 000000000..9ba96c462
--- /dev/null
+++ b/packages/extension/src/ui/action/icons/common/right-chevron.vue
@@ -0,0 +1,20 @@
+
+
+
+
diff --git a/packages/extension/src/ui/action/icons/raw/eth-green.png b/packages/extension/src/ui/action/icons/raw/eth-green.png
new file mode 100644
index 0000000000000000000000000000000000000000..ddaebdc6628ac9d8eb042926bc13dfe765bd62c3
GIT binary patch
literal 1066
zcmV+_1l9YAP)m!OxThn_-(o73CSR@ZIsEk79M-kE#nJLk-I&plUxC?X9(5B!%r
z3Qk)347?4nMaf#e&6Z^uMFs|XNlKKSoh3Mw2zK{OgxvW5)N@lOVj
z$3C^73YK*b{{uy-HOz&YToF-nkZV50AEB0pwSi922(K0mHEU?3Ikd*)4BH_eeS77L
z}_oUl?xa%0Cz+BAf7~q4iT4Fk`m6YK?pxEt)iZeBTB?mDHF44Y9|(4Ls*a!xj|zC^2Urqe`osvj3iSSrt4SQ
z%o>wv$n`CIZA}OusEUj-X_IfCnL@&}@{VOgI%g)ZK@~CpUb=Xj{A(0=X+0h8#)sH2
zDz@#*nfWG-1YZ8=#aMEd1eU+lU~Z0po^RA_%CI%CFHl5ly%kNPpO?L#GY!0*_=?(Z
z9XMQ6jPsO~#*%ReKvyX(c8iRxAN@khtPJhPE+C#x*h!~#au9uUlXx6`kD>W#)Rmti
zat$rx{SZW#;)yihqV?DyGWx{E5<3erTE?SzGSq_{zOcQoY2VJ
z_A>OsTPrj3L4T($Ob27hIXoKZfDAmATElnSfcfwZouW`DI{EuT95vBTZog@ySNy*-
zEYvY4H@(iY6jIf+GhT#XYJT-Iiv5M0npLz;4MGBX0Lf~nMqidK)x{KnMJ+p?(@m#-
k7wy<>MRYum2_Db?01{A_quYw%K>z>%07*qoM6N<$f^g;PX8-^I
literal 0
HcmV?d00001
diff --git a/packages/extension/src/ui/action/views/modal-forgot/index.vue b/packages/extension/src/ui/action/views/modal-forgot/index.vue
new file mode 100644
index 000000000..c09b97142
--- /dev/null
+++ b/packages/extension/src/ui/action/views/modal-forgot/index.vue
@@ -0,0 +1,84 @@
+
+
+
+
+
+
+
+
+
diff --git a/packages/extension/src/ui/action/views/modal-preload/index.vue b/packages/extension/src/ui/action/views/modal-preload/index.vue
new file mode 100644
index 000000000..3b1296603
--- /dev/null
+++ b/packages/extension/src/ui/action/views/modal-preload/index.vue
@@ -0,0 +1,75 @@
+
+
+
+
+
+
+
+
+
diff --git a/packages/extension/src/ui/action/views/modal-sign/index.vue b/packages/extension/src/ui/action/views/modal-sign/index.vue
new file mode 100644
index 000000000..2bc6bbebf
--- /dev/null
+++ b/packages/extension/src/ui/action/views/modal-sign/index.vue
@@ -0,0 +1,156 @@
+
+
+
+
+
+
+
+
+
diff --git a/packages/extension/src/ui/action/views/swap-best-offer/components/swap-best-offer-block/components/best-offer-error.vue b/packages/extension/src/ui/action/views/swap-best-offer/components/swap-best-offer-block/components/best-offer-error.vue
index cc05a3bb7..42b8fa248 100644
--- a/packages/extension/src/ui/action/views/swap-best-offer/components/swap-best-offer-block/components/best-offer-error.vue
+++ b/packages/extension/src/ui/action/views/swap-best-offer/components/swap-best-offer-block/components/best-offer-error.vue
@@ -11,7 +11,15 @@
short.
-
+
+ Not enough funds. You are
~0.041 ETH ($70) short.
+
+
+
Buy ETH
@@ -34,6 +42,10 @@ defineProps({
type: Boolean,
default: false,
},
+ notEnoughtVerify: {
+ type: Boolean,
+ default: false,
+ },
});
diff --git a/packages/extension/src/ui/action/views/transaction-fee/index.vue b/packages/extension/src/ui/action/views/transaction-fee/index.vue
index cd6b8ad67..96c964ea2 100644
--- a/packages/extension/src/ui/action/views/transaction-fee/index.vue
+++ b/packages/extension/src/ui/action/views/transaction-fee/index.vue
@@ -1,7 +1,17 @@
-
+
+
@@ -44,9 +54,16 @@ import TransactionFeeItem from "./components/transaction-fee-item.vue";
import { fees } from "@action/types/mock";
import { TransactionFee, TransactionFeeSpeed } from "@action/types/fee";
import TimeIcon from "@action/icons/fee/time-icon.vue";
+import CloseIcon from "@action/icons/common/close-icon.vue";
const props = defineProps({
showFees: Boolean,
+ isHeader: {
+ type: Boolean,
+ default: () => {
+ return false;
+ },
+ },
close: {
type: Function,
default: () => {
@@ -118,12 +135,19 @@ const selectFee = (fee: TransactionFee) => {
opacity: 0;
visibility: hidden;
transition: opacity 0.3s, visibility 0s ease-in-out 0.3s;
+ overflow: hidden;
&.show {
opacity: 1;
visibility: visible;
transition-delay: 0s;
}
+
+ &.header {
+ padding: 0;
+ max-height: 512px;
+ bottom: 52px;
+ }
}
&__info {
@@ -193,5 +217,37 @@ const selectFee = (fee: TransactionFee) => {
}
}
}
+
+ &__header {
+ width: 100%;
+ background: @white;
+ box-sizing: border-box;
+ padding: 14px 84px 14px 16px;
+ position: relative;
+ z-index: 4;
+ margin-bottom: 16px;
+
+ h3 {
+ font-style: normal;
+ font-weight: bold;
+ font-size: 24px;
+ line-height: 32px;
+ margin: 0;
+ color: @primaryLabel;
+ }
+ }
+
+ &__close {
+ position: absolute;
+ top: 8px;
+ right: 8px;
+ border-radius: 8px;
+ cursor: pointer;
+ font-size: 0;
+
+ &:hover {
+ background: @black007;
+ }
+ }
}
diff --git a/packages/extension/src/ui/provider-pages/main.ts b/packages/extension/src/ui/provider-pages/main.ts
index eff7bce42..cefd3f70e 100644
--- a/packages/extension/src/ui/provider-pages/main.ts
+++ b/packages/extension/src/ui/provider-pages/main.ts
@@ -3,6 +3,7 @@ import App from "./App.vue";
import { createRouter, createWebHashHistory } from "vue-router";
import routes from "./routes";
import * as filters from "@action/utils/filters";
+import Vue3Lottie from "vue3-lottie";
const router = createRouter({
history: createWebHashHistory(),
@@ -11,7 +12,7 @@ const router = createRouter({
const app = createApp(App);
-app.use(router);
+app.use(router).use(Vue3Lottie);
app.config.globalProperties.$filters = filters;
app.mount("#app");