From 44005b2ef848f327e06397d32cbf33cbbd0e85dd Mon Sep 17 00:00:00 2001
From: Jarsen <31397967+Jarsen136@users.noreply.github.com>
Date: Sat, 21 Sep 2024 13:53:08 +0200
Subject: [PATCH 1/7] fix: Weird redirect after removing RMRK
---
middleware/redirects.global.ts | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/middleware/redirects.global.ts b/middleware/redirects.global.ts
index 6117ff983f..ebad5bd674 100644
--- a/middleware/redirects.global.ts
+++ b/middleware/redirects.global.ts
@@ -31,6 +31,10 @@ export default defineNuxtRouteMiddleware((route) => {
return accountId.value ? `/${urlPrefix.value}/u/${accountId.value}` : `/${urlPrefix.value}`
},
},
+ {
+ cond: (val: string) => ['ksm', 'rmrk'].some(prefix => val.startsWith(`/${prefix}`) && !val.startsWith(`/${prefix}/transfer`)),
+ replaceValue: () => `/ahp`,
+ },
{
cond: (val: string) =>
val.startsWith(`/${urlPrefix.value}`) && val.endsWith('collections'),
From 8376cfc5733e768b65b3542b95e95258d6e059aa Mon Sep 17 00:00:00 2001
From: Jarsen <31397967+Jarsen136@users.noreply.github.com>
Date: Mon, 23 Sep 2024 10:50:51 +0200
Subject: [PATCH 2/7] fix: hide explore on rmrk
---
components/Navbar.vue | 6 ++++--
utils/config/permission.config.ts | 2 ++
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/components/Navbar.vue b/components/Navbar.vue
index 2d7ca39e0f..bcffbed635 100644
--- a/components/Navbar.vue
+++ b/components/Navbar.vue
@@ -116,6 +116,7 @@
@@ -259,10 +261,9 @@ import NavbarChainOptions from '@/components/navbar/NavbarChainOptions.vue'
import NavbarExploreOptions from '@/components/navbar/NavbarExploreOptions.vue'
import Search from '@/components/search/Search.vue'
import ConnectWalletButton from '@/components/shared/ConnectWalletButton.vue'
-
+import { explorerVisible, createVisible } from '@/utils/config/permission.config'
import { useIdentityStore } from '@/stores/identity'
import { getChainNameByPrefix } from '@/utils/chain'
-import { createVisible } from '@/utils/config/permission.config'
const { neoModal } = useProgrammatic()
const openMobileSearchBar = ref(false)
@@ -280,6 +281,7 @@ const mobilSearchRef = ref<{ focusInput: () => void } | null>(null)
const account = computed(() => identityStore.getAuthAddress)
const isCreateVisible = computed(() => createVisible(urlPrefix.value))
+const isExplorerVisible = computed(() => explorerVisible(urlPrefix.value))
const logoSrc = computed(() => {
const variant = isTouch ? 'Koda' : 'Koda_Beta'
diff --git a/utils/config/permission.config.ts b/utils/config/permission.config.ts
index 85585a2291..fd048f4660 100644
--- a/utils/config/permission.config.ts
+++ b/utils/config/permission.config.ts
@@ -24,6 +24,8 @@ const hasMassmintCreate: PartialConfig = {
const hasExplorer: PartialConfig = {
dot: false,
+ rmrk: false,
+ ksm: false,
}
export const createVisible = (prefix: Prefix | string): boolean => {
From dce5a63cd6c8a09198844518fa3447bac9af2f51 Mon Sep 17 00:00:00 2001
From: Jarsen <31397967+Jarsen136@users.noreply.github.com>
Date: Tue, 24 Sep 2024 13:28:14 +0200
Subject: [PATCH 3/7] fix: url redirect
---
middleware/prefix.global.ts | 6 +-----
middleware/redirects.global.ts | 2 +-
2 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/middleware/prefix.global.ts b/middleware/prefix.global.ts
index 6f4009a375..c4b6e7d521 100644
--- a/middleware/prefix.global.ts
+++ b/middleware/prefix.global.ts
@@ -8,16 +8,12 @@ export default defineNuxtRouteMiddleware((route) => {
const { setUrlPrefix, urlPrefix } = usePrefix()
const isAnyChainPrefixInPath = chainPrefixes.includes(prefixInPath)
-
if (['rmrk', 'ksm', 'dot'].some(prefix => [urlPrefix.value, prefixInPath].includes(prefix as Prefix))
&& route.name !== 'prefix-transfer'
) {
setUrlPrefix('ahp')
- location.replace(location.href.replace(prefixInPath, 'ahp'))
- return
}
-
- if (
+ else if (
urlPrefix.value !== prefixInPath
&& prefixInPath
&& isAnyChainPrefixInPath
diff --git a/middleware/redirects.global.ts b/middleware/redirects.global.ts
index ebad5bd674..154050e07d 100644
--- a/middleware/redirects.global.ts
+++ b/middleware/redirects.global.ts
@@ -32,7 +32,7 @@ export default defineNuxtRouteMiddleware((route) => {
},
},
{
- cond: (val: string) => ['ksm', 'rmrk'].some(prefix => val.startsWith(`/${prefix}`) && !val.startsWith(`/${prefix}/transfer`)),
+ cond: (val: string) => ['ksm', 'rmrk', '/dot'].some(prefix => val.startsWith(`/${prefix}`) && !val.startsWith(`/${prefix}/transfer`)),
replaceValue: () => `/ahp`,
},
{
From e946139edb7e59d41b2c6a6fe24a064d93ff00b9 Mon Sep 17 00:00:00 2001
From: Jarsen <31397967+Jarsen136@users.noreply.github.com>
Date: Sun, 29 Sep 2024 21:54:52 +0200
Subject: [PATCH 4/7] fix: Base: Minted NFT - didnt get successfull mint
preview
---
composables/drop/useGenerativeDropMint.ts | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/composables/drop/useGenerativeDropMint.ts b/composables/drop/useGenerativeDropMint.ts
index 05b5877ff2..adf65ba170 100644
--- a/composables/drop/useGenerativeDropMint.ts
+++ b/composables/drop/useGenerativeDropMint.ts
@@ -1,3 +1,4 @@
+import { isEthereumAddress } from '@polkadot/util-crypto'
import { type DoResult, updateMetadata } from '@/services/fxart'
import { useDrop } from '@/components/drops/useDrops'
import useDropMassMintListing from '@/composables/drop/massmint/useDropMassMintListing'
@@ -65,7 +66,7 @@ export const useUpdateMetadata = async ({
useSubscriptionGraphql({
query: `
nfts: nftEntities(
- where: {collection: {id_eq: "${drop.value.collection}"}, blockNumber_eq: "${blockNumber.value}", currentOwner_eq: "${accountId.value}"},
+ where: {collection: {id_eq: "${drop.value.collection}"}, blockNumber_eq: "${blockNumber.value}", currentOwner_eq: "${isEthereumAddress(accountId.value) ? accountId.value.toLowerCase() : accountId.value}"},
orderBy: [createdAt_ASC, sn_ASC]
) {
id
From b7e9b84ba04e2c99b083c2cb1ac63fd4c55c7138 Mon Sep 17 00:00:00 2001
From: Jarsen <31397967+Jarsen136@users.noreply.github.com>
Date: Mon, 30 Sep 2024 10:54:11 +0200
Subject: [PATCH 5/7] Update middleware/redirects.global.ts
Co-authored-by: Viki Val
---
middleware/redirects.global.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/middleware/redirects.global.ts b/middleware/redirects.global.ts
index 154050e07d..fbf7f97c05 100644
--- a/middleware/redirects.global.ts
+++ b/middleware/redirects.global.ts
@@ -32,7 +32,7 @@ export default defineNuxtRouteMiddleware((route) => {
},
},
{
- cond: (val: string) => ['ksm', 'rmrk', '/dot'].some(prefix => val.startsWith(`/${prefix}`) && !val.startsWith(`/${prefix}/transfer`)),
+ cond: (val: string) => ['ksm', 'rmrk', 'dot'].some(prefix => val.startsWith(`/${prefix}`) && !val.startsWith(`/${prefix}/transfer`)),
replaceValue: () => `/ahp`,
},
{
From 7478fa9b7f91cf07d06b90c7885efb5d42b9803a Mon Sep 17 00:00:00 2001
From: hassnian
Date: Mon, 30 Sep 2024 15:24:01 +0500
Subject: [PATCH 6/7] ref(useUpdateProfile.ts): parallel profile image
uploading
---
composables/useUpdateProfile.ts | 31 ++++++++++++++++---------------
1 file changed, 16 insertions(+), 15 deletions(-)
diff --git a/composables/useUpdateProfile.ts b/composables/useUpdateProfile.ts
index aa636d34e1..de46ca2e12 100644
--- a/composables/useUpdateProfile.ts
+++ b/composables/useUpdateProfile.ts
@@ -23,21 +23,22 @@ export default async ({
hasProfile: boolean
useFarcaster: boolean
}) => {
- const imageUrl = profileData.image
- ? await uploadProfileImage({
- file: profileData.image,
- type: 'image',
- signaturePair,
- })
- : profileData.imagePreview
-
- const bannerUrl = profileData.banner
- ? await uploadProfileImage({
- file: profileData.banner,
- type: 'banner',
- signaturePair,
- })
- : profileData.bannerPreview
+ const [imageUrl, bannerUrl] = await Promise.all([
+ profileData.image
+ ? uploadProfileImage({
+ file: profileData.image,
+ type: 'image',
+ signaturePair,
+ })
+ : Promise.resolve(profileData.imagePreview),
+ profileData.banner
+ ? uploadProfileImage({
+ file: profileData.banner,
+ type: 'banner',
+ signaturePair,
+ })
+ : Promise.resolve(profileData.bannerPreview),
+ ])
const profileBody: CreateProfileRequest | UpdateProfileRequest = {
address: profileData.address,
From 40701672f10d5efcb7eaa2b57bef631ece648c41 Mon Sep 17 00:00:00 2001
From: hassnian
Date: Mon, 30 Sep 2024 19:07:08 +0500
Subject: [PATCH 7/7] fix(transactionMintDrop.ts): wrong value massmint
---
composables/transaction/transactionMintDrop.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/composables/transaction/transactionMintDrop.ts b/composables/transaction/transactionMintDrop.ts
index e025e533d8..648490478c 100644
--- a/composables/transaction/transactionMintDrop.ts
+++ b/composables/transaction/transactionMintDrop.ts
@@ -62,7 +62,7 @@ async function execEvmMintDrop({ executeTransaction }: EvmMintDropParams) {
abi,
arg,
functionName,
- value: drop.value.price,
+ value: String(Number(drop.value.price) * amountToMint.value),
})
}