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

implement cw721 methods #2

Merged
merged 4 commits into from
Jul 2, 2024
Merged
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
allow convert string error to Contract error
  • Loading branch information
tubackkhoa committed Jul 1, 2024
commit 7e838f27c42046d69fd36051ff3005b886c11eed
4 changes: 2 additions & 2 deletions contracts/oraiswap-v3/src/entrypoints/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ pub fn transfer_nft(
info: &MessageInfo,
recipient: &Addr,
token_id: &[u8],
) -> Result<Position, ContractError> {
) -> Result<(), ContractError> {
let owner_raw = &token_id[..token_id.len() - 4];
let index = u32::from_be_bytes(token_id[token_id.len() - 4..].try_into().unwrap());
let account_id = Addr::unchecked(String::from_utf8(owner_raw.to_vec())?);
Expand All @@ -466,7 +466,7 @@ pub fn transfer_nft(
// reset approvals when transfer
pos.approvals = vec![];
state::add_position(deps.storage, recipient, &pos)?;
Ok(pos)
Ok(())
}

pub fn humanize_approvals(
Expand Down