aeternity / AEXs

Aeternity expansions repository — application layer standards
10 stars 25 forks source link

AEX-2 - passing config data to the wallet ? #140

Closed nikita-fuchs closed 3 years ago

nikita-fuchs commented 3 years ago

Looking at the browser wallet implementation example here, in the initialization process there are URLs to nodes and compiler being provided. Can someone please confirm, that those values are serving whatever purpose and are not being used by the superhero wallet ? (I don't have a node at my disposal right now and therefore can't check myself unfortunately, also I can't find info in the addon about the compiler URL).

marc0olo commented 3 years ago

isn't it possible to quickly check that by switching to a local network in the superhero wallet? or using some "nonsense" network in the superhero wallet which would result an error when trying to call a contract which e.g. is only deployed on testnet?

if still the provided config is being used (which hopefully shouldn't be the case) then this is definitely a problem.

otherwise we should revisit the initialization of the RpcAepp in the SDK. do we really need to pass an initial config for node (and compiler) there? if so, why?

sidenotes:

nikita-fuchs commented 3 years ago

Contrary to my prior observations, the SH wallet integration requires this information to be present as I could confirm today.

If the code is

this.Chain = await RpcAepp({
    name: 'AEPP',
    nodes: [
      {name: 'ae_mainnet', instance: await Node({url: this.MAINNET_URL})},
      {name: 'ae_uat', instance: await Node({url: this.TESTNET_URL})}
    ],

and you comment out the nodes and compilerUrl field and you initialize the web wallet you are greeted with the following error:

Error: Uncaught (in promise): Error: Node with name ae_mainnet not in pool

which shouldn't be an information provided client-side, but taken from the browser wallet.

marc0olo commented 3 years ago

this is an implementation specific question and discussion. please continue in https://github.com/aeternity/aepp-sdk-js/issues/1255

closing this here now. want to clean up the whole repository. lot's of issues that all refer to the same AEX proposals. very unclear and confusing for everybody.