Skip to content

Commit 74e8c5e

Browse files
committed
solana: require that transfer is not released in redeem
1 parent eff94d7 commit 74e8c5e

File tree

1 file changed

+4
-0
lines changed
  • solana/programs/example-native-token-transfers/src/instructions

1 file changed

+4
-0
lines changed

solana/programs/example-native-token-transfers/src/instructions/redeem.rs

+4
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,10 @@ pub fn redeem(ctx: Context<Redeem>, _args: RedeemArgs) -> Result<()> {
112112
});
113113
}
114114

115+
if accs.inbox_item.release_status == ReleaseStatus::Released {
116+
return Err(NTTError::TransferAlreadyRedeemed.into());
117+
}
118+
115119
// idempotent
116120
accs.inbox_item.votes.set(accs.transceiver.id, true);
117121

0 commit comments

Comments
 (0)