Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(prod): 63% of September 2024 Zebra 🦓 #11008

Merged
merged 80 commits into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
a1b6bdd
refactor: Deprecation of RMRK
Jarsen136 Jul 24, 2024
06af565
fix: eslint
Jarsen136 Jul 24, 2024
a9e49ec
fix: prefixs
Jarsen136 Jul 24, 2024
410aa21
fix: search params
Jarsen136 Jul 25, 2024
0df2b23
Merge branch 'main' into issue-10643-main
Jarsen136 Jul 30, 2024
47ce216
[skip ci] updated code diagram
kkukelka Sep 4, 2024
a5453d5
feat(drops): `evm` support `safeBatchMint` based on `abi`
hassnian Sep 11, 2024
263295c
Merge branch 'main' into issue-10815
vikiival Sep 11, 2024
0d9c1c3
fix(useWallet.ts): use async wagmi wallet disconnect
hassnian Sep 12, 2024
e6fd128
add(ConnectEvm.vue): close active connections before openning web3modal
hassnian Sep 12, 2024
f366905
fix(ConnectEvm.vue): pre-disconnect catch error with `finally`
hassnian Sep 12, 2024
56d4a39
Merge branch 'main' into issue-10643-main
Jarsen136 Sep 12, 2024
be67f6c
Merge branch 'issue-10643-main' of github.com:Jarsen136/nft-gallery i…
Jarsen136 Sep 12, 2024
e5b5f4e
fix(profile/utils.ts): `getBioWithLinks` handle chanel matches in urls
hassnian Sep 13, 2024
287b199
fix(profile/utils.ts): sonarcloud regex issue
hassnian Sep 13, 2024
93dfa33
Merge pull request #10972 from hassnian/issue-10971
vikiival Sep 13, 2024
c6f3171
Merge branch 'main' into issue-10815
vikiival Sep 13, 2024
c106067
✨ middleware profile page redirect
roiLeo Sep 13, 2024
cf2d06f
🔧 create profile twitter icon
roiLeo Sep 13, 2024
7ae78c6
Merge pull request #10973 from hassnian/issue-10949
Jarsen136 Sep 15, 2024
b416807
Merge pull request #10976 from roiLeo/fix/profile/twitterIcon
Jarsen136 Sep 15, 2024
ef537f2
Merge pull request #10967 from hassnian/issue-10815
hassnian Sep 16, 2024
f485a1c
🔧 fallback landing
roiLeo Sep 16, 2024
7ce534a
🔧 middleware/redirects.global.ts
roiLeo Sep 16, 2024
a1e1427
Merge branch 'main' into feature/middleware/profile
roiLeo Sep 16, 2024
3b7d964
Merge branch 'main' into issue-10643-main
vikiival Sep 16, 2024
1624871
add(GalleryItem): actions use `oda` fetched `abi`
hassnian Sep 16, 2024
754c79c
fix: deny list
Jarsen136 Sep 16, 2024
fec48aa
Merge branch 'issue-10643-main' of github.com:Jarsen136/nft-gallery i…
Jarsen136 Sep 16, 2024
dd6f4ae
🔧 middleware/redirects.global.ts
roiLeo Sep 16, 2024
29af785
Merge pull request #10975 from roiLeo/feature/middleware/profile
vikiival Sep 16, 2024
e4eebff
[skip netlify] Update Bumped minor version of packages
renovate[bot] Sep 16, 2024
1d7ede9
Merge pull request #10932 from kodadot/action
vikiival Sep 16, 2024
324fa29
Merge pull request #10702 from kodadot/renovate/bumped-minor-version-…
vikiival Sep 16, 2024
9ce5a16
Merge branch 'main' into issue-10643-main
Jarsen136 Sep 16, 2024
04b27a2
fix(MakeOffer.vue): weird modal closing animation
hassnian Sep 16, 2024
fd035ab
ref(MakeOffer.vue): check if single item offer
hassnian Sep 16, 2024
632943a
Merge pull request #10984 from hassnian/issue-10982
vikiival Sep 16, 2024
df2e074
fix: lint:fix
Jarsen136 Sep 16, 2024
4d3611f
fix(SearchSuggestion.vue): navbar see all not adding search key
hassnian Sep 16, 2024
6b51139
fix: `/explore/items` search param getting cleared
hassnian Sep 16, 2024
cd8e5dd
fix(items.vue): query param type
hassnian Sep 16, 2024
525155e
Merge branch 'main' into issue-10704
hassnian Sep 16, 2024
7a9f80a
fix: make sure index.html exist on root of the folder
Jarsen136 Sep 16, 2024
c94361b
fix(items.vue): allow all query
hassnian Sep 17, 2024
bb26f25
Merge branch 'issue-10704' of https://github.com/hassnian/nft-gallery…
hassnian Sep 17, 2024
7342867
add(IdentityPopoverFooter.vue): skeleton loader for followers in hove…
hassnian Sep 17, 2024
98d0d56
Merge pull request #10987 from Jarsen136/issue-10983-eslint
vikiival Sep 17, 2024
6d86781
Merge branch 'main' into issue-10981
vikiival Sep 17, 2024
7ca2d09
Merge pull request #10989 from Jarsen136/issue-10981
vikiival Sep 17, 2024
35577ab
Merge branch 'main' into issue-10643-main
Jarsen136 Sep 17, 2024
449d300
Merge branch 'main' into issue-10647
vikiival Sep 17, 2024
2cf6a14
Merge pull request #10990 from hassnian/issue-10647
vikiival Sep 17, 2024
d743f31
fix(useListingCartModal.ts): cart cleared before modal animation is f…
hassnian Sep 17, 2024
69358d0
Merge branch 'main' into issue-10643-main
preschian Sep 17, 2024
8f452d7
Merge branch 'main' into issue-10704
preschian Sep 17, 2024
3ddc32e
fix: hide migrate route
Jarsen136 Sep 17, 2024
8bd45cf
fix: Remove notif on landing
Jarsen136 Sep 17, 2024
d4b47eb
Merge pull request #10994 from hassnian/fix/issue-listing-cart-modal-…
vikiival Sep 17, 2024
7f9b229
Merge pull request #10980 from hassnian/issue-10978
vikiival Sep 17, 2024
1bbfaf6
Merge pull request #10986 from hassnian/issue-10704
vikiival Sep 17, 2024
6f63216
add(offers): modals early succes dyanmic notification
hassnian Sep 18, 2024
e1f2d27
fix(OfferOverviewModal.vue): `manage offers` redirect to offers tab
hassnian Sep 18, 2024
8570ee9
Merge pull request #10996 from Jarsen136/issue-10995
vikiival Sep 18, 2024
157df86
fix(drops): hide lisitng cart mini & disable listing from drop nft grid
hassnian Sep 18, 2024
4057f84
add(offers): Visible second currency in the offer creation modal
hassnian Sep 19, 2024
9290e13
fix(offers): only show indexer delay message for offers
hassnian Sep 19, 2024
93d3ec1
fix(notification.ts): param typo
hassnian Sep 19, 2024
8cd6420
fix(drop-checker): warning <tr> cannot be child of <table>, accordin…
hassnian Sep 19, 2024
4141440
Merge branch 'main' into issue-10643-main
vikiival Sep 19, 2024
87cada1
Merge pull request #10686 from Jarsen136/issue-10643-main
vikiival Sep 19, 2024
15317ef
Merge pull request #11005 from hassnian/issue-11004
hassnian Sep 19, 2024
76aba7a
Merge branch 'main' into issue-10952
vikiival Sep 19, 2024
0a367cc
Merge pull request #10997 from hassnian/issue-10952
vikiival Sep 19, 2024
eedf527
Merge pull request #11002 from hassnian/issue-10998
vikiival Sep 19, 2024
fc2b589
Merge pull request #11000 from hassnian/issue-10646-2
vikiival Sep 19, 2024
ae60a13
Merge pull request #11007 from kodadot/main
vikiival Sep 19, 2024
a7211d9
:wrench: use 64 as a default
vikiival Sep 19, 2024
962c5b1
Merge pull request #11013 from kodadot/fix/fallback-max
vikiival Sep 19, 2024
e55a80d
Merge pull request #11014 from kodadot/main
vikiival Sep 19, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_minting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,7 @@ body:
multiple: true
options:
- Basilisk
- Kusama
- MoonBeam
- RMRK2
- type: textarea
id: Screenshots
attributes:
Expand Down
102 changes: 0 additions & 102 deletions .github/ISSUE_TEMPLATE/bug_rmrk2.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/diagram.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
68 changes: 0 additions & 68 deletions components/accounts/utils.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
import { encodeAddress, isAddress } from '@polkadot/util-crypto'
import { Interaction, createInteraction } from '@kodadot1/minimark/v1'
import {
Interaction as InteractionV2,
createInteraction as createInteractionV2,
} from '@kodadot1/minimark/v2'
import correctFormat from '~/utils/ss58Format'
import { useChainStore } from '@/stores/chain'

