"Fireblocks Web3 Provider Error: 'invalid account' after successful implementation"

Hello everyone,

I’ve been using the Fireblocks Web3 Provider to perform transactions from a specific contract. I had it implemented, and it was working fine, but after a few days of not using these requests, today I received the following error message:

Error: invalid account
    at BrowserProvider.getSigner (/home/ligia/Documents/trexx/nft-rent-marketplace/api/node_modules/ethers/src.ts/providers/provider-jsonrpc.ts:1052:15)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async BrowserProvider.getSigner (/home/ligia/Documents/trexx/nft-rent-marketplace/api/node_modules/ethers/src.ts/providers/provider-browser.ts:140:16)
    at async marketplaceContract (/home/ligia/Documents/trexx/nft-rent-marketplace/api/infra/config/blockchain/marketplaceContract.ts:10:18)
    at async MarketplaceContractService.startRent (/home/ligia/Documents/trexx/nft-rent-marketplace/api/infra/services/marketplaceContract/marketplaceContract.service.ts:75:41)
    at async RentCRUDUsecase.create (/home/ligia/Documents/trexx/nft-rent-marketplace/api/data/usecases/rent/rentCRUD.ts:25:29)
    at async RentController.create (/home/ligia/Documents/trexx/nft-rent-marketplace/api/presentation/controllers/abstractCRUDController.ts:14:31)

I’m initializing the provider like this:

import { FireblocksWeb3Provider, ChainId, FireblocksProviderConfig } from "@fireblocks/fireblocks-web3-provider";
import dotenv from 'dotenv';
dotenv.config();

const fireblocksProviderConfig: FireblocksProviderConfig = {
  apiBaseUrl: process.env.FIREBLOCKS_API_BASE_URL,
  privateKey: process.env.FIREBLOCKS_PRIVATE_KEY,
  apiKey: process.env.FIREBLOCKS_API_KEY,
  chainId: ChainId.POLYGON_TEST,
  logTransactionStatusChanges: true,
};

const fireblocksProvider = new FireblocksWeb3Provider(fireblocksProviderConfig);

export default fireblocksProvider;

I’ve already changed the address passed to BrowserProvider.getSigner() to see if that might be the issue, but I still get the same ‘invalid account’ error. Can someone help me resolve this?

Thank you!

Hi @ligiabicalho

Alec from Fireblocks Support here. Can you try passing in the vault account IDs you want to use as an array in the config? The key to use is vaultAccountIds.