From 72941c80c55560357d93cbda5f475e2144112927 Mon Sep 17 00:00:00 2001 From: ayushtom Date: Tue, 12 Mar 2024 23:22:33 +0530 Subject: [PATCH] feat: add calldata for converting to assets read call --- src/endpoints/quests/nostra/staking_quest/verify_stake.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/endpoints/quests/nostra/staking_quest/verify_stake.rs b/src/endpoints/quests/nostra/staking_quest/verify_stake.rs index 60b238fd..dc19c53d 100644 --- a/src/endpoints/quests/nostra/staking_quest/verify_stake.rs +++ b/src/endpoints/quests/nostra/staking_quest/verify_stake.rs @@ -42,7 +42,7 @@ pub async fn handler( ) .await; - let user_balance = match balance_result { + let user_balance = match &balance_result { Ok(result) => result[0], Err(e) => return get_error(format!("{}", e)), }; @@ -51,14 +51,13 @@ pub async fn handler( return get_error("You didn't stake any STRK.".to_string()); } - let calldata = vec![user_balance]; let call_result = state .provider .call( FunctionCall { contract_address: state.conf.quests.nostra.staking_contract, entry_point_selector: selector!("convert_to_assets"), - calldata, + calldata: balance_result.unwrap().to_vec(), }, BlockId::Tag(BlockTag::Latest), )