Merge pull request #3995 from mempool/mononaut/acceleration-viz
Acceleration visualization
This commit is contained in:
@@ -8,6 +8,8 @@ import { WebsocketResponse } from '../interfaces/websocket.interface';
|
||||
import { Outspend, Transaction } from '../interfaces/electrs.interface';
|
||||
import { Conversion } from './price.service';
|
||||
|
||||
const SERVICES_API_PREFIX = `/api/v1/services`;
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@@ -92,15 +94,11 @@ export class ApiService {
|
||||
return this.httpClient.get<Outspend[][]>(this.apiBaseUrl + this.apiBasePath + '/api/v1/outspends', { params });
|
||||
}
|
||||
|
||||
requestDonation$(amount: number, orderId: string): Observable<any> {
|
||||
const params = {
|
||||
amount: amount,
|
||||
orderId: orderId,
|
||||
};
|
||||
return this.httpClient.post<any>(this.apiBaseUrl + '/api/v1/donations', params);
|
||||
getAboutPageProfiles$(): Observable<any[]> {
|
||||
return this.httpClient.get<any[]>(this.apiBaseUrl + '/api/v1/about-page');
|
||||
}
|
||||
|
||||
getDonation$(): Observable<any[]> {
|
||||
getOgs$(): Observable<any> {
|
||||
return this.httpClient.get<any[]>(this.apiBaseUrl + '/api/v1/donations');
|
||||
}
|
||||
|
||||
@@ -112,10 +110,6 @@ export class ApiService {
|
||||
return this.httpClient.get<any[]>(this.apiBaseUrl + '/api/v1/contributors');
|
||||
}
|
||||
|
||||
checkDonation$(orderId: string): Observable<any[]> {
|
||||
return this.httpClient.get<any[]>(this.apiBaseUrl + '/api/v1/donations/check?order_id=' + orderId);
|
||||
}
|
||||
|
||||
getInitData$(): Observable<WebsocketResponse> {
|
||||
return this.httpClient.get<WebsocketResponse>(this.apiBaseUrl + this.apiBasePath + '/api/v1/init-data');
|
||||
}
|
||||
@@ -323,4 +317,13 @@ export class ApiService {
|
||||
(timestamp ? `?timestamp=${timestamp}` : '')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Services
|
||||
*/
|
||||
getNodeOwner$(publicKey: string) {
|
||||
let params = new HttpParams()
|
||||
.set('node_public_key', publicKey);
|
||||
return this.httpClient.get<any>(`${SERVICES_API_PREFIX}/lightning/claim/current`, { params, observe: 'response' });
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,6 +47,7 @@ export interface Env {
|
||||
TESTNET_BLOCK_AUDIT_START_HEIGHT: number;
|
||||
SIGNET_BLOCK_AUDIT_START_HEIGHT: number;
|
||||
HISTORICAL_PRICE: boolean;
|
||||
ACCELERATOR: boolean;
|
||||
}
|
||||
|
||||
const defaultEnv: Env = {
|
||||
@@ -77,6 +78,7 @@ const defaultEnv: Env = {
|
||||
'TESTNET_BLOCK_AUDIT_START_HEIGHT': 0,
|
||||
'SIGNET_BLOCK_AUDIT_START_HEIGHT': 0,
|
||||
'HISTORICAL_PRICE': true,
|
||||
'ACCELERATOR': false,
|
||||
};
|
||||
|
||||
@Injectable({
|
||||
|
||||
Reference in New Issue
Block a user