Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ODIS V1 Sunset #10444

Merged
merged 20 commits into from
Aug 2, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions packages/phone-number-privacy/combiner/src/common/sign.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import {
DomainRestrictedSignatureRequest,
ErrorMessage,
ErrorType,
LegacySignMessageRequest,
OdisResponse,
responseHasExpectedKeyVersion,
SignMessageRequest,
Expand All @@ -18,8 +17,8 @@ import { IO } from './io'
// prettier-ignore
export type OdisSignatureRequest =
| SignMessageRequest
| LegacySignMessageRequest
| DomainRestrictedSignatureRequest

export type ThresholdStateService<R extends OdisSignatureRequest> = R extends SignMessageRequest
? PnpThresholdStateService<R>
: never | R extends DomainRestrictedSignatureRequest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import {
ErrorType,
getSignerEndpoint,
hasValidAccountParam,
identifierIsValidIfExists,
isBodyReasonablySized,
PnpQuotaRequest,
PnpQuotaRequestSchema,
Expand Down Expand Up @@ -60,7 +59,6 @@ export class PnpQuotaIO extends IO<PnpQuotaRequest> {
return (
super.validateClientRequest(request) &&
hasValidAccountParam(request.body) &&
identifierIsValidIfExists(request.body) &&
isBodyReasonablySized(request.body)
)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import {
ErrorMessage,
ErrorType,
LegacySignMessageRequest,
SignMessageRequest,
WarningMessage,
} from '@celo/phone-number-privacy-common'
Expand All @@ -12,7 +11,7 @@ import { PnpSignerResponseLogger } from '../../services/log-responses'
export class PnpSignAction extends SignAction<SignMessageRequest> {
readonly responseLogger: PnpSignerResponseLogger = new PnpSignerResponseLogger()

combine(session: CryptoSession<SignMessageRequest | LegacySignMessageRequest>): void {
combine(session: CryptoSession<SignMessageRequest>): void {
this.responseLogger.logResponseDiscrepancies(session)
this.responseLogger.logFailOpenResponses(session)

Expand Down Expand Up @@ -41,7 +40,7 @@ export class PnpSignAction extends SignAction<SignMessageRequest> {
this.handleMissingSignatures(session)
}

protected parseBlindedMessage(req: SignMessageRequest | LegacySignMessageRequest): string {
protected parseBlindedMessage(req: SignMessageRequest): string {
return req.blindedQueryPhoneNumber
}

Expand Down

This file was deleted.

18 changes: 0 additions & 18 deletions packages/phone-number-privacy/combiner/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import { PnpQuotaAction } from './pnp/endpoints/quota/action'
import { PnpQuotaIO } from './pnp/endpoints/quota/io'
import { PnpSignAction } from './pnp/endpoints/sign/action'
import { PnpSignIO } from './pnp/endpoints/sign/io'
import { LegacyPnpSignIO } from './pnp/endpoints/sign/io.legacy'
import { PnpThresholdStateService } from './pnp/services/threshold-state'

require('events').EventEmitter.defaultMaxListeners = 15
Expand Down Expand Up @@ -60,23 +59,6 @@ export function startCombiner(config: CombinerConfig, kit: ContractKit) {

const pnpThresholdStateService = new PnpThresholdStateService()

const legacyPnpSign = new Controller(
new PnpSignAction(
config.phoneNumberPrivacy,
pnpThresholdStateService,
new LegacyPnpSignIO(config.phoneNumberPrivacy, kit)
)
)
app.post(CombinerEndpoint.LEGACY_PNP_SIGN, (req, res) =>
meterResponse(
legacyPnpSign.handle.bind(legacyPnpSign),
req,
res,
CombinerEndpoint.LEGACY_PNP_SIGN,
config
)
)

const pnpQuota = new Controller(
new PnpQuotaAction(
config.phoneNumberPrivacy,
Expand Down
Loading
Loading