Browse Source

quick updates

jpcaulfi 3 years ago
parent
commit
c5b1d527ec

+ 2 - 2
accounts/create-system-account/anchor/programs/create-system-account/src/lib.rs

@@ -23,8 +23,8 @@ pub mod create_system_account {
                     to: ctx.accounts.new_account.to_account_info(),     // To pubkey
                 },
             ),
-            LAMPORTS_PER_SOL,                           // Lamports (1 SOL)
-            32,                                         // Space
+            1 * LAMPORTS_PER_SOL,                           // Lamports (1 SOL)
+            0,                                         // Space
             &ctx.accounts.system_program.key(),         // Owner
         )?;
 

+ 1 - 1
accounts/create-system-account/native/program/src/lib.rs

@@ -32,7 +32,7 @@ fn process_instruction(
         &system_instruction::create_account(
             &payer.key,             // From pubkey
             &new_account.key,       // To pubkey
-            LAMPORTS_PER_SOL,       // Lamports (1 SOL)
+            1 * LAMPORTS_PER_SOL,   // Lamports (1 SOL)
             0,                      // Space
             &system_program::ID,    // Owner
         ),