From 85a095fa7d4d31e1e84e5e096fa28c59f3cd1918 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Thu, 16 Jul 2020 22:52:56 +0530 Subject: manual withdrawal --- src/headless/helpers.ts | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/headless/helpers.ts') diff --git a/src/headless/helpers.ts b/src/headless/helpers.ts index 47a0844bd..aa6fa9751 100644 --- a/src/headless/helpers.ts +++ b/src/headless/helpers.ts @@ -26,7 +26,6 @@ import { Wallet } from "../wallet"; import { MemoryBackend, BridgeIDBFactory, shimIndexedDB } from "idb-bridge"; import { openTalerDatabase } from "../db"; import { HttpRequestLibrary } from "../util/http"; -import * as amounts from "../util/amounts"; import { Bank } from "./bank"; import fs from "fs"; import { NodeThreadCryptoWorkerFactory } from "../crypto/workers/nodeThreadWorker"; @@ -36,6 +35,7 @@ import { NodeHttpLib } from "./NodeHttpLib"; import { Logger } from "../util/logging"; import { SynchronousCryptoWorkerFactory } from "../crypto/workers/synchronousWorker"; import { WithdrawalSourceType } from "../types/dbTypes"; +import { Amounts } from "../util/amounts"; const logger = new Logger("helpers.ts"); @@ -142,11 +142,7 @@ export async function withdrawTestBalance( bankBaseUrl = "https://bank.test.taler.net/", exchangeBaseUrl = "https://exchange.test.taler.net/", ): Promise { - const reserveResponse = await myWallet.createReserve({ - amount: amounts.parseOrThrow(amount), - exchange: exchangeBaseUrl, - exchangeWire: "payto://unknown", - }); + const reserveResponse = await myWallet.acceptManualWithdrawal(exchangeBaseUrl, Amounts.parseOrThrow(amount)); const reservePub = reserveResponse.reservePub; @@ -176,6 +172,5 @@ export async function withdrawTestBalance( }); await bank.createReserve(bankUser, amount, reservePub, exchangePaytoUri); - await myWallet.confirmReserve({ reservePub: reserveResponse.reservePub }); await donePromise; } -- cgit v1.2.3