-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ApiNetworkProvider does not satisfy ITransactionFetcher interface #499
Comments
Hello, I have exactly the same error when trying this :
Tryed with "@multiversx/sdk-core": "^13.2.1" and "^13.9.0" |
Hello @AliArthur, hello @Buky33, Thanks, we'll have a look 🙌 How does the import of Additionally, what TypeScript version are you using (seen in package.json)? |
Reproduced, thank you 🙌 Since v13.7.0, we've brought the network providers directly into https://docs.multiversx.com/sdk-and-tools/sdk-js/sdk-js-cookbook-v13/#creating-network-providers Thus, workaround: use the latest available Furthermore, we are going to fix this compatibility issue (regression), so that the |
Actually, @AliArthur, @Buky33, I was mistaken above, where I thought I've reproduced the issue (in fact, I did not). Do you think it's possible to provide the TypeScript version you are using, your The workaround would be as mentioned, to use the imports from An alternative workaround would be to fix the TypeScript version - Thank you 🙌 Additional references: |
Hello @andreibancioiu ApiNetworkProvider is imported from '@multiversx/sdk-core' Error message is : Package.json : tsconfig.json : next.config.js : const nextConfig = { module.exports = nextConfig; Thanks again for taking some time |
Hello @Buky33, Thank you for the provided details 🙏 We will attempt to reproduce it using your configuration, and come back with the solution. In the meantime, a quick and dirty workaround: |
Argument of type 'ApiNetworkProvider' is not assignable to parameter of type 'ITransactionFetcher'.
The types returned by 'getTransaction(...)' are incompatible between these types.
Type 'Promise' is not assignable to type 'Promise'.
Type 'TransactionOnNetwork' is not assignable to type 'ITransactionOnNetwork'.
The types of 'contractResults.items' are incompatible between these types.
Type 'ContractResultItem[]' is not assignable to type 'IContractResultItem[]'.
Type 'ContractResultItem' is not assignable to type 'IContractResultItem'.
The types of 'logs.events' are incompatible between these types.
Type 'TransactionEvent[]' is not assignable to type 'ITransactionEvent[]'.
Type 'TransactionEvent' is not assignable to type 'ITransactionEvent'.
The types returned by 'dataPayload.valueOf().entries()' are incompatible between these types.
Type 'IterableIterator<[number, number]>' is missing the following properties from type 'ArrayIterator<[number, number]>': map, filter, take, drop, and 9 more.
const apiNetworkProvider = new ApiNetworkProvider(chainGateway); const watcherUsingApi = new TransactionWatcher(apiNetworkProvider); return watcherUsingApi.awaitCompleted(txHash);
The text was updated successfully, but these errors were encountered: