Skip to content

Commit a8c5186

Browse files
committed
update error message formatting
1 parent 6b66c4a commit a8c5186

File tree

4 files changed

+12
-14
lines changed

4 files changed

+12
-14
lines changed

contracts/NFTStorefront.cdc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ access(all) contract NFTStorefront {
250250
assert(ref != nil, message: "NFTStorefront.Listing.borrowNFT: Could not borrow a reference to the NFT in the listing!")
251251
assert(
252252
ref!.isInstance(self.getDetails().nftType),
253-
message: "NFTStorefront.Listing.borrowNFT: The type of the NFT provided by the owner <\(ref!.getType().identifier) does not match the type in the listing <\(self.getDetails().nftType.identifier)!"
253+
message: "NFTStorefront.Listing.borrowNFT: The type of the NFT provided by the owner <\(ref!.getType().identifier)> does not match the type in the listing <\(self.getDetails().nftType.identifier)>!"
254254
)
255255
assert(
256256
ref?.id == self.getDetails().nftID,
@@ -294,7 +294,7 @@ access(all) contract NFTStorefront {
294294
// and we must check the NFT resource it gives us to make sure that it is the correct one.
295295
assert(
296296
nft.isInstance(self.details.nftType),
297-
message: "NFTStorefront.Listing.purchase: Cannot purchase listing! The type of the NFT provided by the seller <\(nft.getType().identifier) does not match the type in the listing details <\(self.details.nftType.identifier)!"
297+
message: "NFTStorefront.Listing.purchase: Cannot purchase listing! The type of the NFT provided by the seller <\(nft.getType().identifier)> does not match the type in the listing details <\(self.details.nftType.identifier)>!"
298298
)
299299
assert(
300300
nft.id == self.details.nftID,

contracts/NFTStorefrontV2.cdc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ access(all) contract NFTStorefrontV2 {
402402
// and we must check the NFT resource it gives us to make sure that it is the correct one.
403403
assert(
404404
nft.getType() == self.details.nftType,
405-
message: "NFTStorefrontV2.Listing.purchase: The type of the NFT provided by the seller <\(nft.getType().identifier) does not match the type in the listing details <\(self.details.nftType.identifier)!"
405+
message: "NFTStorefrontV2.Listing.purchase: The type of the NFT provided by the seller <\(nft.getType().identifier)> does not match the type in the listing details <\(self.details.nftType.identifier)>!"
406406
)
407407
assert(
408408
nft.id == self.details.nftID,

0 commit comments

Comments
 (0)