Skip to content

Commit 85e62e4

Browse files
committed
Lint Fixes
1 parent 6644f16 commit 85e62e4

File tree

3 files changed

+16
-14
lines changed

3 files changed

+16
-14
lines changed

src/ChainSafe.Gaming.Lootboxes.Chainlink/LootboxService.cs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ public LootboxService(LootboxServiceConfig config, IContractBuilder contractBuil
3838
this.contractBuilder = contractBuilder;
3939
}
4040

41-
public LootboxService(LootboxServiceConfig config, IContractBuilder contractBuilder, IRpcProvider rpcProvider,
42-
ISigner signer) : this(config, contractBuilder, rpcProvider)
41+
public LootboxService(LootboxServiceConfig config, IContractBuilder contractBuilder, IRpcProvider rpcProvider, ISigner signer)
42+
: this(config, contractBuilder, rpcProvider)
4343
{
4444
this.signer = signer;
4545
}
@@ -120,7 +120,8 @@ public async Task<BigInteger> CalculateOpenPrice(uint lootboxType, uint lootboxC
120120
var rawGasPrice = (await this.rpcProvider.GetGasPrice()).AssertNotNull("gasPrice").Value;
121121
var safeGasPrice = (rawGasPrice * 2) + BigInteger.Divide(rawGasPrice, new BigInteger(2)); // 300%
122122

123-
var response = await this.contract.Call("calculateOpenPrice",
123+
var response = await this.contract.Call(
124+
"calculateOpenPrice",
124125
new object[] { 50000 + (GasPerUnit * rewardCount), safeGasPrice, rewardCount, });
125126
var openPrice = (BigInteger)response[0];
126127

@@ -141,7 +142,8 @@ public async Task<uint> OpeningLootboxType()
141142

142143
// This response is actually very different from all the others since it returns several components
143144
var response =
144-
(List<ParameterOutput>)(await this.contract.Call("getOpenerRequestDetails",
145+
(List<ParameterOutput>)(await this.contract.Call(
146+
"getOpenerRequestDetails",
145147
new object[] { playerAddress }))[0];
146148
var address = (string)response[0].Result;
147149
var unitsToGet = (BigInteger)response[1].Result;
@@ -166,7 +168,8 @@ public async Task OpenLootbox(uint lootboxType, uint lootboxCount = 1)
166168
var rewardCount = lootboxType * lootboxCount;
167169
var openPrice = await this.CalculateOpenPrice(lootboxCount, lootboxCount);
168170

169-
await this.contract.Send("open",
171+
await this.contract.Send(
172+
"open",
170173
new object[] { 50000 + (GasPerUnit * rewardCount), new[] { lootboxType }, new[] { lootboxCount } },
171174
new TransactionRequest { Value = new HexBigInteger(openPrice) });
172175
}

src/ChainSafe.Gaming.Unity.MetaMask/MetaMaskProvider.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ public class MetaMaskProvider : WalletProvider
2525
/// <param name="environment">Injected <see cref="Web3Environment"/>.</param>
2626
/// <param name="chainConfig">Injected <see cref="IChainConfig"/>.</param>
2727
/// <param name="chainRegistryProvider">Injected <see cref="ChainRegistryProvider"/>.</param>
28-
public MetaMaskProvider(Web3Environment environment, IChainConfig chainConfig,
29-
ChainRegistryProvider chainRegistryProvider) : base(environment, chainConfig)
28+
public MetaMaskProvider(Web3Environment environment, IChainConfig chainConfig, ChainRegistryProvider chainRegistryProvider)
29+
: base(environment, chainConfig)
3030
{
3131
logWriter = environment.LogWriter;
3232
this.chainConfig = chainConfig;

src/ChainSafe.Gaming.WalletConnect/WalletConnectProvider.cs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ public class WalletConnectProvider : WalletProvider, ILifecycleParticipant, ICon
5454
private bool initialized;
5555
private ConnectionHandlerConfig connectionHandlerConfig;
5656

57-
public WalletConnectProvider(IWalletConnectConfig config, DataStorage storage, IChainConfig chainConfig,
58-
IWalletRegistry walletRegistry, RedirectionHandler redirection, Web3Environment environment) : base(
57+
public WalletConnectProvider(IWalletConnectConfig config, DataStorage storage, IChainConfig chainConfig, IWalletRegistry walletRegistry, RedirectionHandler redirection, Web3Environment environment)
58+
: base(
5959
environment, chainConfig)
6060
{
6161
this.redirection = redirection;
@@ -389,7 +389,8 @@ public override async Task<T> Request<T>(string method, params object[] paramete
389389

390390
var sessionTopic = session.Topic;
391391

392-
EventUtils.ListenOnce<PublishParams>(OnPublishedMessage,
392+
EventUtils.ListenOnce<PublishParams>(
393+
OnPublishedMessage,
393394
handler => core.Relayer.Publisher.OnPublishedMessage += handler,
394395
handler => core.Relayer.Publisher.OnPublishedMessage -= handler);
395396

@@ -468,8 +469,7 @@ private string GetFullAddress()
468469
return defaultNamespace.Accounts[0];
469470
}
470471

471-
private async Task<T> WalletConnectRequest<T>(string topic, string method, string chainId,
472-
params object[] parameters)
472+
private async Task<T> WalletConnectRequest<T>(string topic, string method, string chainId, params object[] parameters)
473473
{
474474
// Helper method to make a request using WalletConnectSignClient.
475475
async Task<T> MakeRequest<TRequest>()
@@ -500,8 +500,7 @@ async Task<T> MakeRequest<TRequest>()
500500
var url = $"https://rpc.walletconnect.com/v1?chainId={chain}&projectId={config.ProjectId}";
501501

502502
string body =
503-
JsonConvert.SerializeObject(new RpcRequestMessage(Guid.NewGuid().ToString(), method,
504-
parameters));
503+
JsonConvert.SerializeObject(new RpcRequestMessage(Guid.NewGuid().ToString(), method, parameters));
505504

506505
var rawResult = await httpClient.PostRaw(url, body, "application/json");
507506

0 commit comments

Comments
 (0)