Browse Source

Remove old code

Cesar Rodas 4 weeks ago
parent
commit
cfcf5ead41
1 changed files with 9 additions and 7 deletions
  1. 9 7
      crates/cdk/src/wallet/README.md

+ 9 - 7
crates/cdk/src/wallet/README.md

@@ -7,18 +7,20 @@ The CDK [`Wallet`] is a high level Cashu wallet. The [`Wallet`] is for a single
 
 ### Create [`Wallet`]
 ```rust
-#[cfg(feature = "memory_wallet")] {
   use std::sync::Arc;
   use cdk::nuts::CurrencyUnit;
   use cdk::wallet::Wallet;
   use cdk_sqlite::wallet::memory;
   use rand::Rng;
 
-  let seed = rand::thread_rng().gen::<[u8; 32]>();
-  let mint_url = "https://testnut.cashu.space";
-  let unit = CurrencyUnit::Sat;
+  #[tokio::main]
+  async fn main() -> anyhow::Result<()> {
+    let seed = rand::thread_rng().gen::<[u8; 32]>();
+    let mint_url = "https://testnut.cashu.space";
+    let unit = CurrencyUnit::Sat;
 
-  let localstore = memory::empty().await?;
-  let wallet = Wallet::new(mint_url, unit, Arc::new(localstore), &seed, None);
-}
+    let localstore = memory::empty().await?;
+    let wallet = Wallet::new(mint_url, unit, Arc::new(localstore), &seed, None);
+    Ok(())
+  }
 ```