-
Notifications
You must be signed in to change notification settings - Fork 191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: chainflip explorer link #8529
base: develop
Are you sure you want to change the base?
Conversation
@gomesalexandre is it an option to link to the deposit channel instead of the swap? cos we have that information available the moment we open the channel (start the swap ui screen) This link looks like this: https://scan.chainflip.io/channels/6071496-Bitcoin-26902 And we have the |
gm @CumpsD - from a user perspective it seems that the swap URL is more relevant/useful (shows gas fee, rate, total fees etc). Is there a reason we'd want to show the deposit channel URL instead? |
You're right, swap page is the best :) The future walletless swapper might use the deposit page perhaps, since that provides the info to verify the deposit address for the security minded |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
query: ` | ||
query GetStringSearchResults($searchString: String!) { | ||
txRefs: allTransactionRefs(filter: {ref: {equalTo: $searchString}}) { | ||
nodes { | ||
swap: swapRequestBySwapRequestId { | ||
nativeId | ||
} | ||
} | ||
} | ||
} | ||
`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Non-blocking: I'd prefer to see this query extracted as a constant for readability/maintainability.
return maybeChainflipSwapId | ||
? `${baseUrl}${maybeChainflipSwapId}` | ||
: `${defaultExplorerBaseUrl}${id}` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧠
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, it did work for an ETH on Arb to an ETH swap - perhaps an issue with Chainflip boost (which I used for the first trade)?
Successful TX with expected link: https://jam.dev/c/346b94e5-d8cc-4eec-829c-cb43db01b739
Description
Does what it says on the box - effectively steals the GraphQL query (although simplified) from https://scan.chainflip.io to get swapId from the Txid, and uses that in place of regular explorer Tx link when ready.
Confirmed with @CumpsD we can use the endpoint, although internal.
Note the when ready above: it takes some time for things to be indexed on the flip side of things, e.g a minute or so for EVM sells.
Issue (if applicable)
closes #8517
Risk
Low
Testing
graphql
)Engineering
Operations
Screenshots (if applicable)