fix nft show
This commit is contained in:
parent
4c764395be
commit
9e58488569
|
@ -146,19 +146,13 @@ const ClaimPage = () => {
|
|||
const metaplex = new Metaplex(connection)
|
||||
|
||||
const tokens = claims!
|
||||
.filter(
|
||||
(x) =>
|
||||
x.mintProperties.type.toLowerCase() === 'token' &&
|
||||
x.mintProperties.name.toLowerCase() !== 'gpu',
|
||||
)
|
||||
.filter((x) => x.mintProperties.type.toLowerCase() === 'token')
|
||||
.map((t) => jupiterTokens.find((x) => x.address === t.mint.toBase58()))
|
||||
.filter((x) => x)
|
||||
.map((x) => x as Token)
|
||||
|
||||
const nfts = claims!.filter(
|
||||
(x) =>
|
||||
x.mintProperties.type.toLowerCase() === 'nft' ||
|
||||
x.mintProperties.name.toLowerCase() === 'gpu',
|
||||
(x) => x.mintProperties.type.toLowerCase() === 'nft',
|
||||
)
|
||||
const nftsInfos: (Sft | SftWithToken | Nft | NftWithToken)[] = []
|
||||
|
||||
|
|
|
@ -63,14 +63,8 @@ export const getClaimsAsPrizes = (
|
|||
nftsRewardsInfo: (Sft | SftWithToken | Nft | NftWithToken)[],
|
||||
) =>
|
||||
claims.map((x) => {
|
||||
const rarity =
|
||||
x.mintProperties.name.toLowerCase() === 'gpu'
|
||||
? 'legendary'
|
||||
: x.mintProperties.rarity.toLowerCase()
|
||||
const type =
|
||||
x.mintProperties.name.toLowerCase() === 'gpu'
|
||||
? 'nft'
|
||||
: x.mintProperties.type.toLowerCase()
|
||||
const rarity = x.mintProperties.rarity.toLowerCase()
|
||||
const type = x.mintProperties.type.toLowerCase()
|
||||
const tokenInfo =
|
||||
type === 'token'
|
||||
? tokensInfo.find((t) => t.address === x.mint.toBase58())
|
||||
|
|
Loading…
Reference in New Issue