diff options
author | Florian Dold <florian.dold@gmail.com> | 2020-07-16 22:52:56 +0530 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2020-07-16 22:52:56 +0530 |
commit | 85a095fa7d4d31e1e84e5e096fa28c59f3cd1918 (patch) | |
tree | bfad4a87f540c0ae1480fd2ab80911045f7f912e /src/headless/helpers.ts | |
parent | dd3a31f33dc54b475b204e15d8d0a5c5e2a70ee8 (diff) |
manual withdrawal
Diffstat (limited to 'src/headless/helpers.ts')
-rw-r--r-- | src/headless/helpers.ts | 9 |
1 files changed, 2 insertions, 7 deletions
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<void> { - 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; } |