From 4b99ec5e20ceefb3cf76e3ab820ff2be7ae46fb6 Mon Sep 17 00:00:00 2001 From: Esraa Jbara Date: Tue, 9 Nov 2021 11:05:42 +0200 Subject: [PATCH] fix tutrial to match the blog hello world --- docs/tutorials/hello-world.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/docs/tutorials/hello-world.md b/docs/tutorials/hello-world.md index 30facc72a7..ce86ffe5a6 100644 --- a/docs/tutorials/hello-world.md +++ b/docs/tutorials/hello-world.md @@ -131,7 +131,7 @@ Right now we will not get into details of all the available options in `TxBuilde how to build transactions. We'll come back to this in a future article. ```rust -use bdk::{bitcoin::Address, FeeRate}; +use bdk::bitcoin::Address; use std::str::FromStr; // ... @@ -143,11 +143,9 @@ let faucet_address = Address::from_str("mkHS9ne12qx9pS9VojpwU5xtRd4T7X7ZUt")?; let mut tx_builder = wallet.build_tx(); tx_builder - .add_recipient(faucet_address.script_pubkey(), 0_900) - .fee_rate(FeeRate::from_sat_per_vb(5.0)) - .do_not_spend_change() + .add_recipient(faucet_address.script_pubkey(), balance / 2) .enable_rbf(); -let (mut psbt, tx_details) = tx_builder.finish()? +let (mut psbt, tx_details) = tx_builder.finish()?; println!("Transaction details: {:#?}", tx_details); ``` -- 2.49.0