"it doesn't work" isn't a good description of a problem. If you can tell us what you tried, what happened, and what you expected to happen instead, we can help. But the code does exactly what it says it does.
– smarxJan 2 at 19:57

The latter (this.contract.showsender()) is invalid, even if it's allowed. The function takes a parameter, and you haven't passed one. Try this.contract.showsender("0x000000...").
– smarxJan 2 at 23:44

As has been mentioned a few times, you can't have optional parameters. But the solution to your problem may best be left outside Solidity, and dealt with on the front-end. It may be simpler (and cheaper for users!) if you do this logic all on the front-end and then just pass the appropriate address to your contract function. I don't know the specifics of what you're trying to implement but it's always a good idea to ask "does this logic need to be done on-chain?"
– AnAllergyToAnalogyJan 3 at 0:00