From dc75db7d81057540d29692ef94922aaa0fabe714 Mon Sep 17 00:00:00 2001 From: Bjarte Stien Karlsen Date: Mon, 13 May 2024 08:47:35 +0200 Subject: [PATCH 1/3] enable having more then one subnft of a given type --- contracts/NonFungibleToken.cdc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contracts/NonFungibleToken.cdc b/contracts/NonFungibleToken.cdc index f1373ae..2e86c5c 100644 --- a/contracts/NonFungibleToken.cdc +++ b/contracts/NonFungibleToken.cdc @@ -116,7 +116,7 @@ access(all) contract interface NonFungibleToken: ViewResolver { /// Gets all the NFTs that this NFT directly owns /// @return A dictionary of all subNFTS keyed by type - access(all) view fun getAvailableSubNFTS(): {Type: UInt64} { + access(all) view fun getAvailableSubNFTS(): {Type: [UInt64]} { return {} } @@ -225,7 +225,7 @@ access(all) contract interface NonFungibleToken: ViewResolver { access(all) view fun borrowNFT(_ id: UInt64): &{NonFungibleToken.NFT}? { post { (result == nil) || (result?.id == id): - "Cannot borrow NFT reference: The ID of the returned reference does not match the ID that was specified" + "Cannot borrow NFT reference: The ID of the returned reference does not match the ID that was specified" } } From eba3b026a6697c75dc5ffc7edc6002ef5ba81d02 Mon Sep 17 00:00:00 2001 From: "Bjarte S. Karlsen" Date: Mon, 13 May 2024 08:48:53 +0200 Subject: [PATCH 2/3] Update contracts/NonFungibleToken.cdc --- contracts/NonFungibleToken.cdc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/NonFungibleToken.cdc b/contracts/NonFungibleToken.cdc index 2e86c5c..0ead604 100644 --- a/contracts/NonFungibleToken.cdc +++ b/contracts/NonFungibleToken.cdc @@ -225,7 +225,7 @@ access(all) contract interface NonFungibleToken: ViewResolver { access(all) view fun borrowNFT(_ id: UInt64): &{NonFungibleToken.NFT}? { post { (result == nil) || (result?.id == id): - "Cannot borrow NFT reference: The ID of the returned reference does not match the ID that was specified" + "Cannot borrow NFT reference: The ID of the returned reference does not match the ID that was specified" } } From c8a9df9b2b49a35c4b3369dcf3b587103c17d6b4 Mon Sep 17 00:00:00 2001 From: "Bjarte S. Karlsen" Date: Mon, 13 May 2024 08:49:27 +0200 Subject: [PATCH 3/3] Update contracts/NonFungibleToken.cdc --- contracts/NonFungibleToken.cdc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/NonFungibleToken.cdc b/contracts/NonFungibleToken.cdc index 0ead604..b99b13b 100644 --- a/contracts/NonFungibleToken.cdc +++ b/contracts/NonFungibleToken.cdc @@ -225,7 +225,7 @@ access(all) contract interface NonFungibleToken: ViewResolver { access(all) view fun borrowNFT(_ id: UInt64): &{NonFungibleToken.NFT}? { post { (result == nil) || (result?.id == id): - "Cannot borrow NFT reference: The ID of the returned reference does not match the ID that was specified" + "Cannot borrow NFT reference: The ID of the returned reference does not match the ID that was specified" } }