Skip to content

Commit

Permalink
fix: set approval_id as optional
Browse files Browse the repository at this point in the history
  • Loading branch information
emarai committed Mar 20, 2022
1 parent 3564aa2 commit 9588d70
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions nft-contract/src/nft_core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pub trait NonFungibleTokenCore {
receiver_id: AccountId,
token_id: TokenId,
//we introduce an approval ID so that people with that approval ID can transfer the token
approval_id: u64,
approval_id: Option<u64>,
memo: Option<String>,
);

Expand All @@ -24,7 +24,7 @@ pub trait NonFungibleTokenCore {
receiver_id: AccountId,
token_id: TokenId,
//we introduce an approval ID so that people with that approval ID can transfer the token
approval_id: u64,
approval_id: Option<u64>,
memo: Option<String>,
msg: String,
) -> PromiseOrValue<bool>;
Expand Down Expand Up @@ -97,7 +97,7 @@ impl NonFungibleTokenCore for Contract {
receiver_id: AccountId,
token_id: TokenId,
//we introduce an approval ID so that people with that approval ID can transfer the token
approval_id: u64,
approval_id: Option<u64>,
memo: Option<String>,
) {
//assert that the user attached exactly 1 yoctoNEAR. This is for security and so that the user will be redirected to the NEAR wallet.
Expand All @@ -110,7 +110,7 @@ impl NonFungibleTokenCore for Contract {
&sender_id,
&receiver_id,
&token_id,
Some(approval_id),
approval_id,
memo,
);

Expand All @@ -128,7 +128,7 @@ impl NonFungibleTokenCore for Contract {
receiver_id: AccountId,
token_id: TokenId,
//we introduce an approval ID so that people with that approval ID can transfer the token
approval_id: u64,
approval_id: Option<u64>,
memo: Option<String>,
msg: String,
) -> PromiseOrValue<bool> {
Expand Down Expand Up @@ -158,7 +158,7 @@ impl NonFungibleTokenCore for Contract {
&sender_id,
&receiver_id,
&token_id,
Some(approval_id),
approval_id,
memo.clone(),
);

Expand Down

0 comments on commit 9588d70

Please sign in to comment.