Whoops! 😨 Something unexpected happened...
[Error Code: 1101] error caused by: 1 error occurred:
* transaction execute failed: [Error Code: 1101] cadence runtime error: Execution failed:
--> 782902a7498651464d52493c155017201729c55bb0737248756b90574c1b24db:11:2
|
11 | model.forEachKey(fun (ownerAddress: Address): Bool {
12 |
13 | let nftIdentifiers = model[ownerAddress]!
14 |
15 | let collectionDataMap = Utils.getNFTCollectionData(ownerAddress: ownerAddress, nftIdentifiers: nftIdentifiers)
16 |
17 | for nftIdentifier in nftIdentifiers {
18 |
19 | let contractType = Utils.getIdentifierContractType(identifier: nftIdentifier)
20 |
21 | assert(DapperWalletCollections.containsType(contractType), message: "NFT type not allowed: ".concat(contractType.identifier))
22 |
23 | let collectionData = collectionDataMap[nftIdentifier] ?? panic("collection data lookup failed")
24 |
25 | if (signer.borrow<&AnyResource>(from: collectionData.storagePath) == nil) {
26 |
27 | signer.save(<-collectionData.createEmptyCollection(), to: collectionData.storagePath)
28 | }
29 |
30 | if (signer.getCapability<&{NonFungibleToken.CollectionPublic,NonFungibleToken.Receiver}>(collectionData.publicPath).borrow() == nil) {
31 |
32 | signer.unlink(collectionData.publicPath)
33 | signer.link<&{NonFungibleToken.CollectionPublic,NonFungibleToken.Receiver,MetadataViews.ResolverCollection}>(collectionData.publicPath, target: collectionData.storagePath)
34 | }
35 | }
36 |
37 | return true
38 | })
| ^^
error: panic: collection data lookup failed
--> 782902a7498651464d52493c155017201729c55bb0737248756b90574c1b24db:23:61
|
23 | let collectionData = collectionDataMap[nftIdentifier] ?? panic("collection data lookup failed")
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^