mirror of
https://github.com/fsolla/teqo.git
synced 2026-11-26 21:53:06 +00:00
style: format OH7 files
This commit is contained in:
parent
8fd5838914
commit
c7a8dc7f64
3 changed files with 7 additions and 27 deletions
|
|
@ -93,15 +93,6 @@ const createEstimateOfflineExecutor = (): OfflineExecutor =>
|
|||
},
|
||||
})
|
||||
|
||||
/** Test/DI seam — reset module singletons between unit cases. */
|
||||
export const resetOpsEstimateOutboxForTests = (): void => {
|
||||
for (const key of [...opsEstimateOutboxCollection.keys()]) {
|
||||
opsEstimateOutboxCollection.delete(key)
|
||||
}
|
||||
executorSingleton = null
|
||||
initPromise = null
|
||||
}
|
||||
|
||||
export const getOpsEstimateOfflineExecutor = async (): Promise<OfflineExecutor> => {
|
||||
if (executorSingleton) {
|
||||
await executorSingleton.waitForInit()
|
||||
|
|
@ -131,15 +122,8 @@ export const enqueueEstimateVotes = async (input: EnqueueEstimateVotesInput): Pr
|
|||
variables.baseEstimatedAt !== undefined
|
||||
? variables.baseEstimatedAt
|
||||
: (mirrorRow?.estimatedAt ?? null)
|
||||
const next = toOpsEstimateOutboxRow(
|
||||
{ ...variables, baseEstimatedAt },
|
||||
'pending',
|
||||
)
|
||||
patchOpsVotePledgeEstimateOptimistic(
|
||||
next.pledgeId,
|
||||
next.estimatedVotes,
|
||||
next.estimateNote,
|
||||
)
|
||||
const next = toOpsEstimateOutboxRow({ ...variables, baseEstimatedAt }, 'pending')
|
||||
patchOpsVotePledgeEstimateOptimistic(next.pledgeId, next.estimatedVotes, next.estimateNote)
|
||||
if (opsEstimateOutboxCollection.has(next.pledgeId)) {
|
||||
opsEstimateOutboxCollection.update(next.pledgeId, (draft) => {
|
||||
draft.estimatedVotes = next.estimatedVotes
|
||||
|
|
|
|||
|
|
@ -8,6 +8,10 @@ import {
|
|||
type OpsMirrorPersistenceMode,
|
||||
type OpsMirrorStore,
|
||||
} from '@/components/campaign/opsSync/opsMirrorPersistence'
|
||||
import {
|
||||
mapVotePledgeWriteToOps,
|
||||
type VotePledgeEstimateWriteResult,
|
||||
} from '@/lib/campaignOps/mapVotePledgeWriteToOps'
|
||||
import {
|
||||
createEmptyOpsSnapshot,
|
||||
type OpsActivity,
|
||||
|
|
@ -22,10 +26,6 @@ import {
|
|||
type OpsStateDeputy,
|
||||
type OpsVotePledge,
|
||||
} from '@/lib/campaignOps/opsContract'
|
||||
import {
|
||||
mapVotePledgeWriteToOps,
|
||||
type VotePledgeEstimateWriteResult,
|
||||
} from '@/lib/campaignOps/mapVotePledgeWriteToOps'
|
||||
import { mergeOpsSnapshot } from '@/lib/campaignOps/opsMerge'
|
||||
import { OPS_MIRROR_SCHEMA_VERSION } from '@/lib/campaignOps/opsMirrorVersion'
|
||||
import type { OpsSyncState } from '@/lib/campaignOps/opsSyncMeta'
|
||||
|
|
|
|||
|
|
@ -106,11 +106,7 @@ export const PledgeEstimateForm = ({
|
|||
)
|
||||
}
|
||||
|
||||
return (
|
||||
<HybridPledgeEstimateForm
|
||||
pledgeID={pledgeID}
|
||||
/>
|
||||
)
|
||||
return <HybridPledgeEstimateForm pledgeID={pledgeID} />
|
||||
}
|
||||
|
||||
const LegacyPledgeEstimateForm = ({
|
||||
|
|
|
|||
Loading…
Reference in a new issue