export type ShuffleFunction = (arr: string[]) => string[]
export type ProcessFunction = (nfts: string[] | AdminNFT[]) => string[]
export type SendType = {
parsedAddresses: string[]
Expand All @@ -17,10 +11,6 @@ export type SendType = {

export type AdminNFT = { id: string, price: string }

export const toDistribute = (length: number, distribution: number): number => {
return Math.floor((length * distribution) / 100)
}

export const parseBatchAddresses = (batchAddresses: string): string[] => {
const chainStore = useChainStore()
const ss58Format = chainStore.getChainProperties58Format
Expand All @@ -37,61 +27,3 @@ export const parseBatchAddresses = (batchAddresses: string): string[] => {

return onlyValid
}

export const sendFunction = (
parsedAddresses: string[],
distribution: number,
random?: ShuffleFunction,
): ProcessFunction => {
const randomFn = random ? random : notRandomFunction
const slice = toDistribute(parsedAddresses.length, distribution)
const subset = randomFn(Array.from(new Set(parsedAddresses))).slice(0, slice)
return (nfts: string[] | AdminNFT[]) => {
const { isV2 } = useRmrkVersion()
const lessTokensThanAdresses = nfts.length < subset.length
const final = subset.slice(
0,
lessTokensThanAdresses ? nfts.length : undefined,
)
return final.map((addr, index) => {
const id = justId(nfts[index])
const recipient = String(addr)
if (isV2.value) {
return createInteractionV2({
action: InteractionV2.SEND,
payload: { id, recipient },
})
}
return createInteraction(Interaction.SEND, id, recipient)
})
}
}

const justId = (nft: AdminNFT | string) =>
typeof nft === 'object' ? nft.id : nft

// TODO: skip if already in the list
function notRandomFunction(array: string[]): string[] {
return array
}

export const shuffleFunction
= (seed: number[]): ShuffleFunction =>
(array: string[]): string[] =>
shuffle(array, seed)

export function shuffle(array: string[], seed: number[]): string[] {
const copy = array.slice(0)
const len = seed.length - 1
const total = array.length - 1

for (let i = copy.length - 1; i > 0; i--) {
const j = Math.floor(seed[i % len] * (i + 1)) % total
const temp = copy[i]
copy[i] = copy[j]
copy[j] = temp
}
return copy
}

// api.query.babe.randomness()
5 changes: 3 additions & 2 deletions components/balance/MultipleBalances.vue
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,11 @@ import type { ChainToken, ChainType } from '@/stores/identity'
import { useIdentityStore } from '@/stores/identity'

const displayChainOrder: ChainType[] = [
'polkadot',
'polkadotHub',
'kusama',
'kusamaHub',
'polkadot',
'kusama',

]
const identityStore = useIdentityStore()

Expand Down
2 changes: 1 addition & 1 deletion components/carousel/module/CarouselInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -102,5 +102,5 @@ const showPrice = computed((): boolean => {
return Number(price.value) > 0 && !isCollection
})

const unitSymbol = computed(() => prefixToToken[props.item.chain || 'ksm'])
const unitSymbol = computed(() => prefixToToken[props.item.chain || 'ahp'])
</script>
11 changes: 3 additions & 8 deletions components/carousel/utils/useCarouselEvents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { AHK_GENERATIVE_DROPS } from '@/utils/drop'
import { getDrops } from '@/services/fxart'

import latestEvents from '@/queries/subsquid/general/latestEvents.graphql'
import latestEventsRmrkv2 from '@/queries/subsquid/ksm/latestEvents.graphql'

interface Types {
type: 'latestSales' | 'newestList'
Expand All @@ -19,10 +18,8 @@ const nftEventVariables = {
}

const fetchLatestEvents = (chain, type, where = {}, limit = 20) => {
const query = chain === 'ksm' ? latestEventsRmrkv2 : latestEvents

return useQuery(
query,
latestEvents,
{
limit,
orderBy: 'timestamp_DESC',
Expand Down Expand Up @@ -158,10 +155,8 @@ const sortNfts = (data) => {
}

const CAROUSEL_LIMIT: Partial<Record<Prefix, number>> = {
ahp: 11,
ahk: 11,
rmrk: 4,
ksm: 4,
ahp: 15,
ahk: 15,
}

export const useCarouselNftEvents = ({ type }: Types) => {
Expand Down
5 changes: 5 additions & 0 deletions components/codeChecker/CodeChecker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,11 @@ const onFileSelected = async (file: File) => {
const { indexFile, sketchFile, entries }
= await extractAssetsFromZip(file)

if (!indexFile) {
errorMessage.value = `Index file not found: Please make sure that “index.html” is in the root directory`
return
}

if (!sketchFile) {
errorMessage.value = `Sketch file not found: ${config.sketchFile}`
return
Expand Down
2 changes: 1 addition & 1 deletion components/codeChecker/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ const categorizeFiles = async (
const adjustedPath = path.replace(commonPrefix, '')
const content = await file.text()

if (path.endsWith('index.html')) {
if (path === 'index.html') {
htmlFiles.push({ path: adjustedPath, content })
}
else if (path.endsWith('.js') && !path.includes(config.p5)) {
Expand Down
5 changes: 0 additions & 5 deletions components/collection/CollectionGrid.vue
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ const slots = useSlots()
const route = useRoute()
const { accountId } = useAuth()
const { urlPrefix, client } = usePrefix()
const { isRemark } = useIsChain(urlPrefix)
const preferencesStore = usePreferencesStore()

const isProfilePage = route.name === 'prefix-u-id'
Expand Down Expand Up @@ -123,10 +122,6 @@ const getQueryVariables = (page: number) => {
Object.assign(searchParams, { nftCount_not_eq: 0 })
}

if (isRemark.value) {
delete searchParams.burned_eq
}

return props.id
? {
search: [searchParams],
Expand Down
4 changes: 2 additions & 2 deletions components/collection/activity/ActivityChart.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<template>
<PriceChart
v-if="events.length > 0"
v-model:hideOutliers="hideOutliers"
v-model:applySmoothing="applySmoothing"
v-model:hide-outliers="hideOutliers"
v-model:apply-smoothing="applySmoothing"
:price-chart-data="chartData"
chart-height="350px"
data-testid="collection-activity-chart"
Expand Down
1 change: 1 addition & 0 deletions components/collection/drop/ItemsGrid.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
:grid-size="'medium'"
display-name-with-sn
collection-popover-hide
hide-listing
show-timestamp
:reset-search-query-params="['sort']"
/>
Expand Down
3 changes: 2 additions & 1 deletion components/collection/drop/MintStepper.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@
<script lang="ts" setup>
import { NeoStepper } from '@kodadot1/brick'
import useHolderOfCollection from '@/composables/drop/useHolderOfCollection'
import { hasBatchMint } from '@/composables/transaction/evm/utils'

const { availableNfts } = useHolderOfCollection()
const { amountToMint, drop } = storeToRefs(useDropStore())
const { isEvm } = useIsChain(usePrefix().urlPrefix)

const show = computed(() => drop.value.type !== 'free' && !isEvm.value)
const show = computed(() => isEvm.value ? hasBatchMint(drop.value?.abi || []) : drop.value.type !== 'free')
const isHolder = computed(() => drop.value.type === 'holder')
const availableNftsAmount = computed(() => availableNfts.serialNumbers.length)

Expand Down
5 changes: 1 addition & 4 deletions components/common/ChooseCollectionDropdown.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
]"
:no-shadow="noShadow"
:disabled="!isLogIn || isRemark"
:disabled="!isLogIn"
>
<template #trigger="{ active }">
<NeoButton
Expand Down Expand Up @@ -99,9 +99,6 @@ const props = defineProps({
preselected: { type: String, default: undefined },
})

const { urlPrefix } = usePrefix()
const { isRemark } = useIsChain(urlPrefix)

const { isLogIn, accountId } = useAuth()

const { collectionsEntites } = useCollectionForMint()
Expand Down
20 changes: 15 additions & 5 deletions components/common/ConnectWallet/ConnectEvm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<NeoButton
variant="primary"
no-shadow
:loading="isConnecting"
:disabled="isConnecting"
loading-with-label
:loading="loading"
:disabled="loading"
:loading-with-label="isConnecting"
size="large"
class="w-full"
@click="modal?.open()"
Expand All @@ -15,7 +15,7 @@
{{ isConnecting ? 'Connecting' : 'Connect with Web3Modal' }}
</span>
<NeoIcon
v-if="!isConnecting"
v-if="!loading"
icon="arrow-right"
/>
</div>
Expand All @@ -25,13 +25,23 @@

<script lang="ts" setup>
import { NeoButton, NeoIcon } from '@kodadot1/brick'
import { useAccount } from '@wagmi/vue'
import { useAccount, useDisconnect, useConnections } from '@wagmi/vue'

const emits = defineEmits(['select'])

const { address, isConnected, isConnecting, chainId } = useAccount()
const { urlPrefix, setUrlPrefix } = usePrefix()
const { modal } = useWeb3Modal()
const { disconnectAsync: disconnect } = useDisconnect()
const connections = useConnections()

const disconnecting = ref(false)
const loading = computed(() => isConnecting.value || disconnecting.value)

if (connections.value.length) {
disconnecting.value = true
disconnect().finally(() => disconnecting.value = false)
}

watch([address, isConnected, chainId], ([address, isConnected, chainId]) => {
const chainPrefix = CHAIN_ID_TO_PREFIX?.[chainId ?? '']
Expand Down
Loading
Loading