From 981321e3722af3aba217aeddfba3843615085ec7 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Fri, 2 Sep 2022 23:32:30 -0700 Subject: es6 migration --- lib/rpc.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib/rpc.js') diff --git a/lib/rpc.js b/lib/rpc.js index 65db07a7..85f1c92b 100644 --- a/lib/rpc.js +++ b/lib/rpc.js @@ -1,6 +1,6 @@ import wretch from "./wretch.js"; -export default ({ host, port, wallet, user, password }) => +export default ({ host, port, wallet, username, password }) => new Proxy( {}, { @@ -9,7 +9,9 @@ export default ({ host, port, wallet, user, password }) => wretch() .url(`http://${host}:${port}/wallet/${wallet}`) .auth( - `Basic ${Buffer.from(`${user}:${password}`).toString("base64")}` + `Basic ${Buffer.from(`${username}:${password}`).toString( + "base64" + )}` ) .post({ method, -- cgit v1.2.3