From 06071afc7a5367491ae97f0509e4c220b6dd625d Mon Sep 17 00:00:00 2001 From: Luki Centuri Date: Thu, 21 Nov 2024 18:02:40 +0100 Subject: [PATCH 1/2] feat: integrate wallet connect Co-authored-by: Konstantinos Paparas --- .env.example | 1 + components/account/home/AccountAddress.vue | 1 + .../account/home/AccountInformation.vue | 1 + components/account/home/ChangePassword.vue | 1 + components/checkout/pay/CryptoPage.vue | 109 +- components/checkout/pay/CryptoPaymentForm.vue | 50 +- components/icons/MetamaskIcon.vue | 188 -- composables/crypto-payment.ts | 149 +- i18n/locales/en.json | 14 +- modules/ui-library/runtime/plugin.ts | 2 + nuxt.config.ts | 3 + package.json | 24 +- pages/checkout/success.vue | 1 + pnpm-lock.yaml | 1973 ++++++++++++++--- server/middleware/csp.ts | 34 + types/index.ts | 20 - 16 files changed, 1896 insertions(+), 675 deletions(-) delete mode 100644 components/icons/MetamaskIcon.vue diff --git a/.env.example b/.env.example index fb227a93..3a25abe7 100644 --- a/.env.example +++ b/.env.example @@ -4,3 +4,4 @@ NUXT_PUBLIC_MAINTENANCE=false NUXT_PUBLIC_TESTING=true #PROXY_DOMAIN=rotki.com #PROXY_INSECURE=true #When set it will proxy to http instead of https +NUXT_PUBLIC_WALLET_CONNECT_PROJECT_ID= diff --git a/components/account/home/AccountAddress.vue b/components/account/home/AccountAddress.vue index 2e019095..a64a2e88 100644 --- a/components/account/home/AccountAddress.vue +++ b/components/account/home/AccountAddress.vue @@ -4,6 +4,7 @@ import { required } from '@vuelidate/validators'; import { get, objectOmit, set } from '@vueuse/core'; import { storeToRefs } from 'pinia'; import { useMainStore } from '~/store'; +import { toMessages } from '~/utils/validation'; const store = useMainStore(); const state = reactive({ diff --git a/components/account/home/AccountInformation.vue b/components/account/home/AccountInformation.vue index 790f074e..1d3e6050 100644 --- a/components/account/home/AccountInformation.vue +++ b/components/account/home/AccountInformation.vue @@ -4,6 +4,7 @@ import { required } from '@vuelidate/validators'; import { get, objectOmit, set } from '@vueuse/core'; import { storeToRefs } from 'pinia'; import { useMainStore } from '~/store'; +import { toMessages } from '~/utils/validation'; const store = useMainStore(); const state = reactive({ diff --git a/components/account/home/ChangePassword.vue b/components/account/home/ChangePassword.vue index 053fe915..b0b6ae25 100644 --- a/components/account/home/ChangePassword.vue +++ b/components/account/home/ChangePassword.vue @@ -3,6 +3,7 @@ import { useVuelidate } from '@vuelidate/core'; import { minLength, required, sameAs } from '@vuelidate/validators'; import { get, set } from '@vueuse/core'; import { useMainStore } from '~/store'; +import { toMessages } from '~/utils/validation'; import type { ActionResult } from '~/types/common'; const loading = ref(false); diff --git a/components/checkout/pay/CryptoPage.vue b/components/checkout/pay/CryptoPage.vue index f8c9bb83..2eec3a2c 100644 --- a/components/checkout/pay/CryptoPage.vue +++ b/components/checkout/pay/CryptoPage.vue @@ -1,75 +1,26 @@