Skip to content

Commit cc573c3

Browse files
committed
Update comment to match function logic
1 parent 5bb38be commit cc573c3

File tree

1 file changed

+6
-8
lines changed
  • solana/programs/example-native-token-transfers/src/queue

1 file changed

+6
-8
lines changed

solana/programs/example-native-token-transfers/src/queue/inbox.rs

+6-8
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,15 @@ impl InboxItem {
3535
pub const SEED_PREFIX: &'static [u8] = b"inbox_item";
3636

3737
/// 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.
4142
///
4243
/// # Errors
4344
///
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
4947
/// result in minting arbitrary amounts of the token.
5048
pub fn try_release(&mut self) -> Result<bool> {
5149
let now = current_timestamp();

0 commit comments

Comments
 (0)