Skip to content

Commit

Permalink
Merge pull request #46 from RemarkableTools/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
axenteoctavian authored Jul 31, 2023
2 parents 64c3060 + 1580bf0 commit 6cac560
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 14 deletions.
3 changes: 2 additions & 1 deletion src/Mx.NET.SDK.Core/Domain/Abi/AbiDefinition.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,10 @@ private TypeValue GetTypeValue(string rustType)
var innerTypeValue = GetTypeValue(innerType);
return TypeValue.ListValue(innerTypeValue);
}

if (array.IsMatch(rustType))
{
var innerType = list.Match(rustType).Groups[1].Value;
var innerType = array.Match(rustType).Groups[1].Value;
var innerTypeValue = GetTypeValue(innerType);
return TypeValue.ArrayValue(innerTypeValue);
}
Expand Down
5 changes: 2 additions & 3 deletions src/Mx.NET.SDK.Core/Domain/Values/ESDTIdentifierValue.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.Text;
using Mx.NET.SDK.Core.Domain.Constants;
using Mx.NET.SDK.Core.Domain.Helper;

namespace Mx.NET.SDK.Core.Domain.Values
Expand Down Expand Up @@ -33,7 +32,8 @@ public static ESDTIdentifierValue From(string data)
return new ESDTIdentifierValue(bytes, TypeValue.TokenIdentifierValue);
}

public static bool operator ==(ESDTIdentifierValue value1, ESDTIdentifierValue value2) => value1.Value.Equals(value2.Value);
public static bool operator ==(ESDTIdentifierValue value1, ESDTIdentifierValue value2) => value1.Equals(value2);
public static bool operator !=(ESDTIdentifierValue value1, ESDTIdentifierValue value2) => !value1.Equals(value2);

public override bool Equals(object obj)
{
Expand All @@ -43,7 +43,6 @@ public override bool Equals(object obj)
return Value.Equals(((ESDTIdentifierValue)obj).Value);
}

public static bool operator !=(ESDTIdentifierValue value1, ESDTIdentifierValue value2) => !value1.Value.Equals(value2.Value);

public bool IsEGLD()
{
Expand Down
9 changes: 1 addition & 8 deletions src/Mx.NET.SDK.Core/Domain/Values/EnumValue.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using Mx.NET.SDK.Core.Domain.Helper;
using System.Collections.Generic;
using System.Text;

namespace Mx.NET.SDK.Core.Domain.Values
{
Expand All @@ -25,12 +23,7 @@ public override T ToObject<T>()

public override string ToJson()
{
var dict = new Dictionary<string, object>
{
{ Variant.Name, Variant.Discriminant.ToJson() }
};

return JsonUnqtWrapper.Serialize(dict);
return JsonUnqtWrapper.Serialize(Variant.Discriminant.ToJson());
}
}
}
2 changes: 1 addition & 1 deletion src/Mx.NET.SDK.Core/Mx.NET.SDK.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<RepositoryUrl>https://github.com/RemarkableTools/Mx.NET.SDK/tree/main/src/Mx.NET.SDK.Core</RepositoryUrl>
<RepositoryType>GitHub</RepositoryType>
<Company>Remarkable Tools</Company>
<Version>2.0.0</Version>
<Version>2.0.1</Version>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Title>RemarkableTools.Mx.Core</Title>
<PackageReadmeFile>README.md</PackageReadmeFile>
Expand Down
2 changes: 1 addition & 1 deletion src/Mx.NET.SDK/Mx.NET.SDK.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<RepositoryUrl>https://github.com/RemarkableTools/Mx.NET.SDK</RepositoryUrl>
<RepositoryType>GitHub</RepositoryType>
<Company>Remarkable Tools</Company>
<Version>2.0.2</Version>
<Version>2.0.3</Version>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Title>RemarkableTools.Mx</Title>
<PackageReadmeFile>README.md</PackageReadmeFile>
Expand Down

0 comments on commit 6cac560

Please sign in to comment.