WalletConnect/WalletConnectSharp

WalletConnectSignClient.Init throws error

NimaCharkhgard opened this issue · 2 comments

Hi, i wrote the sample code with my projectId, and it was ok. but today it throws this error:

Unterminated string. Expected delimiter: ". Path '['wc@2:core:0.3//WalletConnectSharpv2 Dapp Example-client-core-history-of-type-WalletConnectSharp.Sign.Models.Engine.Methods.SessionPropose-WalletConnectSharp.Sign.Models.Engine.Methods.SessionProposeResponse'].$values[10].request.params.requiredNamespaces.$type', line 1, position 32768.

the code is:

var dappOptions = new SignClientOptions()
{
    ProjectId = "973261011b08912c055ea93f398d0bbd",
    Metadata = new Metadata()
    {
        Description = "An example dapp to showcase WalletConnectSharpv2",
        Icons = new[] { "https://walletconnect.com/meta/favicon.ico" },
        Name = "WalletConnectSharpv2 Dapp Example",
        Url = "https://walletconnect.com"
    }
};
var dappClient = await WalletConnectSignClient.Init(dappOptions);

thank for your help

Hey @NimaCharkhgard,

Thanks for reporting the issue! Could you please share your storage JSON file?

I can't specify the exact location on your system, but the SDK constructs the storage path with this code: Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".wc", "store.json").

Thanks for your reply. I removed the json file and generated it again and now everything is working fine.