WalletConnect / WalletConnectSharp

A C# implementation of the WalletConnect client
Apache License 2.0
139 stars 60 forks source link

WalletConnectSignClient.Init throws error #176

Closed NimaCharkhgard closed 4 months ago

NimaCharkhgard commented 4 months ago

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

skibitsky commented 4 months ago

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").

NimaCharkhgard commented 4 months ago

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