Skip to content
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

XVerse Chrome Extension doesn't allow custom URLs for custom networks #836

Open
Warchant opened this issue Aug 26, 2024 · 5 comments
Open
Labels
bug Something isn't working

Comments

@Warchant
Copy link

Component

XVerse Chrome Web Extension.

Severity

Minor.

Summary

I want to use XVerse for testing purposes on my custom signet network. XVerse allows selection of Mainnet, Testnet and Signet networks, but all of those are "pre-deployed" networks. I want to use my own custom network.

I successfully started bitcoind with my custom signet, started mempool, ensured correct configuration and made sure my mempool API is available over HTTPS.

But when I open XVerse Chrome Extension, I select "Signet" network, then paste url of my mempool API, it keeps showing me "Invalid URL" error.

I traced that to this code:

export const isValidBtcApi = async (url: string, network: NetworkType) => {
if (!validUrl.isUri(url)) {
return false;
}
const btcClient = new BitcoinEsploraApiProvider({
network,
url,
});
const defaultBtcClient = new BitcoinEsploraApiProvider({
network,
});
try {
const [customHash, defaultHash] = await Promise.all([
btcClient.getBlockHash(1),
defaultBtcClient.getBlockHash(1),
]);
// this ensures the URL is for correct network
return customHash === defaultHash;

Here, xverse fetches hash of a 1st block from 2 sources: from default url, and from a custom url that user provided.

If hashes are different, XVerse Chrome Extensionshows "Invalid URL" error.

But hashes are expected to be different, because I am using my own custom signet network.

Expected Fix

Please add a bypass for this check (maybe a checkbox?), such that XVerse Chrome Extension will "just accept" my whatever custom URL is provided.

This will add a support for custom signet networks.
Thank you.

@Warchant Warchant added the bug Something isn't working label Aug 26, 2024
@Warchant
Copy link
Author

cc @abdulhaseeb4239 @victorkirov

@yknl
Copy link
Contributor

yknl commented Aug 28, 2024

Thanks for reporting, a fix is being implemented.

@taras-ostapovych-boostylabs

like to this request

@bap2pecs
Copy link

Thanks for reporting, a fix is being implemented.

is there a branch/issue we can track? we also need to connect to our local Bitcoin regtest network

@Warchant
Copy link
Author

Any progress?

@github-staff github-staff deleted a comment from Lxx-c Oct 23, 2024
@github-staff github-staff deleted a comment from Lxx-c Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants