Skip to content

Conversation

@gregdhill
Copy link
Contributor

Adding some fees in case frontends want to charge users for onramping

Signed-off-by: Gregory Hill <[email protected]>
Signed-off-by: Gregory Hill <[email protected]>
@changeset-bot
Copy link

changeset-bot bot commented Oct 10, 2024

⚠️ No Changeset found

Latest commit: b6a576a

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

@vercel
Copy link

vercel bot commented Oct 10, 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 10, 2024 3:31pm

outputs.push({
// OP_RETURN https://github.com/paulmillr/scure-btc-signer/issues/26
script: Script.encode(['RETURN', hex.decode(opReturnData)]),
script: Script.encode(['RETURN', hex.decode(stripHexPrefix(opReturnData))]),
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this necessary now and wasn't necessary before?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It does the same thing as the code I removed above

fee = 0;
}

const feeDecimal = fee / 10000;
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd use big.js here. JS arithmetic with decimals is not great.

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.

4 participants