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

Better fee estimation #381

Merged
merged 11 commits into from
Oct 15, 2024
Merged

Better fee estimation #381

merged 11 commits into from
Oct 15, 2024

Conversation

nud3l
Copy link
Contributor

@nud3l nud3l commented Oct 14, 2024

Instead of relying on assumptions about the inputs, allow fee estimation to account for all possible inputs.

Copy link

changeset-bot bot commented Oct 14, 2024

⚠️ No Changeset found

Latest commit: 7c4edde

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

vercel bot commented Oct 14, 2024

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

Name Status Preview Comments Updated (UTC)
bob ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 15, 2024 0:57am

sdk/src/wallet/utxo.ts Outdated Show resolved Hide resolved
sdk/src/wallet/utxo.ts Outdated Show resolved Hide resolved
sdk/src/wallet/utxo.ts Outdated Show resolved Hide resolved
Comment on lines +17 to +19
// TODO: Use a real P2SH-P2WPKH address
// TODO: Add the pubkey to allow spending from the outputs
// '3DFVKuT9Ft4rWpysAZ1bHpg55EBy1HVPcr',
Copy link
Contributor

Choose a reason for hiding this comment

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

Should these be addressed before merging?

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah, it is a test case that Dom disabled.

}

// We need the public key to generate the redeem and witness script to spend the scripts
if (addressInfo.type === (AddressType.p2sh || AddressType.p2wsh)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Just to note: p2wsh is mentioned as not being supported in getInputFromUtxoAndTx

// P2WPKH: https://blockstream.info/address/bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq
'bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq',
// P2SH-P2WPKH: https://blockstream.info/address/3DFVKuT9Ft4rWpysAZ1bHpg55EBy1HVPcr
// TODO: As above, add a correct P2SH-P2WPKH address with its pub key
Copy link
Contributor

Choose a reason for hiding this comment

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

We should probably add this before merging, right?

@danielsimao danielsimao merged commit 6a6b486 into master Oct 15, 2024
5 checks passed
@danielsimao danielsimao deleted the dom/fee-estiamte branch October 15, 2024 12:58
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.

3 participants