Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 32 additions & 1 deletion Packages/BouncyCastle.Cryptography.dll.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Runtime/codebase/SolanaMobileStack/AuthorizationHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ public static AccountInfo PrimaryAccount(this AuthorizationResult authorization)
public static byte[] PrimaryAccountPublicKeyBytes(this AuthorizationResult authorization)
{
AccountInfo primary = authorization.PrimaryAccount();
if (string.IsNullOrEmpty(primary.Address))
throw new InvalidAuthorizationException("accounts[0].address is null or empty");
byte[] bytes;
try
{
Expand Down
2 changes: 2 additions & 0 deletions Runtime/codebase/SolanaMobileStack/DeauthorizeResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ namespace Solana.Unity.SolanaMobileStack
{
public abstract class DeauthorizeResult
{
private DeauthorizeResult() { }

public sealed class FullyRevoked : DeauthorizeResult { }

public sealed class LocalOnly : DeauthorizeResult
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@
[Preserve]
public interface IAdapterOperations
{
[Preserve]
[System.Obsolete("Use AuthorizeAsync with chain parameter instead")]
public Task<AuthorizationResult> Authorize(Uri identityUri, Uri iconUri, string identityName, string rpcCluster);
[Preserve]
[System.Obsolete("Use AuthorizeAsync with authToken parameter instead")]
public Task<AuthorizationResult> Reauthorize(Uri identityUri, Uri iconUri, string identityName, string authToken);
[Preserve]
public Task<AuthorizationResult> AuthorizeAsync(Uri identityUri, Uri iconUri, string identityName, string chain, string authToken, CancellationToken ct);
[Preserve]
Expand Down
6 changes: 5 additions & 1 deletion Runtime/codebase/SolanaMobileStack/JsonRpc20Client.cs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,11 @@ private static void ReceiverRaw(TaskCompletionSource<JToken> task, string messag
}
else
{
task.SetResult(envelope["result"]);
var resultToken = envelope["result"];
if (resultToken == null || resultToken.Type == JTokenType.Null)
task.SetException(new JsonRpcException(0, "JSON-RPC response has null result", null));
else
task.SetResult(resultToken);
}
}
catch (JsonException e)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,4 @@ public sealed class AuthorizationResult
public string WalletIcon { get; set; }

public SignInResult SignInResult { get; set; }

[System.Obsolete("Use AuthorizationHelpers.PrimaryAccountPublicKeyBytes() instead")]
public byte[] PublicKey => Accounts is { Count: > 0 }
? System.Convert.FromBase64String(Accounts[0].Address)
: null;

[System.Obsolete("Use AuthorizationHelpers.PrimaryAccount().Label instead")]
public string AccountLabel => Accounts is { Count: > 0 }
? Accounts[0].Label ?? string.Empty
: string.Empty;
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Runtime/codebase/SolanaMobileStack/JsonRpcErrorCodes.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 0 additions & 14 deletions Runtime/codebase/SolanaMobileStack/MobileWalletAdapterClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,20 +44,6 @@ public MobileWalletAdapterClient(IMessageSender messageSender, LogVerbosity verb
_verbosity = verbosity;
}

[System.Obsolete("Use AuthorizeAsync with chain parameter instead")]
[Preserve]
public Task<AuthorizationResult> Authorize(Uri identityUri, Uri iconUri, string identityName, string cluster)
{
return AuthorizeAsync(identityUri, iconUri, identityName, cluster, null, CancellationToken.None);
}

[System.Obsolete("Use AuthorizeAsync with authToken parameter instead")]
[Preserve]
public Task<AuthorizationResult> Reauthorize(Uri identityUri, Uri iconUri, string identityName, string authToken)
{
return AuthorizeAsync(identityUri, iconUri, identityName, null, authToken, CancellationToken.None);
}

[Preserve]
public Task<AuthorizationResult> AuthorizeAsync(
Uri identityUri,
Expand Down
2 changes: 2 additions & 0 deletions Runtime/codebase/SolanaMobileStack/ReconnectResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ namespace Solana.Unity.SolanaMobileStack
{
public abstract class ReconnectResult
{
private ReconnectResult() { }

public sealed class SilentSuccess : ReconnectResult
{
public Account Account { get; set; }
Expand Down
2 changes: 2 additions & 0 deletions Runtime/codebase/SolanaMobileStack/RpcMethodNames.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 10 additions & 1 deletion Runtime/codebase/SolanaMobileStack/SignInPayload.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 10 additions & 1 deletion Runtime/codebase/SolanaMobileStack/SignInResult.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading