From ee3e203ccdbb4b3ec9c72fd232a5139aafb2452b Mon Sep 17 00:00:00 2001 From: ryanwolhuter Date: Mon, 9 Oct 2023 14:08:55 +0200 Subject: [PATCH] use modal for safe select Signed-off-by: ryanwolhuter --- src/components/BaseModalSelectItem.vue | 2 +- src/plugins/oSnap/Create.vue | 27 +++++------ src/plugins/oSnap/components/Input/Safe.vue | 36 ++++++++++++++ .../TransactionBuilder/ModalSafe.vue | 47 +++++++++++++++++++ 4 files changed, 95 insertions(+), 17 deletions(-) create mode 100644 src/plugins/oSnap/components/Input/Safe.vue create mode 100644 src/plugins/oSnap/components/TransactionBuilder/ModalSafe.vue diff --git a/src/components/BaseModalSelectItem.vue b/src/components/BaseModalSelectItem.vue index 7f58096fb..2228e3c37 100644 --- a/src/components/BaseModalSelectItem.vue +++ b/src/components/BaseModalSelectItem.vue @@ -23,7 +23,7 @@ defineProps<{ /> {{ tag }} - + diff --git a/src/plugins/oSnap/Create.vue b/src/plugins/oSnap/Create.vue index 8704d43be..401491b7e 100644 --- a/src/plugins/oSnap/Create.vue +++ b/src/plugins/oSnap/Create.vue @@ -2,6 +2,7 @@ import { ExtendedSpace, TreasuryWallet } from '@/helpers/interfaces'; import { formatUnits } from '@ethersproject/units'; import { cloneDeep } from 'lodash'; +import Safe from './components/Input/Safe.vue'; import TransactionBuilder from './components/TransactionBuilder/TransactionBuilder.vue'; import { BalanceResponse, @@ -182,8 +183,8 @@ async function createSafes() { return safes; } -function updateSafe(safeIndex: string) { - newPluginData.value.safe = cloneDeep(safes.value[safeIndex]); +function updateSafe(safe: GnosisSafe) { + newPluginData.value.safe = cloneDeep(safe); update(newPluginData.value); } @@ -220,7 +221,9 @@ onMounted(async () => { Using the oSnap plugin while the SafeSnap plugin is still installed on your place will cause unexpected behavior.

-

Please remove the SafeSnap plugin before using the oSnap plugin.

+

+ Please remove the SafeSnap plugin before using the oSnap plugin. +