Once the transaction has been submitted to the Kima Transaction Backend, you’ll want to display the transaction progress in the frontend. There are 2 GraphQL queries on the Kima subgraph for this purpose.
Copy const result = await fetch("https://graphql.kima.network/v1/graphql", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
query: `
query TransactionDetailsKima($txId: String) {
transaction_data(where: { tx_id: { _eq: $txId } }, limit: 1\) {
failreason
pullfailcount
pullhash
releasefailcount
releasehash
txstatus
amount
creator
originaddress
originchain
originsymbol
targetsymbol
targetaddress
targetchain
tx_id
kimahash
}
}`,
variables: {
txId: txId.toString(),
},
}),
}).then((res) => res.json());
Copy const result = await fetch("https://graphql.kima.network/v1/graphql", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
query: `
query TransactionDetailsKima($txId: String) {
liquidity_transaction_data(where: { tx_id: { _eq: $txId } }, limit: 1\) {
failreason
pullfailcount
pullhash
releasefailcount
releasehash
txstatus
amount
creator
chain
providerchainaddress
symbol
tx_id
kimahash
}
}`,
variables: {
txId: txId.toString(),
},
}),
}).then((res) => res.json());