diff --git a/components/transfer/Transfer.vue b/components/transfer/Transfer.vue index 848976e8a4..fcfa97b816 100644 --- a/components/transfer/Transfer.vue +++ b/components/transfer/Transfer.vue @@ -45,7 +45,7 @@ @@ -833,13 +833,13 @@ const onTxError = async (dispatchError: DispatchError): Promise => { isLoading.value = false } -const generateRecurringPaymentLink = () => { +const recurringPaymentLink = computed(() => { const addressList = targetAddresses.value .filter((item) => isAddress(item.address) && !item.isInvalid) .map((item) => item.address) return generatePaymentLink(addressList) -} +}) const generatePaymentLink = (addressList: string[]): string => { const url = new URL(`${location.origin}${location.pathname}`) diff --git a/plugins/vueClipboard.ts b/plugins/vueClipboard.ts index b3d30429eb..21580470db 100644 --- a/plugins/vueClipboard.ts +++ b/plugins/vueClipboard.ts @@ -3,14 +3,22 @@ export default defineNuxtPlugin((nuxtApp) => { nuxtApp.vueApp.directive('clipboard', { beforeMount(el, { value, arg }) { + el.dataset._clipboard_value = value useEventListener(el, 'click', () => { switch (arg) { case 'copy': - copy(value) + copy(el.dataset._clipboard_value) break } }) }, + updated(el, { value, arg }) { + switch (arg) { + case 'copy': + el.dataset._clipboard_value = value + break + } + }, }) return {