Deprecate pool_unique_id
This commit is contained in:
parent
02eb633d89
commit
0719b20110
@ -31,10 +31,7 @@ export interface AccelerationHistory {
|
|||||||
feeDelta: number,
|
feeDelta: number,
|
||||||
blockHash: string,
|
blockHash: string,
|
||||||
blockHeight: number,
|
blockHeight: number,
|
||||||
pools: {
|
pools: number[];
|
||||||
pool_unique_id: number,
|
|
||||||
username: string,
|
|
||||||
}[],
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class AccelerationApi {
|
class AccelerationApi {
|
||||||
|
@ -308,10 +308,10 @@ class AccelerationRepository {
|
|||||||
}
|
}
|
||||||
const accelerationSummaries = accelerations.map(acc => ({
|
const accelerationSummaries = accelerations.map(acc => ({
|
||||||
...acc,
|
...acc,
|
||||||
pools: acc.pools.map(pool => pool.pool_unique_id),
|
pools: acc.pools,
|
||||||
}))
|
}))
|
||||||
for (const acc of accelerations) {
|
for (const acc of accelerations) {
|
||||||
if (blockTxs[acc.txid] && acc.pools.some(pool => pool.pool_unique_id === block.extras.pool.id)) {
|
if (blockTxs[acc.txid] && acc.pools.some(pool => pool === block.extras.pool.id)) {
|
||||||
const tx = blockTxs[acc.txid];
|
const tx = blockTxs[acc.txid];
|
||||||
const accelerationInfo = accelerationCosts.getAccelerationInfo(tx, boostRate, transactions);
|
const accelerationInfo = accelerationCosts.getAccelerationInfo(tx, boostRate, transactions);
|
||||||
accelerationInfo.cost = Math.max(0, Math.min(acc.feeDelta, accelerationInfo.cost));
|
accelerationInfo.cost = Math.max(0, Math.min(acc.feeDelta, accelerationInfo.cost));
|
||||||
|
@ -313,7 +313,7 @@ export class BlockComponent implements OnInit, OnDestroy {
|
|||||||
|
|
||||||
const acceleratedInBlock = {};
|
const acceleratedInBlock = {};
|
||||||
for (const acc of accelerations) {
|
for (const acc of accelerations) {
|
||||||
if (acc.pools?.some(pool => pool === this.block?.extras?.pool.id || pool?.['pool_unique_id'] === this.block?.extras?.pool.id)) {
|
if (acc.pools?.some(pool => pool === this.block?.extras?.pool.id)) {
|
||||||
acceleratedInBlock[acc.txid] = acc;
|
acceleratedInBlock[acc.txid] = acc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -665,7 +665,7 @@ export class TrackerComponent implements OnInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
setIsAccelerated(initialState: boolean = false) {
|
setIsAccelerated(initialState: boolean = false) {
|
||||||
this.isAcceleration = (this.tx.acceleration || (this.accelerationInfo && this.pool && this.accelerationInfo.pools.some(pool => (pool === this.pool.id || pool?.['pool_unique_id'] === this.pool.id))));
|
this.isAcceleration = (this.tx.acceleration || (this.accelerationInfo && this.pool && this.accelerationInfo.pools.some(pool => (pool === this.pool.id))));
|
||||||
}
|
}
|
||||||
|
|
||||||
dismissAccelAlert(): void {
|
dismissAccelAlert(): void {
|
||||||
|
@ -726,7 +726,7 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
setIsAccelerated(initialState: boolean = false) {
|
setIsAccelerated(initialState: boolean = false) {
|
||||||
this.isAcceleration = (this.tx.acceleration || (this.accelerationInfo && this.pool && this.accelerationInfo.pools.some(pool => (pool === this.pool.id || pool?.['pool_unique_id'] === this.pool.id))));
|
this.isAcceleration = (this.tx.acceleration || (this.accelerationInfo && this.pool && this.accelerationInfo.pools.some(pool => (pool === this.pool.id))));
|
||||||
if (this.isAcceleration && initialState) {
|
if (this.isAcceleration && initialState) {
|
||||||
this.showAccelerationSummary = false;
|
this.showAccelerationSummary = false;
|
||||||
}
|
}
|
||||||
|
@ -9126,11 +9126,7 @@ export const restApiDocsData = [
|
|||||||
"blockHash": "00000000000000000000482f0746d62141694b9210a813b97eb8445780a32003",
|
"blockHash": "00000000000000000000482f0746d62141694b9210a813b97eb8445780a32003",
|
||||||
"blockHeight": 829559,
|
"blockHeight": 829559,
|
||||||
"bidBoost": 6102,
|
"bidBoost": 6102,
|
||||||
"pools": [
|
"pools": [111]
|
||||||
{
|
|
||||||
"pool_unique_id": 111
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
]`,
|
]`,
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user