From 003c0b116e53e7e593bc4a20e824910ef590144d Mon Sep 17 00:00:00 2001 From: Davi Ortega Date: Mon, 2 Oct 2017 14:55:53 -0700 Subject: [PATCH] adding localStorage CryptoJS and others --- src/static/js/SimpleWalletFlorincoin.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/static/js/SimpleWalletFlorincoin.js b/src/static/js/SimpleWalletFlorincoin.js index 7f590cf..be19986 100644 --- a/src/static/js/SimpleWalletFlorincoin.js +++ b/src/static/js/SimpleWalletFlorincoin.js @@ -7,7 +7,23 @@ * * Created by Someguy123 (http://someguy123.com) * Modified by bitspill + * Modified by daviortega - server-side */ + +const jsdom = require("jsdom"); +const { JSDOM } = jsdom; +const { window } = new JSDOM(``); +const $ = require('jquery')(window); + +let Bitcoin = require ('./SimpleDeps.js') + +if (typeof localStorage === "undefined" || localStorage === null) { + var LocalStorage = require('node-localstorage').LocalStorage; + localStorage = new LocalStorage('./scratch'); +} + +let CryptoJS = require('crypto-js') + var flovaultBaseURL = "https://flovault.alexandria.io"; var florinsightBaseURL = "https://florinsight.alexandria.io"; @@ -16,6 +32,9 @@ var Wallet = (function () { this.addresses = {}; this.balances = {}; this.coin_network = Bitcoin.networks.florincoin; + console.log('here') + console.log(Bitcoin) + console.log(typeof Bitcoin) this.CryptoConfig = { mode: CryptoJS.mode.CBC, padding: CryptoJS.pad.Iso10126,