Skip to content

Commit

Permalink
Merge pull request #11231 from hassnian/issue-11216
Browse files Browse the repository at this point in the history
feat: Swap Landing link
  • Loading branch information
vikiival authored Dec 10, 2024
2 parents 44bf46c + 1e0cf84 commit 7467051
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 17 deletions.
24 changes: 7 additions & 17 deletions components/common/ConnectWallet/WalletAssetMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,11 @@
import { NeoDropdown, NeoDropdownItem, NeoIcon } from '@kodadot1/brick'
import type { Prefix } from '@kodadot1/static'
import { langsFlags, setUserLocale } from '@/utils/config/i18n'
import { transferVisible, teleportVisible } from '@/utils/config/permission.config'
import { transferVisible, teleportVisible, swapVisible } from '@/utils/config/permission.config'
const { urlPrefix } = usePrefix()
// const { isAssetHub } = useIsChain(urlPrefix)
const { neoModal } = useProgrammatic()
const { $i18n } = useNuxtApp()
const menus = ref<{ label: string, to: string, check: (v: Prefix) => boolean }[]>([
{
Expand All @@ -99,23 +99,13 @@ const menus = ref<{ label: string, to: string, check: (v: Prefix) => boolean }[]
to: `/${urlPrefix.value}/teleport`,
check: teleportVisible,
},
{
label: $i18n.t('swap.swap'),
to: `/${urlPrefix.value}/swap`,
check: swapVisible,
},
])
// TODO: enable when asset hub offers are ready
// watchEffect(() => {
// if (isAssetHub.value) {
// menus.value.push({
// label: 'Incoming Offers',
// to: `/${urlPrefix.value}/incomingoffers`,
// })
// menus.value.push({
// label: 'Assets',
// to: `/${urlPrefix.value}/assets`,
// })
// }
// })
const filteredMenus = computed(() =>
menus.value.filter(menu => menu.check(urlPrefix.value)),
)
Expand Down
1 change: 1 addition & 0 deletions locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1840,6 +1840,7 @@
"selectOffer": "Select your offer",
"selectOfferSubtitle": "Select your NFTs you want to offer in this swap.",
"submit": "Submit Swap Offer",
"swap": "Swap",
"swapWithdrawl": "Swap Cancelation",
"youOffer": "You offer",
"youWillReceive": "You will receive",
Expand Down

0 comments on commit 7467051

Please sign in to comment.