pendulum-chain / pendulum-webapp

Repository for the testnet prototype of the Pendulum web application
GNU General Public License v3.0
1 stars 0 forks source link

Fix interaction with AMM #52

Closed gonzamontiel closed 2 years ago

gonzamontiel commented 2 years ago

From @ebma

You cannot really interact with the AMM smart contract. Which (I think) is just because the storageDepositLimit attribute has to be added to every smart contract call which we do not yet include (in src/lib/api.ts). Tested it directly in the polkadot.js explorer and you can interact with it from there. So it has to be an issue with the playground UI.

Investigate this and fix interaction with AMM.

ebma commented 2 years ago

So far I failed to update the dependencies to the latest version to fix this issue. When you update them you encounter the error:

./node_modules/@polkadot/api/packageInfo.js 6:27
Module parse failed: Unexpected token (6:27)
File was processed with these loaders:
 * ./node_modules/react-scripts/node_modules/babel-loader/lib/index.js
You may need an additional loader to handle the result of these loaders.
| export var packageInfo = {
|   name: '@polkadot/api',
>   path: new URL('.', import.meta.url).pathname,
|   type: 'esm',
|   version: '7.7.1'

Since we are using create-react-app and it is using webpack v4, I tried overriding the config with craco according to what is mentioned in the FAQ.

After fixing this issue there is another problem which is also mentioned in this issue ticket. I was not yet able to solve it.

I uploaded my WIP to this branch.