From 5b107b13102ab51b4bcadca511ad0f48f135b2b5 Mon Sep 17 00:00:00 2001 From: Matej Vukosav Date: Fri, 8 Nov 2024 17:45:33 +0700 Subject: [PATCH] fix: deserialize proposal actions (#951) --- crates/node/src/lib.rs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/crates/node/src/lib.rs b/crates/node/src/lib.rs index 19ec4e519..fc096baa9 100644 --- a/crates/node/src/lib.rs +++ b/crates/node/src/lib.rs @@ -438,14 +438,12 @@ impl Node { application_id: context.application_id, }); }; - for (proposal_id, actions) in &outcome.proposals { - // todo deserialize actions into Vec - let action = ProposalAction::Transfer { - receiver_id: "vuki.testnet".into(), - amount: 0, - }; - let actions = vec![action]; + for (proposal_id, actions) in &outcome.proposals { + let actions: Vec = from_slice(&actions).map_err(|e| { + error!(%e, "Failed to deserialize proposal actions."); + CallError::InternalError + })?; drop( self.ctx_manager .propose(