Skip to content

Commit 4942569

Browse files
authored
Merge pull request #11352 from hassnian/issue-11351
feat: Simplify Item Swaps to One-for-One Swaps
2 parents 7135d49 + 750268e commit 4942569

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

components/swap/GridList.vue

+4-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
grid-size="medium"
1212
:grid-section="gridSection"
1313
link-target="_blank"
14-
:hide-hover-action="!selectable"
14+
:hide-hover-action="!selectable || stepItems.length === MAX_AMOUNT_OF_SWAP_ITEMS"
1515
>
1616
<template
1717
v-if="surcharge"
@@ -31,6 +31,8 @@ import { type SwapSurcharge } from '@/composables/transaction/types'
3131
3232
const gridSection = GridSection.PROFILE_GALLERY
3333
34+
const MAX_AMOUNT_OF_SWAP_ITEMS = 1
35+
3436
const props = defineProps<{
3537
query: Record<string, any>
3638
selectable?: boolean
@@ -40,6 +42,7 @@ const props = defineProps<{
4042
4143
const route = useRoute()
4244
const { replaceUrl } = useReplaceUrl()
45+
const { stepItems } = storeToRefs(useAtomicSwapStore())
4346
4447
const collections = ref(route.query.collections?.toString().split(',').filter(Boolean) || [])
4548

0 commit comments

Comments
 (0)