Skip to content

Commit

Permalink
feat: add calldata for converting to assets read call
Browse files Browse the repository at this point in the history
  • Loading branch information
ayushtom committed Mar 12, 2024
1 parent 6226668 commit 72941c8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/endpoints/quests/nostra/staking_quest/verify_stake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)),
};
Expand All @@ -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),
)
Expand Down

0 comments on commit 72941c8

Please sign in to comment.