Skip to content

Commit

Permalink
🐛 Fix Solana.Unity.Tool command line
Browse files Browse the repository at this point in the history
  • Loading branch information
GabrielePicco committed May 6, 2024
1 parent ffa2b9f commit 4eea962
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 11 deletions.
6 changes: 3 additions & 3 deletions Solana.Unity.Anchor.Examples/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Solnet.Rpc;
using Solnet.Wallet;
using Solana.Unity.Rpc;
using Solana.Unity.Wallet;

using SequenceEnforcer;
using Jet;
using Solnet.Wallet.Bip39;
using Solana.Unity.Wallet.Bip39;
using SwitchboardV2;

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Solnet.Rpc" Version="6.0.3" />
<PackageReference Include="Solnet.Wallet" Version="6.0.3" />
<PackageReference Include="Solnet.Programs" Version="6.0.3" />
<PackageReference Include="Solana.Unity.Rpc" Version="2.6.1.3" />
<PackageReference Include="Solana.Unity.Wallet" Version="2.6.1.3" />
<PackageReference Include="Solana.Unity.Programs" Version="2.6.1.3" />
</ItemGroup>


Expand Down
6 changes: 1 addition & 5 deletions Solana.Unity.Anchor.Tool/AnchorSourceGenerator.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
using CommandLine;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.Text;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Solana.Unity.Anchor;
using Solana.Unity.Rpc;
using System.IO;
using Solana.Unity.Anchor.Models;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;

public class AnchorSourceGenerator
Expand Down Expand Up @@ -54,6 +49,7 @@ static int Main(string[] args)
foreach (JToken account in (JArray)val)
{
JToken accountType = account["type"];
if(accountType == null) continue;
foreach (JObject fields in (JArray)accountType["fields"])
{
if (fields["type"] != null && fields["type"].Type.ToString() == "Object" && fields["type"]["defined"] != null && fields["type"]["defined"].ToString() == "UnixTimestamp")
Expand Down

0 comments on commit 4eea962

Please sign in to comment.