import { Injectable } from '@angular/core' ; import { Observable , of } from 'rxjs' ; export class ColdStakingInfo { constructor ( public hotWalletBalance , public coldWalletBalance , public hotWalletAmount , public coldWalletAmount ) { } } export class ColdStakingHistoryItem { constructor ( public status , public side , public amount , public dateTime , public wallet ) { } } export abstract class ColdStakingServiceBase { GetInfo ( walletName ) { return of ( ) ; } GetHistory ( walletName ) { return of ( ) ; } GetAddress ( walletName ) { return of ( ) ; } CreateColdstaking ( ... params ) { return of ( ) ; } } @ Injectable ( ) export class FakeColdStakingService implements ColdStakingServiceBase { GetInfo ( walletName ) { return of < ColdStakingInfo > ( new ColdStakingInfo ( 88025 , 91223 , 4000 , 28765 ) ) ; } GetHistory ( walletName ) { return of < ColdStakingHistoryItem [ ] > ( [ new ColdStakingHistoryItem ( 'warning' , 'hot' , '+1.0000000' , '26/11/2017 15:31' , 'Breeze2' ) , new ColdStakingHistoryItem ( 'success' , 'hot' , '+1.0000000' , '26/11/2017 15:31' , 'Breeze2' ) , new ColdStakingHistoryItem ( 'success' , 'cold' , '-1.0037993' , '26/11/2017 15:31' , 'Breeze2' ) ] ) ; } GetAddress ( walletName ) { return of ( 'ScCHt2Mug856o1E6gck6VFriXYnRYBD8NE' ) ; } CreateColdstaking ( ... params ) { return of ( true ) ; } }