Closed Klapeyron closed 3 weeks ago
@Klapeyron
Sample with order:
{
"blockHeight": "1059433",
"id": "13835058055282165321"
}
https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Ftest-market.bigsb.network#/explorer/query/1059433
@autopilot
@autopilot
Hi @Klapeyron,
Thanks for providing the sample order data. To implement the feature of linking orders to the Polkadot explorer, you can use the blockHeight from the order data to construct the URL. Here's a quick example of how you can generate the URL dynamically:
const order = {
blockHeight: "1059433",
id: "13835058055282165321"
};
const explorerBaseUrl = "https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Ftest-market.bigsb.network#/explorer/query/";
const explorerUrl = `${explorerBaseUrl}${order.blockHeight}`;
console.log(explorerUrl); // Outputs: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Ftest-market.bigsb.network#/explorer/query/1059433
This will create a link that directs users to the Polkadot explorer for the specific block associated with the order. Let me know if you need further assistance!
Each order creation is associated with a block number (available in graphql). Would be great to have an option to jump from order to explorer and show associated transaction sample URL