-
Notifications
You must be signed in to change notification settings - Fork 245
Expand file tree
/
Copy pathWeb3AuthWebGLProvider.cs
More file actions
29 lines (24 loc) · 998 Bytes
/
Web3AuthWebGLProvider.cs
File metadata and controls
29 lines (24 loc) · 998 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
using System.Threading.Tasks;
using ChainSafe.Gaming.Evm;
using ChainSafe.Gaming.Web3;
using ChainSafe.Gaming.Web3.Core.Operations;
using ChainSafe.Gaming.Web3.Environment;
using ChainSafe.GamingSdk.Web3Auth;
/// <summary>
/// Connection provider for connecting via Web3Auth modal on WebGL.
/// </summary>
public class Web3AuthWebGLProvider : Web3AuthProvider
{
private readonly Web3AuthWalletConfig _config;
public Web3AuthWebGLProvider(Web3AuthWalletConfig config, Web3Environment environment, IChainConfig chainConfig, IOperationTracker operationTracker, IOperatingSystemMediator operatingSystemMediator)
: base(config, environment, chainConfig, operationTracker, operatingSystemMediator)
{
_config = config;
}
public override async Task<string> Connect()
{
string sessionId = await _config.SessionTask;
KeyStoreManagerUtils.savePreferenceData(KeyStoreManagerUtils.SESSION_ID, sessionId);
return await base.Connect();
}
}