Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update err message
  • Loading branch information
fbielejec committed Aug 16, 2022
commit 9b31d69b118bf1df14b030fb4350936c657cb185
6 changes: 3 additions & 3 deletions contracts/game_token/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,9 @@ pub mod game_token {
/// Returns own code hash
#[ink(message, selector = 10)]
pub fn code_hash(&self) -> Result<Hash> {
Self::env()
.own_code_hash()
.map_err(|why| PSP22Error::Custom(format!("Calling control has failed: {:?}", why)))
Self::env().own_code_hash().map_err(|why| {
PSP22Error::Custom(format!("Can't retrieve own code hash: {:?}", why))
})
}
}
}
6 changes: 3 additions & 3 deletions contracts/ticket_token/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,9 @@ pub mod ticket_token {
/// Returns own code hash
#[ink(message, selector = 10)]
pub fn code_hash(&self) -> Result<Hash> {
Self::env()
.own_code_hash()
.map_err(|why| PSP22Error::Custom(format!("Calling control has failed: {:?}", why)))
Self::env().own_code_hash().map_err(|why| {
PSP22Error::Custom(format!("Can't retrieve own code hash: {:?}", why))
})
}
}
}