Skip to content

Commit

Permalink
chore: update planner api for testnet 64
Browse files Browse the repository at this point in the history
Corresponds to changes in [0], which split up the `build_concurrent`
logic.

[0] penumbra-zone/penumbra#3289
  • Loading branch information
conorsch committed Dec 8, 2023
1 parent fb5d430 commit 0d85840
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/sender.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ where
planner
.memo(MemoPlaintext {
text: "Hello from Galileo, the Penumbra faucet bot".to_string(),
sender: self2.fvk.payment_address(0.into()).0,
return_address: self2.fvk.payment_address(0.into()).0,
})
.unwrap();
let plan = planner.plan(&mut self2.view, self2.fvk.wallet_id(), self2.account.into());
Expand All @@ -84,20 +84,17 @@ where
.custody
.authorize(AuthorizeRequest {
plan: plan.clone(),
wallet_id: Some(self2.fvk.wallet_id()),
pre_authorizations: Vec::new(),
})
.await?
.data
.ok_or_else(|| anyhow::anyhow!("no auth data"))?
.try_into()?;
let witness_data = self2.view.witness(self2.fvk.wallet_id(), &plan).await?;
let unauth_tx = plan
.build_concurrent(OsRng, &self2.fvk, witness_data)
let tx = plan
.build_concurrent(&self2.fvk, &witness_data, &auth_data)
.await?;

let tx = unauth_tx.authorize(&mut OsRng, &auth_data)?;

// 3. Broadcast the transaction and wait for confirmation.
let (tx_id, _detection_height) = self2.view.broadcast_transaction(tx, true).await?;
Ok(tx_id)
Expand Down

0 comments on commit 0d85840

Please sign in to comment.