@@ -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 }
0 commit comments