Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Joshua Hannan <[email protected]>
  • Loading branch information
sisyphusSmiling and joshuahannan authored Oct 29, 2024
1 parent e13df7e commit 369ec90
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions cadence/transactions/bridge/nft/batch_bridge_nft_from_evm.cdc
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ transaction(nftIdentifier: String, ids: [UInt256]) {
//
// Borrow a reference to the NFT collection, configuring if necessary
let viewResolver = getAccount(nftContractAddress).contracts.borrow<&{ViewResolver}>(name: nftContractName)
?? panic("Could not borrow ViewResolver from NFT contract")
?? panic("Could not borrow ViewResolver from NFT contract with name "
.concat(contractName).concat(" and address ")
.concat(contractAddress.toString())
let collectionData = viewResolver.resolveContractView(
resourceType: self.nftType,
viewType: Type<MetadataViews.NFTCollectionData>()
Expand All @@ -60,7 +62,8 @@ transaction(nftIdentifier: String, ids: [UInt256]) {
signer.capabilities.publish(collectionCap, at: collectionData.publicPath)
}
self.collection = signer.storage.borrow<&{NonFungibleToken.Collection}>(from: collectionData.storagePath)
?? panic("Could not borrow collection from storage path")
?? panic("Could not borrow a NonFungibleToken Collection from the signer's storage path ")
.concat(collectionData.storagePath.toString()))

/* --- Configure a ScopedFTProvider --- */
//
Expand Down

0 comments on commit 369ec90

Please sign in to comment.