Skip to content

Commit

Permalink
addressing comments
Browse files Browse the repository at this point in the history
  • Loading branch information
zihehuang committed Nov 16, 2022
1 parent 3437ec5 commit 8503f1f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
18 changes: 9 additions & 9 deletions contracts/TopShot.cdc
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,9 @@ pub contract TopShot: NonFungibleToken {
self.metadata = metadata
}

// This function is intended to backfill the Play on blockchain with a more detailed
// description of the Play. The benefit of having the description is that anyone would
// be able to know the story of the Play directly from Flow
/// This function is intended to backfill the Play on blockchain with a more detailed
/// description of the Play. The benefit of having the description is that anyone would
/// be able to know the story of the Play directly from Flow
access(contract) fun updateTagline(tagline: String): UInt32 {
self.metadata["Tagline"] = tagline

Expand Down Expand Up @@ -706,8 +706,8 @@ pub contract TopShot: NonFungibleToken {
.concat(serialNumber)
}

// The description of the Moment. If Tagline property of the play is empty, compose it using the buildDescString function
// If the Tagline property is not empty, use that as the description
/// The description of the Moment. If Tagline property of the play is empty, compose it using the buildDescString function
/// If the Tagline property is not empty, use that as the description
pub fun description(): String {
let playDesc: String? = TopShot.getPlayMetaDataByField(playID: self.data.playID, field: "Tagline")

Expand Down Expand Up @@ -966,10 +966,10 @@ pub contract TopShot: NonFungibleToken {
return newID
}

// Temporarily enabled so the description of the play can be backfilled
// Parameters: playID: The ID of the play to update
// tagline: A string to be used as the tagline for the play
// Returns: The ID of the play
/// Temporarily enabled so the description of the play can be backfilled
/// Parameters: playID: The ID of the play to update
/// tagline: A string to be used as the tagline for the play
/// Returns: The ID of the play
pub fun updatePlayTagline(playID: UInt32, tagline: String): UInt32 {
let tmpPlay = TopShot.playDatas[playID] ?? panic("playID does not exist")
tmpPlay.updateTagline(tagline: tagline)
Expand Down
4 changes: 2 additions & 2 deletions transactions/admin/update_tagline.cdc
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ transaction(plays: {UInt32: String}) {

post {
TopShot.getPlayMetaDataByField(playID: self.firstKey, field: "Tagline") != nil:
"first play's tagline doesnt exist"
"First play's tagline does not exist"
TopShot.getPlayMetaDataByField(playID: self.lastKey, field: "Tagline") != nil:
"last play's tagline doesnt exist"
"Last play's tagline does not exist"
}
}

0 comments on commit 8503f1f

Please sign in to comment.