|
|
@ -16,8 +16,9 @@ export class Result { |
|
|
|
condition_fulfilled: boolean | null = null; |
|
|
|
condition_fulfilled: boolean | null = null; |
|
|
|
buy_msg: Message | null = null; |
|
|
|
buy_msg: Message | null = null; |
|
|
|
content_msg: Message | null = null; |
|
|
|
content_msg: Message | null = null; |
|
|
|
|
|
|
|
nft_info?: any; |
|
|
|
|
|
|
|
|
|
|
|
constructor(domain: string, buy_price?: number, auction_price?: number, owner?: string, collection_required: Collection | null = null, condition_fulfilled: boolean | null = null, buy_msg: Message | null = null, content_msg: Message | null = null) { |
|
|
|
constructor(domain: string, buy_price?: number, auction_price?: number, owner?: string, collection_required: Collection | null = null, condition_fulfilled: boolean | null = null, buy_msg: Message | null = null, content_msg: Message | null = null, nft_info?: any) { |
|
|
|
this.domain = domain; |
|
|
|
this.domain = domain; |
|
|
|
this.buy_price = buy_price; |
|
|
|
this.buy_price = buy_price; |
|
|
|
this.auction_price = auction_price; |
|
|
|
this.auction_price = auction_price; |
|
|
@ -26,6 +27,7 @@ export class Result { |
|
|
|
this.condition_fulfilled = condition_fulfilled; |
|
|
|
this.condition_fulfilled = condition_fulfilled; |
|
|
|
this.buy_msg = buy_msg; |
|
|
|
this.buy_msg = buy_msg; |
|
|
|
this.content_msg = content_msg; |
|
|
|
this.content_msg = content_msg; |
|
|
|
|
|
|
|
this.nft_info = nft_info; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static fromBackend(data: any): Result { |
|
|
|
static fromBackend(data: any): Result { |
|
|
@ -37,8 +39,9 @@ export class Result { |
|
|
|
let condition_fulfilled = data.condition_fulfilled; |
|
|
|
let condition_fulfilled = data.condition_fulfilled; |
|
|
|
let buy_msg = data.buy_msg; |
|
|
|
let buy_msg = data.buy_msg; |
|
|
|
let content_msg = data.content_msg; |
|
|
|
let content_msg = data.content_msg; |
|
|
|
|
|
|
|
let nft_info = data.nft_info; |
|
|
|
|
|
|
|
|
|
|
|
return new Result(domain, buy_price, auction_price, owner, collection_required, condition_fulfilled, buy_msg, content_msg); |
|
|
|
return new Result(domain, buy_price, auction_price, owner, collection_required, condition_fulfilled, buy_msg, content_msg, nft_info); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
getRouteParams(): any { |
|
|
|
getRouteParams(): any { |
|
|
@ -101,6 +104,10 @@ export async function get_domain_result(domain: string, address?: string) { |
|
|
|
return new Result(domain, 5, 3);*/ |
|
|
|
return new Result(domain, 5, 3);*/ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export async function get_records(address: string) { |
|
|
|
|
|
|
|
return await call_api('records/' + address); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
export async function get_zones() { |
|
|
|
export async function get_zones() { |
|
|
|
let zones_back = await call_api('zones'); |
|
|
|
let zones_back = await call_api('zones'); |
|
|
|
return zones_back.map((zone: any) => new Zone(zone.zone, zone.price_buy_1, zone.price_buy_2, zone.collection_required, zone.price_auction_1, zone.price_auction_2, zone.min_length, zone.length_1, zone.length_2, zone.address)); |
|
|
|
return zones_back.map((zone: any) => new Zone(zone.zone, zone.price_buy_1, zone.price_buy_2, zone.collection_required, zone.price_auction_1, zone.price_auction_2, zone.min_length, zone.length_1, zone.length_2, zone.address)); |
|
|
|