Closed zahhar closed 3 years ago
pub fn nft_batch_approve(
&mut self,
token_ids: Vec<U64>,
account_id: AccountId,
msg: Option<String>,
) -> Option<Promise> {
with a mirrored method on our market
#[ext_contract(ext_on_approve)]
pub trait NonFungibleOnBatchApprove {
/// The Mintiest-base special, `nft_batch_on_approve` allows for batch
/// approval of a set of tokens.
fn nft_on_batch_approve(
&mut self,
tokens: Vec<U64>,
approvals: Vec<U64>,
owner_id: AccountId,
msg: String,
);
}
As an Owner, I want to approve batch of N out of M tokens within in my possession (even if they come from different Collectible).
I see some issues in the implementation of batch approvals:
nft_
prefix? e.g., batch_approve
instead of nft_batch_approve
min_price
for each token? Maybe instead of token_ids: Vec<U64>
, we could use token_ids: Vec<(U64, Balance)>
and remove msg
parameter.batch_approve
, should the method panic?
It would be preferable if the Owner is able to approve a batch sell orders to avoid approving individual items one at a time if they want to sell multiple.
For example, if the Owner wants to approve to sell 3 tokens of a specific GateId, or even series of different TokenIds they hold, that would be ideal. Perhaps for the GateId approach, just selecting the GateId and then an amount, and for the TokenId approach we could allow them to select from the TokenIds they currently own and each could be approved.