Skip to content

Commit

Permalink
Merge branch '2025-01-22-deposit-withdraw-calldatas' into 01-23-2025-…
Browse files Browse the repository at this point in the history
…add-depositwithdraw-buttons-to-orders
  • Loading branch information
hardingjam committed Feb 4, 2025
2 parents af9e7ba + d856b21 commit b52eb9f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions crates/js_api/src/subgraph/vault.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ pub async fn get_vault_deposit_calldata(
let deposit_amount = validate_amount(deposit_amount)?;

let deposit_args = DepositArgs {
token: Address::from_str(&vault.token.address.0)?,
vault_id: U256::from_str(&vault.vault_id.0)?,
amount: deposit_amount,
token: Address::from_str(&vault.token.address.0)?,
vault_id: U256::from_str(&vault.vault_id.0)?,
amount: deposit_amount,
};

Ok(to_value(&Bytes::copy_from_slice(
Expand Down Expand Up @@ -154,7 +154,7 @@ pub fn get_deposit_and_transaction_args(
) -> Result<(DepositArgs, TransactionArgs), SubgraphError> {
let deposit_args = DepositArgs {
token: Address::from_str(&vault.token.address.0)?,
vault_id: U256::from_str(&vault.vault_id.0)?, // Use vault_id instead of id
vault_id: U256::from_str(&vault.vault_id.0)?,
amount,
};
let transaction_args = TransactionArgs {
Expand Down

0 comments on commit b52eb9f

Please sign in to comment.