[Solved] Ownable, not recognizing I am the owner

I am trying to call an onlyOwner predicated function. With the address in metamask that I deployed from and I have verified that IS the owner.

Can you share small parts of code (reset countdown function for example)?
How did you get the owner when you clicked on “console log owner” button? (was a contract call)
The expectation would be to work what you did, I don’t know why it didn’t work.


In Solidity:

function resetRTSCountdown() public onlyOwner {
        returnToSenderCountdownBeginDateTime = block.timestamp;

and In JS:

const resetCountdown = () => {

<button onClick={resetCountdown}>reset countdown (admin only)</button>

How I’m retrieving the owner

const getOwner = () => {


const resetCountdown = () => {
      aetokenContract.methods.resetRTSCountdown().send({from: ethereum.selectedAddress });

Where does “ethereum” come from is a web3? so something like web3.ethereum.selectedAddress?

that syntax usually works, but you can use any other syntax that gets you current eth address.

Success! This also answers like 3 questions of mine so we are out ahead right now.