andromedaprotocol / andromeda-core

Operating System and ADO Smart Contracts
https://andromedaprotocol.io/
38 stars 27 forks source link

[Splitter] Splitter Lock Time is causing error. #544

Closed daniel-wehbe closed 2 months ago

daniel-wehbe commented 2 months ago

Describe the bug Adding a lock time for the splitter is not working as intended. The lock is set using our new Expiry struct:

pub enum Expiry {
    FromNow(Milliseconds),
    AtTime(Milliseconds),
}

Both of the options should be specified in milliseconds. After testing the following results were found: -FromNow: Specifying from_now using any value causes an error. -AtTime: Specifying at_time in milliseconds errors (lock too long). Specifying it in seconds works. Need to look into this and get fixed. Notes: -This issue is also found for conditional splitter. -Conditional splitter lock time uses MillisecondsDuration and not Expiry. Might want to make it Expiry to conform with the splitter.