api.tx.balances.transfer(recipient, new BN(txAmount)).paymentInfo(sender)
When I call paymentinfo to get a transaction fee, I got this error.
Error: The transactionPaymentApi.queryInfo runtime call is not available in your environment
-
1What chain are you querying?– Tarik GulMar 21 at 11:38
-
1which version of polkadot.js are you using?– pepoviolaMar 21 at 11:59
1 Answer
I used 9.6.2, just upgraded the @polkadot/api to the latest version and it worked as expected. Thank you @Tarik Gul and @pepoviola