I completed the truffle framework pet shop tutorial using Metamask and Ganache. The blokchain (locally hosted on port 7545) stores my "pet adoptions" which are represented as ethereum transactions. I can view the past transactions either in Ganache or by clicking on the Metamask icon in Chrome.
The problem arises when I close Ganache and start it again. There are now no transactions shown in Ganache, as (according to my understanding) the blockchain is stored in memory, so after restarting Ganache it is blank.
However, Metamask still shows my past transactions, even though they should be gone. This leads to inconsistencies in my pet shop app. Furthermore, my adoptions now don't work: Upon trying to adopt a pet, I get the following error:
Error: the tx doesn't have the correct nonce. account has nonce of: 0
tx has nonce of: 10
Does Metamask store the transactions somewhere, and that's why they're still displaying? How does Metamask actually interact with the blockchain?
Edit: Turns out the only solution I have found is to remove Metamask and install it again.