diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/utils.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/utils.js b/lib/utils.js index 8291d173..da95b5ad 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)); |
