Remove Payable casting for swap functions
@@ -60,7 +60,7 @@ contract VendingMachine {
/// @dev Burns TBTC, transfers DOT from vending machine to caller
/// @param _dotId ID of Deposit Owner Token to buy
function tbtcToDot(uint256 _dotId) public {
- require(isQualified(address(uint160(address(_dotId)))), "Deposit must be qualified");
+ require(isQualified(address(_dotId)), "Deposit must be qualified");
require(tbtcToken.balanceOf(msg.sender) >= getDepositValueLessSignerFee(), "Not enough TBTC for DOT exchange");
tbtcToken.burnFrom(msg.sender, getDepositValueLessSignerFee());
@@ -74,7 +74,7 @@ contract VendingMachine {
/// @dev Transfers DOT from caller to vending machine, and mints TBTC to caller
/// @param _dotId ID of Deposit Owner Token to sell
function dotToTbtc(uint256 _dotId) public {
- require(isQualified(address(uint160(address(_dotId)))), "Deposit must be qualified");
+ require(isQualified(address(_dotId)), "Deposit must be qualified");
depositOwnerToken.transferFrom(msg.sender, address(this), _dotId);
tbtcToken.mint(msg.sender, getDepositValueLessSignerFee());
