Hathor.Faucet.Services/HathorService.cs
/// <summary>
/// Get amount faucet will pay based on current funds in faucet
/// </summary>
/// <returns></returns>
Get amount faucet will pay based on current funds in faucet
Get amount faucet will pay based on current funds in faucet
public async Task<int> GetCurrentPayoutAsync()
        {
            var funds = await GetCurrentFundsAsync();
            if (funds == null)
                return 0;
            int del = 1000;
            if (faucetConfig.Network == Models.HathorNetwork.Testnet)
                del = 20;
            if (funds > 150)
                return Math.Min(funds.Value / del, faucetConfig.MaxPayoutCents);
            else if (funds > 0)
                return Math.Min(1, faucetConfig.MaxPayoutCents);
            else
                return 0;
        }
public async Task < int > GetCurrentPayoutAsync ( ) { var funds = await GetCurrentFundsAsync ( ) ; if ( funds == null ) return 0 ; int del = 1000 ; if ( faucetConfig . Network == Models . HathorNetwork . Testnet ) del = 20 ; if ( funds > 150 ) return Math . Min ( funds . Value / del , faucetConfig . MaxPayoutCents ) ; else if ( funds > 0 ) return Math . Min ( 1 , faucetConfig . MaxPayoutCents ) ; else return 0 ; }
Get amount faucet will pay based on current funds in faucet
Get amount faucet will pay based on current funds in faucet
None