-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into 2025-02-14-vault-id-fix
- Loading branch information
Showing
65 changed files
with
1,483 additions
and
626 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
use cynic::Id; | ||
use rain_orderbook_bindings::wasm_traits::prelude::*; | ||
use rain_orderbook_subgraph_client::{OrderbookSubgraphClient, OrderbookSubgraphClientError}; | ||
use reqwest::Url; | ||
|
||
/// Internal function to fetch a single transaction | ||
/// Returns the Transaction struct | ||
#[wasm_bindgen(js_name = "getTransaction")] | ||
pub async fn get_transaction( | ||
url: &str, | ||
tx_hash: &str, | ||
) -> Result<JsValue, OrderbookSubgraphClientError> { | ||
let client = OrderbookSubgraphClient::new(Url::parse(url)?); | ||
let transaction = client.transaction_detail(Id::new(tx_hash)).await?; | ||
Ok(to_value(&transaction)?) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
use super::common::*; | ||
use crate::schema; | ||
use typeshare::typeshare; | ||
|
||
#[derive(cynic::QueryFragment, Debug)] | ||
#[cynic(graphql_type = "Query", variables = "IdQueryVariables")] | ||
#[typeshare] | ||
pub struct TransactionDetailQuery { | ||
#[arguments(id: $id)] | ||
#[typeshare(typescript(type = "TransactionSubgraph"))] | ||
pub transaction: Option<Transaction>, | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.