From 29e714e8c584bb053aa86fb60d31d37ec69563c1 Mon Sep 17 00:00:00 2001 From: Lionell Briones Date: Tue, 3 Dec 2024 14:55:06 +0800 Subject: [PATCH] allow config confirmation strategy --- demo/vue-app-new/src/MainView.vue | 3 ++- .../src/components/AppSettings.vue | 19 ++++++++++++++++++- demo/vue-app-new/src/config.ts | 8 ++++++++ demo/vue-app-new/src/translations/en.json | 4 ++-- 4 files changed, 30 insertions(+), 4 deletions(-) diff --git a/demo/vue-app-new/src/MainView.vue b/demo/vue-app-new/src/MainView.vue index 056936902..61aa188c1 100644 --- a/demo/vue-app-new/src/MainView.vue +++ b/demo/vue-app-new/src/MainView.vue @@ -36,7 +36,7 @@ const externalAdapters = ref[]>([]); const walletPlugins = computed(() => { if (formData.chainNamespace !== CHAIN_NAMESPACES.EIP155 || !formData.walletPlugin.enable) return []; - const { logoDark, logoLight } = formData.walletPlugin; + const { logoDark, logoLight, confirmationStrategy } = formData.walletPlugin; const walletServicesPlugin = new WalletServicesPlugin({ walletInitOptions: { whiteLabel: { showWidgetButton: true, logoDark: logoDark || "logo", logoLight: logoLight || "logo" }, @@ -46,6 +46,7 @@ const walletPlugins = computed(() => { logLevel: "debug", }, }, + confirmationStrategy, }, }); return [walletServicesPlugin]; diff --git a/demo/vue-app-new/src/components/AppSettings.vue b/demo/vue-app-new/src/components/AppSettings.vue index 465fc8d42..c87e75f6e 100644 --- a/demo/vue-app-new/src/components/AppSettings.vue +++ b/demo/vue-app-new/src/components/AppSettings.vue @@ -4,7 +4,15 @@ import { ADAPTER_STATUS, CHAIN_NAMESPACES, ChainNamespaceType, log } from "@web3 import { useWeb3Auth } from "@web3auth/modal-vue-composables"; import { computed, InputHTMLAttributes, ref } from "vue"; -import { chainConfigs, chainNamespaceOptions, languageOptions, loginProviderOptions, networkOptions, SmartAccountOptions } from "../config"; +import { + chainConfigs, + chainNamespaceOptions, + confirmationStrategyOptions, + languageOptions, + loginProviderOptions, + networkOptions, + SmartAccountOptions, +} from "../config"; import { formDataStore } from "../store/form"; const formData = formDataStore; @@ -350,6 +358,15 @@ const onChainNamespaceChange = (value: string) => { :placeholder="$t('app.walletPlugin.logoDark')" class="sm:col-span-2" /> +