aboutsummaryrefslogtreecommitdiffstats
path: root/lib/utils.js
diff options
context:
space:
mode:
authorJohn Barratt <[email protected]>2023-02-28 13:55:59 -0800
committerJohn Barratt <[email protected]>2023-02-28 13:55:59 -0800
commite47d50a443f0a396321716a506e1df325dd4a1fb (patch)
tree1c010c5970e9cbfbf8671e6f00a97d6518446fdd /lib/utils.js
parent58e996a4ac227162f171e84530fe898cb504e045 (diff)
parente4702b4d13e4d966d735c2ba4657e10d7c436a57 (diff)
downloadcoinos-server-e47d50a443f0a396321716a506e1df325dd4a1fb.tar.gz
coinos-server-e47d50a443f0a396321716a506e1df325dd4a1fb.zip
Merge branch 'master' of https://github.com/coinos/coinos-server into notifications
Diffstat (limited to 'lib/utils.js')
-rw-r--r--lib/utils.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/utils.js b/lib/utils.js
index 8c3852e8..45353e8e 100644
--- a/lib/utils.js
+++ b/lib/utils.js
@@ -22,6 +22,8 @@ export const fail = msg => {
throw new Error(msg);
};
+export const bail = (res, msg) => res.code(500).send(msg);
+
export const SATS = 100000000;
export const sats = n => Math.round(n * SATS);
export const btc = n => parseFloat((n / SATS).toFixed(8));