I have a anchor contract with a couple instructions inside. The first instruction is from the user to a PDA account
let transfer_instruction: Instruction = system_instruction::transfer(user.key, to_account.to_account_info().key, lamports);
solana_program::program::invoke_signed(
&transfer_instruction,
&[
user_account.to_account_info(),
to_account.to_account_info().clone(),
ctx.accounts.system_program.to_account_info(),
],
&[],
)?;
and the second one is from a PDA to another PDA
ctx.accounts.pda1.add_lamports(other_lamports)?;
ctx.accounts.pda2.sub_lamports(other_lamports)?;
When I view this transaction on SolScan or SolanaFM, the flow of the funds from user to PDA is trackable through the transaction ID or the account's public keys and nicely display in a graph how the funds from the user travels to the PDA account.
However the second transaction that moves funds from PDA to another PDA does not show in the flow charts displaying how the funds travel from the first transaction to the second. The funds do end up moving to the final destination PDA and it does display that there was balance changes at the destination, however it doesn't show in the flow charts. Only the first transaction is viewable. Is there a reason for this?
I guess I don't really mind if it doesn't show all the transactions in detail however, I would like to believe there is a way to be more transparent and display every transaction occurring "behind the scenes". Anyway, any explanation would be insightful.
Also does this mean that all contracts with just the second type of transactions, (PDA to PDA) will not be displayed as well?