Skip to content

Separate output and donation

Emergent Reasons requested to merge separate-output-and-donation into master

Jonathan Silverblood, [05.02.20 19:45] @dagurval so I think I found the issue, and it's rather simple to fix. The template data I sent to you included amount, address and expiration. It doesn't separate the donation amount from the campaign amount, so your inputs are signing for outputs of the donation amount rather than the campaign amount. That's why I got one that worked (donation amount == campaign amount) but when I added more they failed (their donation amount !== campaign amount).

Jonathan Silverblood, [05.02.20 19:45] To fix this, I'm changing the structure so it now looks like this:

Jonathan Silverblood, [05.02.20 19:46] { output: { value: (fundraiser.campaign.amount * SATS_PER_BCH).toFixed(8), address: fundraiser.campaign.address, }, donation: { amount: amount.toFixed(8); } expires: moment(fundraiser.campaign.expires).unix(), }

Jonathan Silverblood, [05.02.20 19:47] where the campaign output is the output you should have for the commitment, and the donation amount is the size of the input you should create.

Edited by Emergent Reasons

Merge request reports