File tree Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -63,9 +63,8 @@ contract yakuSwap is Ownable {
63
63
64
64
swap.status = SwapStatus.Completed;
65
65
(bool success ,) = swap.toAddress.call {value: swap.amount}("" );
66
- if (! success) {
67
- swap.status = SwapStatus.Created;
68
- }
66
+
67
+ require (success);
69
68
}
70
69
71
70
function cancelSwap (bytes32 _swapId ) public {
@@ -76,17 +75,14 @@ contract yakuSwap is Ownable {
76
75
77
76
swap.status = SwapStatus.Cancelled;
78
77
(bool success ,) = swap.fromAddress.call {value: swap.amount}("" );
79
- if (! success) {
80
- swap.status = SwapStatus.Created;
81
- }
78
+
79
+ require (success);
82
80
}
83
81
84
82
function getFees () public onlyOwner {
85
- uint oldTotalFees = totalFees;
86
83
totalFees = 0 ;
87
84
(bool success ,) = owner ().call {value: totalFees}("" );
88
- if (! success) {
89
- totalFees = oldTotalFees;
90
- }
85
+
86
+ require (success);
91
87
}
92
88
}
You can’t perform that action at this time.
0 commit comments