TxnLab / use-wallet

A framework agnostic wallet integration library for Algorand dApps
https://txnlab.gitbook.io/use-wallet
MIT License
81 stars 32 forks source link

Cannot connect to Kibisis #284

Open AChaffangeon opened 2 days ago

AChaffangeon commented 2 days ago

Hello,

I have a project where I use Kibisis with use-wallet. However, when I try to connect to Kibisis, I get the following error

{
    "message": "no parameters supplied",
    "providerId": "f6d1c86b-4493-42fb-b88d-a62407b4cdf6",
    "code": 4004,
    "name": "NetworkNotSupportedError",
    "data": {
        "genesisHashes": [
            "IXnoWtviVVJW5LGivNFc0Dq14V3kqaXuK2u5OQrdVZo="
        ]
    }
}

We are declaring our WalletManager as follows:

new WalletManager({
            wallets: [
               {
                   id: WalletId.WALLETCONNECT,
                   options: {projectId: import.meta.env.VITE_WC_PROJECT_ID}
               },
               WalletId.KIBISIS],
            network: "testnet",
            algod: {
                token: '',
                baseServer: 'https://testnet-api.algonode.cloud',
                port: 443
            }
        })

Do we need to supply some parameters when we connect to the wallet now?

Dependencies :

"@txnlab/use-wallet": "^3.7.1",
"@agoralabs-sh/avm-web-provider": "^1.7.0",
Andrewleach1 commented 2 days ago

Hello,

I have a project where I use Kibisis with use-wallet. However, when I try to connect to Kibisis, I get the following error

{
    "message": "no parameters supplied",
    "providerId": "f6d1c86b-4493-42fb-b88d-a62407b4cdf6",
    "code": 4004,
    "name": "NetworkNotSupportedError",
    "data": {
        "genesisHashes": [
            "IXnoWtviVVJW5LGivNFc0Dq14V3kqaXuK2u5OQrdVZo="
        ]
    }
}

We are declaring our WalletManager as follows:

new WalletManager({
            wallets: [
               {
                   id: WalletId.WALLETCONNECT,
                   options: {projectId: import.meta.env.VITE_WC_PROJECT_ID}
               },
               WalletId.KIBISIS],
            network: "testnet",
            algod: {
                token: '',
                baseServer: 'https://testnet-api.algonode.cloud',
                port: 443
            }
        })

Do we need to supply some parameters when we connect to the wallet now?

Dependencies :

"@txnlab/use-wallet": "^3.7.1",
"@agoralabs-sh/avm-web-provider": "^1.7.0",

Has your issue been escalated by a support member already?

drichar commented 2 days ago

@AChaffangeon in the settings for Kibisis, you need to enable TestNet:

image

This can be found in Settings > Advanced

drichar commented 2 days ago

@kieranroneill any thoughts re: making TestNet/BetaNet enabled by default or just removing it as a setting altogether? If not, at least the error message should probably be a bit more helpful.

drichar commented 1 day ago

@kieranroneill any thoughts re: making TestNet/BetaNet enabled by default or just removing it as a setting altogether? If not, at least the error message should probably be a bit more helpful.

Are there any other situations that would result in this error? Or can I safely add a condition in the Kibisis provider that checks for the "no parameters supplied" error and instructs the user to toggle on this setting?

kieranroneill commented 1 day ago

I can add a more meaningful error message coming back from Kibisis. I want to abstract testnet/betanet away from user's as the average user will not really be using these networks.

I could use a new error message, something similar to a 405 HTTP status code "method is known by the server but is not supported". And then give an actually useful error message like " you need to go to Settings > Advanced and turn on Testnet".

AChaffangeon commented 22 hours ago

Indeed I add not activated TestNet, thanks !