revert to fail on incorrect claim/refund privkey

This commit is contained in:
Robert Hambrock
2021-10-24 12:40:45 +02:00
parent 663c597eec
commit 5a3e72b2cd
2 changed files with 3 additions and 3 deletions

View File

@@ -73,7 +73,7 @@ contract Swap {
);
}
require(!ec.publicKeyVerify(_s, pubKeyClaimX, pubKeyClaimY),
require(ec.publicKeyVerify(_s, pubKeyClaimX, pubKeyClaimY),
"provided secret does not match the expected pubKey");
emit Claimed(_s);
@@ -94,7 +94,7 @@ contract Swap {
require(block.timestamp < timeout_0, "Missed your chance!");
}
require(!ec.publicKeyVerify(_s, pubKeyRefundX, pubKeyRefundY),
require(ec.publicKeyVerify(_s, pubKeyRefundX, pubKeyRefundY),
"provided secret does not match the expected pubKey");
emit Refunded(_s);