when i am going to call approve function of erc20 contract.log prints tokenOwner and tokenSpender address same which is contract address msg.sender returns contract address. but i want tokenWner = caller address and tokenSpender = contract address please help.
THis is erc20 method
function approve(address spender, uint256 tokens) public returns (bool success) {
allowed[msg.sender][spender] = tokens;
emit Approval(msg.sender, spender, tokens);
return true;
}
And this is my contract method that is calling token method
function approve(address token, uint256 _value) public returns (bool) {
return ERC20Interface(token).approve(this, _value);
}