fungible-systems / micro-stacks

Tiny libraries for building the next generation of Stacks apps.
https://micro-stacks.dev
MIT License
82 stars 15 forks source link

Open contract call and web wallet not aligned on network #156

Closed radicleart closed 1 year ago

radicleart commented 1 year ago

Versions: "micro-stacks": "^1.1.1", "@micro-stacks/svelte": "^1.0.3",

Configure the network to be 'testnet' with the hiro web wallet connected to mainnet.

    const config = {
      appName: 'Ecosystem DAO',
      appIconUrl: origin + '/img/logo.png',
      network: 'testnet'
    };
    mountClient(config)

On openContractCall, the wallet opens connected to 'testnet' but looks up the contract on mainnet leading to screen shot;

Screenshot 2022-08-24 at 15 01 54

If I repeat but change the network in the web wallet I get the correct behaviour - i.e. the web wallet looks up the contract on correct network.

The contract is deployed here https://explorer.stacks.co/txid/1f5c4ce7187fa1949be5911aa5dfc2c0b7d4c9a012f75307820c075c9a3b351e?chain=testnet

radicleart commented 1 year ago

NB also tried to set the network after calling mountClient(config) like this

    const network = getNetwork();
    $network.setNetwork('testnet');

but have same issue.

aulneau commented 1 year ago

This sounds more like a bug in the wallet than in micro-stacks, cc @kyranjamie

aulneau commented 1 year ago

@radicleart can you please include a reproduction?

kyranjamie commented 1 year ago

Sorry I missed this notification, just saw it now. If this is definitely a wallet but can you open an issue and include a demo of it not working?

radicleart commented 1 year ago

@kyranjamie - have opened issue on wallet with steps to reproduce. See https://github.com/hirosystems/stacks-wallet-web/issues/2645