11import { Injectable } from '@angular/core' ;
2- import { AuthResponse , BalanceResponse , ContractDto , CurrentTickResponse , MarketInformation , NetworkBalance , PeerDto , ProposalCreateRequest , ProposalCreateResponse , ProposalDto , QubicAsset , SmartContract , SubmitTransactionRequest , SubmitTransactionResponse , Transaction } from './api.model' ;
2+ import { AuthResponse , BalanceResponse , ContractDto , CurrentTickResponse , MarketInformation , NetworkBalance , PeerDto , QubicAsset , SmartContract , SubmitTransactionRequest , SubmitTransactionResponse , Transaction } from './api.model' ;
33import {
44 HttpClient , HttpHeaders , HttpParams ,
55 HttpResponse , HttpEvent , HttpParameterCodec , HttpContext
@@ -17,7 +17,6 @@ import { WalletService } from './wallet.service';
1717} )
1818export class ApiService {
1919
20- public currentProposals : BehaviorSubject < ProposalDto [ ] > = new BehaviorSubject < ProposalDto [ ] > ( [ ] ) ;
2120 public currentIpoContracts : BehaviorSubject < ContractDto [ ] > = new BehaviorSubject < ContractDto [ ] > ( [ ] ) ;
2221 public currentPeerList : BehaviorSubject < PeerDto [ ] > = new BehaviorSubject < PeerDto [ ] > ( [ ] ) ;
2322 public currentProtocol : BehaviorSubject < number > = new BehaviorSubject < number > ( 0 ) ;
@@ -175,22 +174,6 @@ export class ApiService {
175174 } ) ) ;
176175 }
177176
178- public getProposals ( ) {
179- let localVarPath = `/Voting/Proposal` ;
180- return this . httpClient . request < ProposalDto [ ] > ( 'get' , `${ this . basePath } ${ localVarPath } ` ,
181- {
182- context : new HttpContext ( ) ,
183- headers : {
184- "Content-Type" : "application/json"
185- } ,
186- responseType : 'json'
187- }
188- ) . pipe ( map ( ( p ) => {
189- this . currentProposals . next ( p ) ;
190- return p ;
191- } ) ) ;
192- }
193-
194177 public getIpoContracts ( ) {
195178 let localVarPath = `/Wallet/IpoContracts` ;
196179 return this . httpClient . request < ContractDto [ ] > ( 'get' , `${ this . basePath } ${ localVarPath } ` ,
@@ -207,33 +190,6 @@ export class ApiService {
207190 } ) ) ;
208191 }
209192
210- public submitProposalCreateRequest ( proposal : ProposalCreateRequest ) {
211- let localVarPath = `/Voting/Proposal` ;
212- return this . httpClient . request < ProposalCreateResponse > ( 'post' , `${ this . basePath } ${ localVarPath } ` ,
213- {
214- context : new HttpContext ( ) ,
215- headers : {
216- "Content-Type" : "application/json"
217- } ,
218- body : proposal ,
219- responseType : 'json'
220- }
221- ) ;
222- }
223-
224- public submitProposalPublished ( proposalId : string ) {
225- let localVarPath = `/Voting/Proposal/` + proposalId + "/publish" ;
226- return this . httpClient . request < ProposalCreateResponse > ( 'post' , `${ this . basePath } ${ localVarPath } ` ,
227- {
228- context : new HttpContext ( ) ,
229- headers : {
230- "Content-Type" : "application/json"
231- } ,
232- responseType : 'json'
233- }
234- ) ;
235- }
236-
237193 public getPeerList ( ) {
238194 let localVarPath = `/Public/Peers` ;
239195 return this . httpClient . request < PeerDto [ ] > ( 'get' , `${ this . basePath } ${ localVarPath } ` ,
0 commit comments