mirror of
https://github.com/Instadapp/yield-contract.git
synced 2024-07-29 21:47:29 +00:00
Merge branch 'master' of https://github.com/InstaDApp/dsa-yield-contract
This commit is contained in:
commit
3a9287ebb4
|
@ -158,13 +158,13 @@ contract PoolToken is ReentrancyGuard, DSMath, ERC20Pausable {
|
||||||
emit LogWithdraw(tknAmt, _burnAmt, _feeAmt);
|
emit LogWithdraw(tknAmt, _burnAmt, _feeAmt);
|
||||||
}
|
}
|
||||||
|
|
||||||
function addInsurance(uint tknAmt) external payable {
|
function addInsurance(uint tknAmt) external {
|
||||||
baseToken.safeTransferFrom(msg.sender, address(this), tknAmt);
|
baseToken.safeTransferFrom(msg.sender, address(this), tknAmt);
|
||||||
insuranceAmt = add(insuranceAmt, tknAmt);
|
insuranceAmt = add(insuranceAmt, tknAmt);
|
||||||
emit LogAddInsurance(tknAmt);
|
emit LogAddInsurance(tknAmt);
|
||||||
}
|
}
|
||||||
|
|
||||||
function withdrawInsurance(uint tknAmt) external payable {
|
function withdrawInsurance(uint tknAmt) external {
|
||||||
require(msg.sender == instaIndex.master(), "not-master");
|
require(msg.sender == instaIndex.master(), "not-master");
|
||||||
require(tknAmt <= insuranceAmt || tknAmt == uint(-1), "not-enough-insurance");
|
require(tknAmt <= insuranceAmt || tknAmt == uint(-1), "not-enough-insurance");
|
||||||
if (tknAmt == uint(-1)) {
|
if (tknAmt == uint(-1)) {
|
||||||
|
|
|
@ -157,7 +157,7 @@ contract PoolToken is ReentrancyGuard, ERC20Pausable, DSMath {
|
||||||
emit LogAddInsurance(tknAmt);
|
emit LogAddInsurance(tknAmt);
|
||||||
}
|
}
|
||||||
|
|
||||||
function withdrawInsurance(uint tknAmt) external payable {
|
function withdrawInsurance(uint tknAmt) external {
|
||||||
require(msg.sender == instaIndex.master(), "not-master");
|
require(msg.sender == instaIndex.master(), "not-master");
|
||||||
require(tknAmt <= insuranceAmt || tknAmt == uint(-1), "not-enough-insurance");
|
require(tknAmt <= insuranceAmt || tknAmt == uint(-1), "not-enough-insurance");
|
||||||
if (tknAmt == uint(-1)) {
|
if (tknAmt == uint(-1)) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user