From c405c6f1e37cc2895af4bbe56e41eb25de398943 Mon Sep 17 00:00:00 2001 From: Evan Feenstra Date: Thu, 17 Sep 2020 12:36:39 -0700 Subject: [PATCH] var validate = require('bitcoin-address-validation'); --- api/builtin/loop.ts | 2 +- dist/api/builtin/loop.js | 4 ++-- dist/api/builtin/loop.js.map | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/api/builtin/loop.ts b/api/builtin/loop.ts index f152624..c4e75fb 100644 --- a/api/builtin/loop.ts +++ b/api/builtin/loop.ts @@ -1,7 +1,7 @@ import * as Sphinx from 'sphinx-bot' import { finalAction } from '../controllers/actions' import fetch from 'node-fetch' -import validate from 'bitcoin-address-validation'; +var validate = require('bitcoin-address-validation'); const msg_types = Sphinx.MSG_TYPE let initted = false diff --git a/dist/api/builtin/loop.js b/dist/api/builtin/loop.js index e431f17..d36ede8 100644 --- a/dist/api/builtin/loop.js +++ b/dist/api/builtin/loop.js @@ -12,7 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); const Sphinx = require("sphinx-bot"); const actions_1 = require("../controllers/actions"); const node_fetch_1 = require("node-fetch"); -const bitcoin_address_validation_1 = require("bitcoin-address-validation"); +var validate = require('bitcoin-address-validation'); const msg_types = Sphinx.MSG_TYPE; let initted = false; const baseurl = 'https://localhost:8080'; @@ -30,7 +30,7 @@ function init() { return; if (arr.length === 3) { // loop const addy = arr[1]; - if (!bitcoin_address_validation_1.default(addy)) { + if (!validate(addy)) { const embed = new Sphinx.MessageEmbed() .setAuthor('LoopBot') .setDescription('Invalid BTC address'); diff --git a/dist/api/builtin/loop.js.map b/dist/api/builtin/loop.js.map index 00ef259..799a7ec 100644 --- a/dist/api/builtin/loop.js.map +++ b/dist/api/builtin/loop.js.map @@ -1 +1 @@ -{"version":3,"file":"loop.js","sourceRoot":"","sources":["../../../api/builtin/loop.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,qCAAoC;AACpC,oDAAoD;AACpD,2CAA8B;AAC9B,2EAAkD;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