From e47d4a8dd6cb1065ab9c0d8f1fad93f7926bdc7d Mon Sep 17 00:00:00 2001 From: Daniyar Itegulov Date: Wed, 19 Apr 2023 17:38:47 +1000 Subject: [PATCH] use advanced account creation --- mpc-recovery/src/transaction.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/mpc-recovery/src/transaction.rs b/mpc-recovery/src/transaction.rs index daa09e974..1a263b273 100644 --- a/mpc-recovery/src/transaction.rs +++ b/mpc-recovery/src/transaction.rs @@ -26,16 +26,19 @@ pub fn get_create_account_delegate_action( signer_pk: PublicKey, new_account_id: AccountId, new_account_recovery_pk: PublicKey, - _new_account_user_pk: PublicKey, + new_account_user_pk: PublicKey, network_type: NetworkType, nonce: Nonce, max_block_height: u64, ) -> DelegateAction { + let create_acc_options = CreateAccountOptions { + full_access_keys: Some(vec![new_account_user_pk, new_account_recovery_pk]), + }; let create_acc_action = Action::FunctionCall(FunctionCallAction { - method_name: "create_account".to_string(), + method_name: "create_account_advanced".to_string(), args: json!({ "new_account_id": new_account_id, - "new_public_key": new_account_recovery_pk.to_string(), + "options": create_acc_options, }) .to_string() .into_bytes(),