I am trying to set up a structure that will receive payment with the sendTransaction method. But there is a small problem. The sendTransaction method works fine, but has the user completed the transfer? Did the transfer go to the destination wallet? I can't control like Is there a way to do these checks?
You can think like this.
sendEthButton.addEventListener('click', () => {
ethereum
.request({
method: 'eth_sendTransaction',
params: [
{
from: accounts[0],
to: {sellerAdress},
value: {totalAmount}
},
],
})
.then((txHash) => console.log(txHash))
.catch((error) => console.error);
});
Thanks to this method, the transfer notification is sent to the customer's metamask. There is no problem here. But did the client approve the transfer request from Metamask? Is the transfer complete? Or did the customer not respond to the transfer notification? Is there any method to do such queries?
Briefly, how can I check the transfer status to see if the payment has been completed?