Commit be0beb4f authored by Jeremy Bokobza's avatar Jeremy Bokobza Committed by GitHub

Merge pull request #93 from dangershony/stratis-testnet

Remove the api version 
parents 6f2a97b7 76204b9f
......@@ -32,6 +32,7 @@
<select name="network" formControlName="selectNetwork">
<!--<option value="main">Main</option>-->
<option value="test">Testnet</option>
<option value="stratistest">StratisTest</option>
</select>
</div>
<div class="form-group">
......
......@@ -20,8 +20,8 @@ import { TransactionSending } from '../classes/transaction-sending';
export class ApiService {
constructor(private http: Http) {};
private mockApiUrl = 'http://localhost:3000/api/v1';
private webApiUrl = 'http://localhost:5000/api/v1';
private mockApiUrl = 'http://localhost:3000/api';
private webApiUrl = 'http://localhost:5000/api';
private headers = new Headers({'Content-Type': 'application/json'});
/**
......
......@@ -5,7 +5,7 @@ using Stratis.Bitcoin.Notifications;
namespace Breeze.Api.Controllers
{
[Route("api/v{version:apiVersion}/[controller]")]
[Route("api/[controller]")]
public class NodeController : Controller
{
private readonly BlockNotification blockNotification;
......
......@@ -56,30 +56,11 @@ namespace Breeze.Api
.AddJsonOptions(options => NBitcoin.JsonConverters.Serializer.RegisterFrontConverters(options.SerializerSettings))
.AddControllers(services);
services.AddApiVersioning(options =>
{
options.DefaultApiVersion = new ApiVersion(1, 0);
});
// Register the Swagger generator, defining one or more Swagger documents
services.AddSwaggerGen(setup =>
{
setup.SwaggerDoc("v1", new Info { Title = "Breeze.Api", Version = "v1" });
// FIXME: prepopulates the version in the URL of the Swagger UI found at http://localhost:5000/swagger
// temporary needed until Swashbuckle supports it out-of-the-box
setup.DocInclusionPredicate((version, apiDescription) =>
{
apiDescription.RelativePath = apiDescription.RelativePath.Replace("v{version}", version);
var versionParameter = apiDescription.ParameterDescriptions.SingleOrDefault(p => p.Name == "version");
if (versionParameter != null)
{
apiDescription.ParameterDescriptions.Remove(versionParameter);
}
return true;
});
//Set the comments path for the swagger json and ui.
var basePath = PlatformServices.Default.Application.ApplicationBasePath;
var apiXmlPath = Path.Combine(basePath, "Breeze.Api.xml");
......
......@@ -105,10 +105,7 @@ namespace Breeze.Wallet
public void ProcessBlock(Block block)
{
var hash = block.Header.GetHash();
var height = this.chain.GetBlock(hash).Height;
this.walletManager.ProcessBlock(height, block);
this.walletManager.ProcessBlock(block);
}
public void ProcessTransaction(Transaction transaction)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment