Przeglądaj źródła

Apply suggestions from code review

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Tony Boyle 7 miesięcy temu
rodzic
commit
b0063004c5
1 zmienionych plików z 2 dodań i 14 usunięć
  1. 2 14
      src/pages/core/plugins/freeze-delegate.md

+ 2 - 14
src/pages/core/plugins/freeze-delegate.md

@@ -225,18 +225,6 @@ await freezeAsset(umi, {
 {% /dialect %}
 
 {% dialect title="Rust CPI" id="rust_cpi" %}
-```rust
-UpdatePluginV1CpiBuilder::new(&ctx.accounts.core_program.to_account_info())
-   .asset(&ctx.accounts.asset.to_account_info())
-   .collection(Some(&ctx.accounts.collection.to_account_info()))
-   .payer(&ctx.accounts.payer.to_account_info())
-   .authority(Some(&ctx.accounts.update_authority.to_account_info()))
-   .system_program(&ctx.accounts.system_program.to_account_info())
-   //set the FreezeDelegete plugin to `frozen: true`
-   .plugin(Plugin::FreezeDelegate( FreezeDelegate{ frozen: true } ))
-   .invoke()?;
-```
-{% /dialect %}
 
 {% dialect title="Rust" id="rust" %}
 ```rust
@@ -346,9 +334,9 @@ pub async fn thaw_freeze_delegate_plugin() {
     let thaw_freeze_delegate_plugin_ix = UpdatePluginV1Builder::new()
         .asset(asset)
         // Pass in Collection if Asset is part of collection.
-        .collection()
+        .collection(Some(collection))
         .payer(authority.pubkey())
-        // Set the `froze: false`
+        // Set the `frozen: false`
         .plugin(Plugin::FreezeDelegate(FreezeDelegate {frozen: false}))
         .instruction();