mirror of
https://github.com/AthanorLabs/atomic-swap.git
synced 2026-01-10 14:48:14 -05:00
only allow calling set_ready once
This commit is contained in:
@@ -48,7 +48,7 @@ contract Swap {
|
||||
|
||||
// Alice must call set_ready() within t_0 once she verifies the XMR has been locked
|
||||
function set_ready() external {
|
||||
require(msg.sender == owner && block.timestamp < timeout_0);
|
||||
require(!isReady && msg.sender == owner && block.timestamp < timeout_0);
|
||||
isReady = true;
|
||||
timeout_1 = block.timestamp + 1 days;
|
||||
emit IsReady(true);
|
||||
|
||||
Reference in New Issue
Block a user