diff options
Diffstat (limited to 'packages/taler-wallet-core/src/operations/pay-peer-common.ts')
-rw-r--r-- | packages/taler-wallet-core/src/operations/pay-peer-common.ts | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/packages/taler-wallet-core/src/operations/pay-peer-common.ts b/packages/taler-wallet-core/src/operations/pay-peer-common.ts index 1bc2e8d49..4fdfecb4d 100644 --- a/packages/taler-wallet-core/src/operations/pay-peer-common.ts +++ b/packages/taler-wallet-core/src/operations/pay-peer-common.ts @@ -420,28 +420,6 @@ export const codecForExchangePurseStatus = (): Codec<ExchangePurseStatus> => .property("merge_timestamp", codecOptional(codecForTimestamp)) .build("ExchangePurseStatus"); -export function talerPaytoFromExchangeReserve( - exchangeBaseUrl: string, - reservePub: string, -): string { - const url = new URL(exchangeBaseUrl); - let proto: string; - if (url.protocol === "http:") { - proto = "taler-reserve-http"; - } else if (url.protocol === "https:") { - proto = "taler-reserve"; - } else { - throw Error(`unsupported exchange base URL protocol (${url.protocol})`); - } - - let path = url.pathname; - if (!path.endsWith("/")) { - path = path + "/"; - } - - return `payto://${proto}/${url.host}${url.pathname}${reservePub}`; -} - export async function getMergeReserveInfo( ws: InternalWalletState, req: { |