Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: change default project id #164

Merged
merged 1 commit into from
Dec 5, 2023
Merged
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
32 changes: 11 additions & 21 deletions Tests/WalletConnectSharp.Examples/BiDirectional.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

namespace WalletConnectSharp.Examples
{

public class BiDirectional : IExample
{
public string Name
Expand All @@ -16,15 +15,15 @@ public string Name

public async Task Execute(string[] args)
{
var home =
var home =
Environment.GetFolderPath(Environment.SpecialFolder.UserProfile);

var testAddress = "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045";

var dappFilePath = Path.Combine(home, ".wc", "store_dapp_example.json");
var dappOptions = new SignClientOptions()
{
ProjectId = "39f3dc0a2c604ec9885799f9fc5feb7c",
ProjectId = "ef21cf313a63dbf63f2e9e04f3614029",
Metadata = new Metadata()
{
Description = "An example dapp to showcase WalletConnectSharpv2",
Expand All @@ -34,31 +33,22 @@ public async Task Execute(string[] args)
},
Storage = new FileSystemStorage(dappFilePath)
};

var dappConnectOptions = new ConnectOptions()
{
RequiredNamespaces = new RequiredNamespaces()
{
{
"eip155", new ProposedNamespace()
"eip155",
new ProposedNamespace()
{
Methods = new[]
{
"eth_sendTransaction",
"eth_signTransaction",
"eth_sign",
"personal_sign",
"eth_sendTransaction", "eth_signTransaction", "eth_sign", "personal_sign",
"eth_signTypedData",
},
Chains = new[]
{
"eip155:1"
},
Events = new[]
{
"chainChanged",
"accountsChanged",
}
Chains = new[] { "eip155:1" },
Events = new[] { "chainChanged", "accountsChanged", }
}
}
}
Expand All @@ -70,7 +60,7 @@ public async Task Execute(string[] args)
var walletFilePath = Path.Combine(home, ".wc", "store_wallet_example.json");
var walletOptions = new SignClientOptions()
{
ProjectId = "39f3dc0a2c604ec9885799f9fc5feb7c",
ProjectId = "ef21cf313a63dbf63f2e9e04f3614029",
Metadata = new Metadata()
{
Description = "An example wallet to showcase WalletConnectSharpv2",
Expand Down
2 changes: 1 addition & 1 deletion Tests/WalletConnectSharp.Examples/SimpleExample.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public async Task Execute(string[] args)
{
var options = new SignClientOptions()
{
ProjectId = "39f3dc0a2c604ec9885799f9fc5feb7c",
ProjectId = "ef21cf313a63dbf63f2e9e04f3614029",
Metadata = new Metadata()
{
Description = "An example project to showcase WalletConnectSharpv2",
Expand Down
25 changes: 15 additions & 10 deletions Tests/WalletConnectSharp.Tests.Common/TestValues.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,38 @@ namespace WalletConnectSharp.Tests.Common
{
public static class TestValues
{
private const string DefaultProjectId = "39f3dc0a2c604ec9885799f9fc5feb7c";
private const string DefaultProjectId = "ef21cf313a63dbf63f2e9e04f3614029";
private static readonly string EnvironmentProjectId = Environment.GetEnvironmentVariable("PROJECT_ID");

public static readonly string TestProjectId = !string.IsNullOrWhiteSpace(EnvironmentProjectId)
? EnvironmentProjectId
: DefaultProjectId;

private const string DefaultRelayUrl = "wss://relay.walletconnect.com";

private static readonly string EnvironmentRelayUrl = Environment.GetEnvironmentVariable("RELAY_ENDPOINT");
public static readonly string TestRelayUrl = !string.IsNullOrWhiteSpace(EnvironmentRelayUrl) ? EnvironmentRelayUrl : DefaultRelayUrl;


public static readonly string TestRelayUrl =
!string.IsNullOrWhiteSpace(EnvironmentRelayUrl) ? EnvironmentRelayUrl : DefaultRelayUrl;

private static readonly string EnvironmentClientCount = Environment.GetEnvironmentVariable("CLIENTS");

public static readonly int ClientCount = !string.IsNullOrWhiteSpace(EnvironmentClientCount)
? int.Parse(EnvironmentClientCount)
: 200;

private static readonly string EnvironmentMessageCount = Environment.GetEnvironmentVariable("MESSAGES_PER_CLIENT");

private static readonly string EnvironmentMessageCount =
Environment.GetEnvironmentVariable("MESSAGES_PER_CLIENT");

public static readonly int MessagesPerClient = !string.IsNullOrWhiteSpace(EnvironmentMessageCount)
? int.Parse(EnvironmentMessageCount)
: 1000;

private static readonly string EnvironmentHeartbeatInterval = Environment.GetEnvironmentVariable("HEARTBEAT_INTERVAL");

private static readonly string EnvironmentHeartbeatInterval =
Environment.GetEnvironmentVariable("HEARTBEAT_INTERVAL");

public static readonly int HeartbeatInterval = !string.IsNullOrWhiteSpace(EnvironmentHeartbeatInterval)
? int.Parse(EnvironmentHeartbeatInterval)
: 3000;


}
}