From 06869053c221994c96dcdf13d548f2c72fb435e1 Mon Sep 17 00:00:00 2001 From: Jake Date: Sat, 14 Jul 2018 22:26:44 +1000 Subject: [PATCH] Make `ApiClient` injectable --- src/client/http.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/client/http.js b/src/client/http.js index 5244492..5dc73e2 100644 --- a/src/client/http.js +++ b/src/client/http.js @@ -32,8 +32,8 @@ function byteArrayToLong(/*byte[]*/byteArray) { class ApiClient { - constructor() { - this.apiUrl = process.env.API_URL; + constructor(apiUrl) { + this.apiUrl = apiUrl || process.env.API_URL; this.signer = null; }