From 1d64faa617a851a283a065575ff69a784575bab0 Mon Sep 17 00:00:00 2001 From: SuperBatata Date: Thu, 8 Feb 2024 14:57:34 +0100 Subject: [PATCH] fix : shimmer NFT metadata class --- src/main/kotlin/id/walt/nftkit/services/NftService.kt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/kotlin/id/walt/nftkit/services/NftService.kt b/src/main/kotlin/id/walt/nftkit/services/NftService.kt index e1407dbe..b34867e1 100644 --- a/src/main/kotlin/id/walt/nftkit/services/NftService.kt +++ b/src/main/kotlin/id/walt/nftkit/services/NftService.kt @@ -210,12 +210,14 @@ data class Trait_shimmer( @Serializable data class Metadata( - val attributes: JsonArray?=null, + val attributes: JsonElement?=null, val description: String?=null, val name: String?=null, + val image: String?=null, ) @Serializable data class Owner( + val ens_domain_name: String?, val hash: String, val implementation_name: String?, val is_contract: Boolean, @@ -246,7 +248,7 @@ data class Item( val id: String, val image_url: String?, val is_unique: Boolean, - val metadata: Metadata, + val metadata: Metadata?, val owner: Owner, val token: Token_info ) @@ -512,7 +514,7 @@ object NftService { } - fun getShimmerNFTinstances(smartContractAddress: String) : shimmerNFT{ + fun getShimmerNFTinstances(smartContractAddress: String) : shimmerNFT { return runBlocking { val url = "https://explorer.evm.testnet.shimmer.network/api/v2/tokens/${smartContractAddress}/instances"