From bcc5996fbbab70a37494ceccbb026b016ec40c66 Mon Sep 17 00:00:00 2001 From: mr-t Date: Tue, 7 May 2024 13:46:21 +0200 Subject: [PATCH 1/2] define UniversalCollectionInfoResponse --- packages/ics721/src/state.rs | 7 +++++++ packages/ics721/src/utils.rs | 6 +++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/packages/ics721/src/state.rs b/packages/ics721/src/state.rs index 8d297d0e..5f69287f 100644 --- a/packages/ics721/src/state.rs +++ b/packages/ics721/src/state.rs @@ -53,6 +53,13 @@ pub struct UniversalAllNftInfoResponse { pub info: UniversalNftInfoResponse, } +/// Based on `cw721::ContractInfoResponse v0.18` +#[derive(Deserialize)] +pub struct UniversalCollectionInfoResponse { + pub name: String, + pub symbol: String, +} + #[derive(Deserialize)] pub struct UniversalNftInfoResponse { pub token_uri: Option, diff --git a/packages/ics721/src/utils.rs b/packages/ics721/src/utils.rs index 978b4217..3a29e4e5 100644 --- a/packages/ics721/src/utils.rs +++ b/packages/ics721/src/utils.rs @@ -1,8 +1,8 @@ use cosmwasm_std::{Addr, DepsMut, Empty, Env, StdResult}; -use cw721::{ContractInfoResponse, NumTokensResponse}; +use cw721::NumTokensResponse; use cw_ownable::Ownership; -use crate::state::CollectionData; +use crate::state::{CollectionData, UniversalCollectionInfoResponse}; pub fn get_collection_data(deps: &DepsMut, collection: &Addr) -> StdResult { // cw721 v0.17 and higher holds ownership in the contract @@ -21,7 +21,7 @@ pub fn get_collection_data(deps: &DepsMut, collection: &Addr) -> StdResult::ContractInfo {}, )?; From 64ffd5f09731eddd7d50c3fff95f1b533290729e Mon Sep 17 00:00:00 2001 From: mr-t Date: Wed, 8 May 2024 22:57:12 +0200 Subject: [PATCH 2/2] fix typo --- packages/ics721/src/execute.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/ics721/src/execute.rs b/packages/ics721/src/execute.rs index cb84861c..3616e6ac 100644 --- a/packages/ics721/src/execute.rs +++ b/packages/ics721/src/execute.rs @@ -695,7 +695,7 @@ where for (key, channel) in entries { INCOMING_CLASS_TOKEN_TO_CHANNEL.save(deps.storage, key, &channel)?; } - Ok(Response::default().add_attribute("method", "callback_redeem_outgoing_channel_entries")) + Ok(Response::default().add_attribute("method", "callback_save_incoming_channel_entries")) } fn migrate(