bitcoin-transaction icon indicating copy to clipboard operation
bitcoin-transaction copied to clipboard

Accept Santoshi amounts

Open lburgers opened this issue 8 years ago • 1 comments

Hi,

I really like your project it's the only one I've found that processes btc transactions from beginning to end. I was wondering if you would be willing to add an option to accept santoshi instead of btc?

I could also add it myself if you are open to PRs.

lburgers avatar Dec 02 '17 20:12 lburgers

Hey, glad you like the project, and good idea for an addition. Definitely open to PRs or if you don't mind waiting I can add it myself when I get a moment.

I would advise to throw an exception when both btc and satoshi are supplied just to make absolutely sure the user knows what amount they want to send before committing a transaction.

Additionally you could add an option to the getBalance method to return the amount in satoshi instead of btc. Something like "satoshi": true in the options object.

Also be sure to update the README. :)

hexonaut avatar Dec 05 '17 23:12 hexonaut