in public/content.js [460:475]
function handleTransactionSubmit({ amount, data, recipient }) {
chrome.runtime.sendMessage(
{
action: 'submitTransaction',
amount,
data,
recipient,
},
(response) => {
if (response) {
// Send the response to the page script
window.postMessage({ type: 'FROM_CONTENT_SCRIPT', data: response }, '*');
}
}
);
}