diff options
Diffstat (limited to 'packages/taler-util/src/taleruri.ts')
-rw-r--r-- | packages/taler-util/src/taleruri.ts | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/packages/taler-util/src/taleruri.ts b/packages/taler-util/src/taleruri.ts index bd63fd103..cb0d74a12 100644 --- a/packages/taler-util/src/taleruri.ts +++ b/packages/taler-util/src/taleruri.ts @@ -168,66 +168,6 @@ export enum TalerUriAction { DevExperiment = "dev-experiment", } -/** - * Classify a taler:// URI. - * @deprecated use parseTalerUri - */ -export function classifyTalerUri(s: string): TalerUriType { - const sl = s.toLowerCase(); - if (sl.startsWith("taler://restore/")) { - return TalerUriType.TalerRecovery; - } - if (sl.startsWith("taler+http://restore/")) { - return TalerUriType.TalerRecovery; - } - if (sl.startsWith("taler://pay/")) { - return TalerUriType.TalerPay; - } - if (sl.startsWith("taler+http://pay/")) { - return TalerUriType.TalerPay; - } - if (sl.startsWith("taler://pay-template/")) { - return TalerUriType.TalerPayTemplate; - } - if (sl.startsWith("taler+http://pay-template/")) { - return TalerUriType.TalerPayTemplate; - } - if (sl.startsWith("taler://tip/")) { - return TalerUriType.TalerTip; - } - if (sl.startsWith("taler+http://tip/")) { - return TalerUriType.TalerTip; - } - if (sl.startsWith("taler://refund/")) { - return TalerUriType.TalerRefund; - } - if (sl.startsWith("taler+http://refund/")) { - return TalerUriType.TalerRefund; - } - if (sl.startsWith("taler://withdraw/")) { - return TalerUriType.TalerWithdraw; - } - if (sl.startsWith("taler+http://withdraw/")) { - return TalerUriType.TalerWithdraw; - } - if (sl.startsWith(`taler://${talerActionPayPush}/`)) { - return TalerUriType.TalerPayPush; - } - if (sl.startsWith(`taler+http://${talerActionPayPush}/`)) { - return TalerUriType.TalerPayPush; - } - if (sl.startsWith(`taler://${talerActionPayPull}/`)) { - return TalerUriType.TalerPayPull; - } - if (sl.startsWith(`taler+http://${talerActionPayPull}/`)) { - return TalerUriType.TalerPayPull; - } - if (sl.startsWith("taler://dev-experiment/")) { - return TalerUriType.TalerDevExperiment; - } - return TalerUriType.Unknown; -} - interface TalerUriProtoInfo { innerProto: "http" | "https"; rest: string; |