feat: Expose commitment level when fetching account data
ngundotra opened this issue · 0 comments
ngundotra commented
Current generated account method signatures look like
static async fromAccountAddress(
connection: web3.Connection,
address: web3.PublicKey
): Promise<Counter> {
const accountInfo = await connection.getAccountInfo(address);
...
}
But they should have a commitmentConfig parameter to allow max flexibility
static async fromAccountAddress(
connection: web3.Connection,
address: web3.PublicKey,
commitmentConfig?: GetAccountInfoConfig /* @solana/web3.js type */
): Promise<Counter> {
const accountInfo = await connection.getAccountInfo(address, commitmentConfig);
...
}