Moved React app to TypesScript and added all examples in the app.
Tested all examples, found 2 issues:
close-vault-with-dex.ts returns an error expecting 2 arguments, interface from typings looks correct though and accepts 3 args.
Using the swapWithSdk results in an error, originating from the @polkadot/utils module. After debugging a bit it appears this module doesn't get resolved properly, most likely it's something to do with the webpack config, which I didn't manage to debug. I tried swapping in an Angular app and it worked correctly, so I'm assuming it's something to do with the React setup and not with any of the packages.
close-vault-with-dex.ts
returns an error expecting 2 arguments, interface from typings looks correct though and accepts 3 args.swapWithSdk
results in an error, originating from the@polkadot/utils
module. After debugging a bit it appears this module doesn't get resolved properly, most likely it's something to do with the webpack config, which I didn't manage to debug. I tried swapping in an Angular app and it worked correctly, so I'm assuming it's something to do with the React setup and not with any of the packages.