Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Final audit revision #90

Merged
merged 11 commits into from
Feb 19, 2024
Next Next commit
rename
taitruong committed Feb 1, 2024
commit 2da4752c30a6735c0bf228dfad2594902871e7b5
2 changes: 1 addition & 1 deletion packages/ics721/src/error.rs
Original file line number Diff line number Diff line change
@@ -59,7 +59,7 @@ pub enum ContractError {
NoNftContractForClassId(String),

#[error("Unknown nft contract: {child_collection}, Class Id: {class_id}, Token ID: {token_id} => NFT contract: {cw721_addr}")]
NoClassIdForNftContract {
NoNftContractMatch {
child_collection: String,
class_id: String,
token_id: String,
4 changes: 2 additions & 2 deletions packages/ics721/src/execute.rs
Original file line number Diff line number Diff line change
@@ -143,7 +143,7 @@ where
let child_collection = deps.api.addr_validate(&child_collection)?;
let cw721_addr = CLASS_ID_TO_NFT_CONTRACT.load(deps.storage, child_class_id.clone())?;
if cw721_addr != child_collection {
return Err(ContractError::NoClassIdForNftContract {
return Err(ContractError::NoNftContractMatch {
child_collection: child_collection.to_string(),
class_id: child_class_id.to_string(),
token_id: token_id.into(),
@@ -218,7 +218,7 @@ where
let home_collection = deps.api.addr_validate(&home_collection)?;
let cw721_addr = CLASS_ID_TO_NFT_CONTRACT.load(deps.storage, home_class_id.clone())?;
if cw721_addr != home_collection {
return Err(ContractError::NoClassIdForNftContract {
return Err(ContractError::NoNftContractMatch {
child_collection: home_collection.to_string(),
class_id: home_class_id.to_string(),
token_id,