From b042e369e1bc2597d693ef43bf5d813b68585f2f Mon Sep 17 00:00:00 2001 From: Austin Kline Date: Thu, 21 Dec 2023 15:16:36 -0800 Subject: [PATCH 1/2] update ipfs url for rich html --- contracts/WrappedEditions.cdc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/WrappedEditions.cdc b/contracts/WrappedEditions.cdc index 38607b6..4f36fa6 100644 --- a/contracts/WrappedEditions.cdc +++ b/contracts/WrappedEditions.cdc @@ -71,7 +71,7 @@ pub contract WrappedEditions { let params = "?username=".concat(username).concat("&raffleTickets=").concat(wrapped.tickets.toString()) let htmlMedia = MetadataViews.Media( - file: MetadataViews.IPFSFile("QmVZv2s6sozWWb4dEcANaszqKWLQbieYJLysK7NGq3RGdJ".concat(params), nil), mediaType: "text/html" + file: MetadataViews.IPFSFile("QmfPkn13gbBNVK6bKtdqyUEa92bmqDy8aVQqGj3pByyyoP".concat(params), nil), mediaType: "text/html" ) let imageMedia = MetadataViews.Media( file: MetadataViews.HTTPFile(url: self.baseImageUrl.concat(nft.serial.toString())), mediaType: "image/jpeg" From 3e76afd92965fa86adf2b17257517852e2217438 Mon Sep 17 00:00:00 2001 From: Austin Kline Date: Thu, 21 Dec 2023 15:21:49 -0800 Subject: [PATCH 2/2] broken tests --- test/FlowtyWrapped_tests.cdc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/FlowtyWrapped_tests.cdc b/test/FlowtyWrapped_tests.cdc index fcfe558..3884906 100644 --- a/test/FlowtyWrapped_tests.cdc +++ b/test/FlowtyWrapped_tests.cdc @@ -33,7 +33,7 @@ pub fun setup() { let start: UInt64? = nil let end: UInt64? = nil let baseImageUrl: String = "https://example.com/image/" - let baseHtmlUrl: String = "QmVZv2s6sozWWb4dEcANaszqKWLQbieYJLysK7NGq3RGdJ" + let baseHtmlUrl: String = "QmfPkn13gbBNVK6bKtdqyUEa92bmqDy8aVQqGj3pByyyoP" registerEdition(rafflesAcct: Test.getAccount(Address(0x0000000000000007)), removeAfterReveal: removeAfterReveal, start: start, end: end, baseImageUrl: baseImageUrl, baseHtmlUrl: baseHtmlUrl) } @@ -185,7 +185,7 @@ pub fun testMediasIpfsUrl() { let ipfsMedia = medias.items[0] let ipfsUrl = ipfsMedia.file.uri() - assert(ipfsUrl == "ipfs://QmVZv2s6sozWWb4dEcANaszqKWLQbieYJLysK7NGq3RGdJ?username=user1&raffleTickets=1", message: "unexpected ipfs url") + assert(ipfsUrl == "ipfs://QmfPkn13gbBNVK6bKtdqyUEa92bmqDy8aVQqGj3pByyyoP?username=user1&raffleTickets=1", message: "unexpected ipfs url") } pub fun testIpfsUrlNoName() { @@ -201,7 +201,7 @@ pub fun testIpfsUrlNoName() { let ipfsMedia = medias.items[0] let ipfsUrl = ipfsMedia.file.uri() - assert(ipfsUrl == "ipfs://QmVZv2s6sozWWb4dEcANaszqKWLQbieYJLysK7NGq3RGdJ?username=".concat(acct.address.toString()).concat("&raffleTickets=1"), message: "unexpected ipfs url") + assert(ipfsUrl == "ipfs://QmfPkn13gbBNVK6bKtdqyUEa92bmqDy8aVQqGj3pByyyoP?username=".concat(acct.address.toString()).concat("&raffleTickets=1"), message: "unexpected ipfs url") } pub fun testDrawRaffle() {