Sailias / bitcoin_payable

A rails bitcoin payment processing gem
MIT License
121 stars 31 forks source link

How can we grab confirmations? #10

Closed krtschmr closed 7 years ago

krtschmr commented 7 years ago

Whats the technical background to capture confirmations, saying we want to wait 1 confirmation before we approve he transaction to avoid double-spends which people might try on us. We basically do/will have 50 payments per day which we now want to control by ourself.

Sailias commented 7 years ago

@krtschmr At the moment I am not calculating the number of confirmations. I can take a look at this and see if I can implement a version in another branch.

Sailias commented 7 years ago

@krtschmr here is my first pass at required confirmation number.

https://github.com/Sailias/bitcoin_payable/tree/confirmations

you will need to rerun rails g bitcoin_payable:install in your parent application

You can add this to your bitcoin_payable configuration:
BitcoinPayable.config.required_confirmations = 1

krtschmr commented 7 years ago

umm, that looks easy. i'll try it out :)

Am 18.12.2016 um 22:34 schrieb Jonathan Salis:

@krtschmr https://github.com/krtschmr here is my first pass at required confirmation number.

https://github.com/Sailias/bitcoin_payable/tree/confirmations

you will need to rerun |rails g bitcoin_payable:install| in your parent application

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Sailias/bitcoin_payable/issues/10#issuecomment-267827797, or mute the thread https://github.com/notifications/unsubscribe-auth/AMv1uibY25l11F2OzlmLxUqgCnwThXWrks5rJVJrgaJpZM4LQDb7.


Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft. https://www.avast.com/antivirus

Sailias commented 7 years ago

@krtschmr closing this since it's been a while. I haven't merged it into master, but I'll hopefully be able to take a look at integrating it soon.

Let me know how it's worked for you.

Sailias commented 7 years ago

@krtschmr did you end up using this branch? I haven't merged it into master yet.

krtschmr commented 7 years ago

actually i am not sure if that is the correct way to do. i asked stackoverflow but didnt got an answer.

if we just say current_Block_height - block +1 to get the confirmations we actuall just get the amount of blocks after that confirmation. how we can make sure that that block is valid and the next one aswell and is inside the blockchain and not into another chain?

maybe i think too complicated

Am 27.04.2017 um 20:24 schrieb Jonathan Salis:

@krtschmr https://github.com/krtschmr did you end up using this branch? I haven't merged it into master yet.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Sailias/bitcoin_payable/issues/10#issuecomment-297712104, or mute the thread https://github.com/notifications/unsubscribe-auth/AMv1us-5bF7ECbBJDnu4nCskpjA4aYnjks5r0JclgaJpZM4LQDb7.


Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft. https://www.avast.com/antivirus