2
        const provider = anchor.AnchorProvider.env();
        provider.opts.commitment = 'confirmed';
        anchor.setProvider(provider);
        console.log('kuki: ' + provider.connection.commitment);

Kuki logs commitment as processed. How do i set commitment to confirmed to connection then if this doesn't work?

1 Answer 1

2

You can call the constructor directly:

https://github.com/coral-xyz/anchor/blob/5a025b949e67bf424a30641028973f00325b8f1e/ts/packages/anchor/src/provider.ts#L61

With proper options:

https://solana-labs.github.io/solana-web3.js/modules.html#ConfirmOptions

Or pass the commitment to each call, most calls accept it as a param.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.