File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1696,9 +1696,10 @@ impl Processor {
16961696 }
16971697
16981698 if amount == 0 {
1699- check_program_account ( source_account_info. owner ) ? ;
1699+ check_program_account ( source_account_info. owner )
17001700 } else {
1701- if !self_transfer {
1701+ source_account. base . amount = remaining_amount. into ( ) ;
1702+ if source_account_info. key != destination_account_info. key {
17021703 let source_starting_lamports = source_account_info. lamports ( ) ;
17031704 * * source_account_info. lamports . borrow_mut ( ) = source_starting_lamports
17041705 . checked_sub ( amount)
@@ -1709,10 +1710,8 @@ impl Processor {
17091710 . checked_add ( amount)
17101711 . ok_or ( TokenError :: Overflow ) ?;
17111712 }
1712- source_account . base . amount = remaining_amount . into ( ) ;
1713+ Ok ( ( ) )
17131714 }
1714-
1715- Ok ( ( ) )
17161715 }
17171716
17181717 /// Processes an [`Instruction`](enum.Instruction.html).
You can’t perform that action at this time.
0 commit comments