Removing sponsors code.

Support new sponsor confirmation polling.
fixes #319
This commit is contained in:
softsimon
2021-02-07 02:20:07 +07:00
parent c733497e52
commit eb0c20dd92
14 changed files with 107 additions and 430 deletions

View File

@@ -77,6 +77,10 @@ export class ApiService {
return this.httpClient.get<any[]>(this.apiBaseUrl + this.apiBasePath + '/api/v1/donations');
}
checkDonation$(orderId: string): Observable<any[]> {
return this.httpClient.get<any[]>(this.apiBaseUrl + this.apiBasePath + '/api/v1/donations/check?order_id=' + orderId);
}
getInitData$(): Observable<WebsocketResponse> {
return this.httpClient.get<WebsocketResponse>(this.apiBaseUrl + this.apiBasePath + '/api/v1/init-data');
}

View File

@@ -64,7 +64,6 @@ export class StateService {
vbytesPerSecond$ = new ReplaySubject<number>(1);
lastDifficultyAdjustment$ = new ReplaySubject<number>(1);
gitCommit$ = new ReplaySubject<string>(1);
donationConfirmed$ = new Subject();
loadingIndicators$ = new ReplaySubject<ILoadingIndicators>(1);
live2Chart$ = new Subject<OptimizedMempoolStats>();

View File

@@ -126,10 +126,6 @@ export class WebsocketService {
this.isTrackingTx = true;
}
trackDonation(id: string) {
this.websocketSubject.next({ 'track-donation': id });
}
stopTrackingTransaction() {
if (!this.isTrackingTx) {
return;
@@ -289,9 +285,5 @@ export class WebsocketService {
if (response['git-commit']) {
this.stateService.gitCommit$.next(response['git-commit']);
}
if (response.donationConfirmed) {
this.stateService.donationConfirmed$.next(true);
}
}
}