diff options
author | Florian Dold <florian@dold.me> | 2021-10-07 12:01:40 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2021-10-07 12:01:40 +0200 |
commit | e2fe2d6db16b422ee6d69ef03f1393e1f0f42749 (patch) | |
tree | 7016f657b08b284afd62a55752baeab69d7be946 /packages/taler-wallet-core/src/headless | |
parent | 2c3456608e8e87a86a5b2f62301b4ea78a2cb00d (diff) | |
download | wallet-core-e2fe2d6db16b422ee6d69ef03f1393e1f0f42749.tar.xz |
add anastasis skeleton, put crypto in taler-util
Diffstat (limited to 'packages/taler-wallet-core/src/headless')
-rw-r--r-- | packages/taler-wallet-core/src/headless/NodeHttpLib.ts | 5 | ||||
-rw-r--r-- | packages/taler-wallet-core/src/headless/helpers.ts | 2 |
2 files changed, 3 insertions, 4 deletions
diff --git a/packages/taler-wallet-core/src/headless/NodeHttpLib.ts b/packages/taler-wallet-core/src/headless/NodeHttpLib.ts index 9655d363f..5a90994b1 100644 --- a/packages/taler-wallet-core/src/headless/NodeHttpLib.ts +++ b/packages/taler-wallet-core/src/headless/NodeHttpLib.ts @@ -28,8 +28,7 @@ import { import { RequestThrottler } from "../util/RequestThrottler.js"; import Axios, { AxiosResponse } from "axios"; import { OperationFailedError, makeErrorDetails } from "../errors.js"; -import { Logger } from "@gnu-taler/taler-util"; -import { bytesToString } from "../crypto/talerCrypto.js"; +import { Logger, bytesToString } from "@gnu-taler/taler-util"; import { TalerErrorCode, URL } from "@gnu-taler/taler-util"; const logger = new Logger("NodeHttpLib.ts"); @@ -83,7 +82,7 @@ export class NodeHttpLib implements HttpRequestLibrary { timeout, maxRedirects: 0, }); - } catch (e) { + } catch (e: any) { throw OperationFailedError.fromCode( TalerErrorCode.WALLET_NETWORK_ERROR, `${e.message}`, diff --git a/packages/taler-wallet-core/src/headless/helpers.ts b/packages/taler-wallet-core/src/headless/helpers.ts index 1867fab67..f2285e149 100644 --- a/packages/taler-wallet-core/src/headless/helpers.ts +++ b/packages/taler-wallet-core/src/headless/helpers.ts @@ -92,7 +92,7 @@ export async function getDefaultNodeWallet( }); const dbContent = JSON.parse(dbContentStr); myBackend.importDump(dbContent); - } catch (e) { + } catch (e: any) { const code: string = e.code; if (code === "ENOENT") { logger.trace("wallet file doesn't exist yet"); |