Commit 060499f 1 parent a19e782 commit 060499f Copy full SHA for 060499f
File tree 1 file changed +6
-8
lines changed
solana/programs/example-native-token-transfers/src/queue
1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -35,17 +35,15 @@ impl InboxItem {
35
35
pub const SEED_PREFIX : & ' static [ u8 ] = b"inbox_item" ;
36
36
37
37
/// Attempt to release the transfer.
38
- /// If the inbox item status is [`ReleaseStatus::ReleaseAfter`], this function returns true if the current timestamp
39
- /// is newer than the one stored in the release status. If the timestamp is in the future,
40
- /// returns false.
38
+ ///
39
+ /// * If the inbox item status is [`ReleaseStatus::ReleaseAfter`], this function returns true if the current timestamp
40
+ /// is newer than the one stored in the release status. If the timestamp is in the future, returns false.
41
+ /// * If the inbox item status is [`ReleaseStatus::NotApproved`], this function returns false.
41
42
///
42
43
/// # Errors
43
44
///
44
- /// Returns errors when the item cannot be released, i.e. when its status is not
45
- /// `ReleaseAfter`:
46
- /// - returns [`NTTError::TransferNotApproved`] if [`ReleaseStatus::NotApproved`]
47
- /// - returns [`NTTError::TransferAlreadyRedeemed`] if [`ReleaseStatus::Released`]. This is
48
- /// important to prevent a single transfer from being redeemed multiple times, which would
45
+ /// Returns [`NTTError::TransferAlreadyRedeemed`] if the inbox item status is [`ReleaseStatus::Released`].
46
+ /// This is important to prevent a single transfer from being redeemed multiple times, which would
49
47
/// result in minting arbitrary amounts of the token.
50
48
pub fn try_release ( & mut self ) -> Result < bool > {
51
49
let now = current_timestamp ( ) ;
You can’t perform that action at this time.
0 commit comments