mirror of
https://github.com/Qortal/qortal.git
synced 2025-07-23 04:36:50 +00:00
API: assets & tidying
Cleaned up responses from /addresses/* endpoints in that some return text/plain instead of application/json. Removed need for class-local copy of ApiErrorFactory in AddressesResource - using getInstance() instead. Some work still needs to be done on annotating API errors. API error examples in API UI rendered incorrectly - swagger-ui issue? Removed repository-accessing code from api.models.* Added /assets/order/{orderId} for fetching info on specific asset order. NOTE: AssetRepository.getOrdersTrades() now returns trades where order is initiating or target. (Previously was initiating order only). qora.assets.Order.orphan() updated to reflect above change. block-explorer.html fixed to use new API output.
This commit is contained in:
@@ -88,7 +88,7 @@
|
||||
document.body.innerHTML = html;
|
||||
|
||||
XHR({
|
||||
url: "/transactions/address/" + address,
|
||||
url: "/transactions/search?address=" + address,
|
||||
onload: renderAddressTransactions,
|
||||
responseType: "json"
|
||||
});
|
||||
@@ -137,7 +137,7 @@
|
||||
}
|
||||
|
||||
function renderBlockInfo(e) {
|
||||
var blockData = e.target.response;
|
||||
var blockData = e.target.response.block;
|
||||
|
||||
// These properties are currently emitted as base64 by API but likely to be base58 in the future, so convert them
|
||||
var props = [ "signature", "reference", "transactionsSignature", "generatorPublicKey", "generatorSignature" ];
|
||||
@@ -196,7 +196,7 @@
|
||||
}
|
||||
|
||||
function listBlock(e) {
|
||||
var blockData = e.target.response;
|
||||
var blockData = e.target.response.block;
|
||||
|
||||
var ourHeight = blockData.height;
|
||||
var blockTimestamp = new Date(blockData.timestamp).toUTCString();
|
||||
|
Reference in New Issue
Block a user