We're using metamask on our frontend code, and it is working on other chains.
this is the code, which works fine for all other chains like arbitrum and eth:
if (window.ethereum) {
try {
const web3 = new Web3(window.ethereum);
await window.ethereum.request({ method: "eth_requestAccounts" }); // Request account access
const accounts = await web3.eth.getAccounts();
const fromAddress = accounts[0];
We're using metamask on our frontend code, and it is working on other chains.
this is the code, which works fine for all other chains like arbitrum and eth:
if (window.ethereum) {
try {
const web3 = new Web3(window.ethereum);
await window.ethereum.request({ method: "eth_requestAccounts" }); // Request account access
const accounts = await web3.eth.getAccounts();
const fromAddress = accounts[0];
};
const pinJobDetailsToIPFS = async (jobDetails) => {
const url = api.pinata.cloud/pinning/pinJSONTo...;
const headers = {
"Content-Type": "application/json",
pinata_api_key: pinataApiKey,
pinata_secret_api_key: pinataSecretApiKey,
};
};