AmbireTech / adex-platform

AdEx Platform UI
https://platform.adex.network
GNU General Public License v3.0
58 stars 19 forks source link

Closed campaign says distributed % is 0 even though it's above 80% #303

Closed Ivshti closed 4 years ago

Ivshti commented 4 years ago

Describe the bug After closing a campaign, it's "distributed" becomes 0

To Reproduce Steps to reproduce the behavior:

  1. Open a campaign
  2. wait for it to gain some distributed %
  3. close it, the distributed % will drop to 0

Expected behavior Distributed % to be 100%

Screenshots Screenshot_2020-01-21 AdEx Platform Screenshot_2020-01-21 https market adex network

Additional context Campaign ID: 0xb9f9e4fc3fc7ee054bce02ab59beca732d49bce7d3267becf11ca5ac0d47665b

rori4 commented 4 years ago

If we have a campaign that is distributed to 40% for example and we close it shouldn't the distribution stay at 40% after we close it? After all we have served only 40% of the initial deposit and the rest is returned to us.

vanina-iv commented 4 years ago

I agree with Rangel. This would be useful when we start doing promotions for advertisers - E.g. "spend a certain amount, and we'll match it"

Ivshti commented 4 years ago

it should but this is not what the bug is

Even though there IS some distribution, the number displayed is 0%.

But yes, the % should stay the same as it was when you closed it.

rori4 commented 4 years ago

It is hard for me to debug this. Even though i set everything locally on a new database with tom and jerry validators I can't even create an adunit as there is, I presume, an IPFS IP filter so I can't do this from my IP.

Anyway. I know how to make the market display the distribution to be 100% again, however this will break the logic in the receipts as the ammount of the receipts is calculated with the *deposit distributionRatio**

Best way would be the distribution ratio to stay at the percentage it is before closing it. Suggestions on how to setup and debug this would be appreciated.

Ivshti commented 4 years ago

I think the best approach would be to review the market source code and see what might've went wrong

even if you setup the test env, you can't guarantee you will reproduce it

re filter: shteryana can fix that