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

feat: add option for broadcasting claims and refunds via block explorer #802

Merged
merged 11 commits into from
Jan 20, 2025

Conversation

SwapMarket
Copy link
Contributor

@SwapMarket SwapMarket commented Jan 15, 2025

#521

When "External Broadcast" is enabled in Settings the txHex will be posted to {blockExplorerUrl}/api/tx in addition to Boltz backend

Copy link

vercel bot commented Jan 15, 2025

@SwapMarket is attempting to deploy a commit to the boltz Team on Vercel.

A member of the Team first needs to authorize it.

src/utils/claim.ts Outdated Show resolved Hide resolved
src/utils/claim.ts Outdated Show resolved Hide resolved
src/utils/claim.ts Outdated Show resolved Hide resolved
@@ -131,3 +131,26 @@ export const parsePrivateKey = (privateKey: string): ECPairInterface => {
return ECPair.fromWIF(privateKey);
}
};

// posts transaction to a block explorer
export const broadcastToExplorer = async (
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With which kind of explorers did you test this?

Copy link
Contributor Author

@SwapMarket SwapMarket Jan 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, only Esplora on the regtest. Changed the code to catch mempool.space/liquid.network errors as well. But I don't have them on regtest.

src/utils/refund.ts Outdated Show resolved Hide resolved
Copy link

vercel bot commented Jan 16, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
webapp ✅ Ready (Inspect) Visit Preview Jan 20, 2025 3:47pm
webapp-mainnet ✅ Ready (Inspect) Visit Preview Jan 20, 2025 3:47pm

@@ -240,6 +240,9 @@ const dict = {
no_wallet_connected: "No wallet connected",
no_lockup_transaction: "No lockup transaction found",
routing_fee_limit: "Routing fee limit",
broadcast_setting: "External Broadcast",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kilrau please check those translations

src/utils/claim.ts Outdated Show resolved Hide resolved
src/utils/helper.ts Outdated Show resolved Hide resolved
src/utils/helper.ts Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants