-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25 from reown-com/fix/metamask-chain-switch
fix: chain switching not working in mobile MM
- Loading branch information
Showing
9 changed files
with
195 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
using System; | ||
using Newtonsoft.Json; | ||
|
||
namespace Reown.Sign.Nethereum.Model | ||
{ | ||
[Serializable] | ||
public class MetaMaskError | ||
{ | ||
[JsonProperty("code")] | ||
public int Code { get; set; } | ||
|
||
[JsonProperty("message")] | ||
public string Message { get; set; } | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
29 changes: 29 additions & 0 deletions
29
test/Reown.Core.Common.Test/HexByteConvertorExtensionsTests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
using System.Numerics; | ||
using Reown.Core.Common.Utils; | ||
using Xunit; | ||
|
||
namespace Reown.Core.Common.Test; | ||
|
||
public class HexByteConvertorExtensionsTests | ||
{ | ||
[Theory] | ||
[InlineData(137, true, "0x89")] | ||
[InlineData(16, true, "0x10")] | ||
[InlineData(256, true, "0x100")] | ||
[InlineData(0, true, "0x0")] | ||
[InlineData(1, true, "0x1")] | ||
[InlineData(4096, true, "0x1000")] | ||
[InlineData(37714555429, true, "0x8c7f67225")] | ||
[InlineData(137, false, "89")] | ||
[InlineData(16, false, "10")] | ||
[InlineData(256, false, "100")] | ||
[InlineData(0, false, "0")] | ||
[InlineData(1, false, "1")] | ||
[InlineData(4096, false, "1000")] | ||
[InlineData(37714555429, false, "8c7f67225")] | ||
public void ToHex_Values_ReturnsExpectedHex(BigInteger value, bool prefix, string expected) | ||
{ | ||
var result = value.ToHex(prefix); | ||
Assert.Equal(expected, result); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
|
||
<IsPackable>false</IsPackable> | ||
<IsTestProject>true</IsTestProject> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.NET.Test.Sdk"/> | ||
<PackageReference Include="xunit"/> | ||
<PackageReference Include="xunit.runner.visualstudio"> | ||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | ||
<PrivateAssets>all</PrivateAssets> | ||
</PackageReference> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\..\src\Reown.Core.Common\Reown.Core.Common.csproj" /> | ||
</ItemGroup> | ||
</Project> |