cryptoprimitive / Toastytrade

Decentralized crypto-to-fiat trading, driven by Burnable Payments
MIT License
0 stars 0 forks source link

AutoreleaseTime is never set to non-zero (server does not reflect contract's AutoreleaseTime) #4

Open coinop-logan opened 5 years ago

coinop-logan commented 5 years ago

The event reaction code (as written) doesn't have access to the contract's state (to fetch the newly set autoreleaseTime). This is stopping us from implementing autorelease warning notifications.

One solution is to add in direct contract monitoring to the code. This could be part of mainLoop or its own thread.

Another option is to edit the event in the contract to include the newly set autoreleaseTime. Oddly, that might be both easier and better in the long run... Maybe the event "should" contain that information.

coinop-logan commented 5 years ago

To clarify, above I was referring to the ClaimStarted event. This event should probably include the newly calculated autoreleaseTime.