From e1369ff7e8fc02116b9c4261036f0e42e3423cf4 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Mon, 2 Dec 2019 00:42:40 +0100 Subject: the giant refactoring: split wallet into multiple parts --- src/headless/bank.ts | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'src/headless/bank.ts') diff --git a/src/headless/bank.ts b/src/headless/bank.ts index 36f61a71a..99d7e050b 100644 --- a/src/headless/bank.ts +++ b/src/headless/bank.ts @@ -25,7 +25,6 @@ */ import Axios from "axios"; import querystring = require("querystring"); -import URI = require("urijs"); export interface BankUser { username: string; @@ -50,9 +49,7 @@ export class Bank { amount, }; - const reqUrl = new URI("api/withdraw-headless-uri") - .absoluteTo(this.bankBaseUrl) - .href(); + const reqUrl = new URL("api/withdraw-headless-uri", this.bankBaseUrl).href; const resp = await Axios({ method: "post", @@ -82,9 +79,7 @@ export class Bank { reservePub: string, exchangePaytoUri: string, ) { - const reqUrl = new URI("api/withdraw-headless") - .absoluteTo(this.bankBaseUrl) - .href(); + const reqUrl = new URL("api/withdraw-headless", this.bankBaseUrl).href; const body = { auth: { type: "basic" }, @@ -111,7 +106,7 @@ export class Bank { } async registerRandomUser(): Promise { - const reqUrl = new URI("api/register").absoluteTo(this.bankBaseUrl).href(); + const reqUrl = new URL("api/register", this.bankBaseUrl).href; const randId = makeId(8); const bankUser: BankUser = { username: `testuser-${randId}`, -- cgit v1.2.3