File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
programs/portal/src/instructions Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -113,7 +113,6 @@ pub fn redeem(ctx: Context<Redeem>, _args: RedeemArgs) -> Result<()> {
113113 ) ?;
114114
115115 let message: NttManagerMessage < Payload > = transceiver_message. message . ntt_manager_payload ;
116- let mut amount = 0 ;
117116
118117 if !accs. inbox_item . init {
119118 let mut inbox_item = InboxItem {
@@ -134,7 +133,7 @@ pub fn redeem(ctx: Context<Redeem>, _args: RedeemArgs) -> Result<()> {
134133 match & message. payload {
135134 Payload :: NativeTokenTransfer ( ntt) => {
136135 // all transfers will have a recipient and amount
137- amount = ntt
136+ let amount = ntt
138137 . amount
139138 . untrim ( accs. mint . decimals )
140139 . map_err ( NTTError :: from) ?;
@@ -175,6 +174,8 @@ pub fn redeem(ctx: Context<Redeem>, _args: RedeemArgs) -> Result<()> {
175174 return Ok ( ( ) ) ;
176175 }
177176
177+ let amount = accs. inbox_item . transfer . amount ;
178+
178179 let release_timestamp = match accs. inbox_rate_limit . rate_limit . consume_or_delay ( amount) {
179180 RateLimitResult :: Consumed ( now) => {
180181 // When receiving a transfer, we refill the outbound rate limit with
You can’t perform that action at this time.
0 commit comments