From 3444c9e610d34c3ab3994b2a922a04268bcd2bc1 Mon Sep 17 00:00:00 2001 From: dtsigelnitskiy Date: Fri, 8 Nov 2019 17:26:36 +0300 Subject: [PATCH] DEXW-2316: fix fetch asset from node --- data-service/api/assets/assets.ts | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/data-service/api/assets/assets.ts b/data-service/api/assets/assets.ts index 9c049bf374..37a89001d6 100644 --- a/data-service/api/assets/assets.ts +++ b/data-service/api/assets/assets.ts @@ -69,7 +69,7 @@ export function getAssetFromNode(assetId: string): Promise { return Promise.resolve(wavesAsset); } - return request({ url: `${configGet('node')}/assets/details/${assetId}` }) + return request({ url: `${configGet('node')}/assets/details/${assetId}` }) .then((data) => new Asset({ id: data.assetId, name: data.name, @@ -77,9 +77,9 @@ export function getAssetFromNode(assetId: string): Promise { height: data.issueHeight, precision: data.decimals, quantity: data.quantity, - hasScript: !!data.script, + hasScript: data.scripted, reissuable: data.reissuable, - minSponsoredFee: data.minSponsoredFee, + minSponsoredFee: data.minSponsoredAssetFee, sender: data.issuer, timestamp: new Date(data.issueTimestamp) })); @@ -265,3 +265,17 @@ export interface INodeAssetData { reissuable: boolean; script: string | null; } + +export interface INodeAssetInfo { + assetId: string; + issueHeight: number; + issueTimestamp: number; + issuer: string; + name: string; + description: string; + decimals: number; + reissuable: boolean; + quantity: number; + scripted: boolean; + minSponsoredAssetFee: number | string; +}