update cpi docs (#15494)

This commit is contained in:
Jack May 2021-02-23 12:37:50 -08:00 committed by GitHub
parent 4b0114b991
commit 30012818a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 4 deletions

View File

@ -242,9 +242,8 @@ as if it had the private key to sign the transaction.
```rust,ignore
fn transfer_one_token_from_escrow(
program_id: &Pubkey,
keyed_accounts: &[KeyedAccount]
) -> Result<()> {
accounts: &[AccountInfo],
) -> ProgramResult {
// User supplies the destination
let alice_pubkey = keyed_accounts[1].unsigned_key();
@ -258,7 +257,7 @@ fn transfer_one_token_from_escrow(
// executing program ID and the supplied keywords.
// If the derived address matches a key marked as signed in the instruction
// then that key is accepted as signed.
invoke_signed(&instruction, &[&["escrow"]])?
invoke_signed(&instruction, accounts, &[&["escrow"]])
}
```