1
0
forked from circlecloud/tera

fix: type error remove file

Signed-off-by: MiaoWoo <admin@yumc.pw>
This commit is contained in:
MiaoWoo 2019-07-10 16:24:32 +08:00
parent 4527e437fa
commit 87a863a228
8 changed files with 41 additions and 52 deletions

View File

@ -6,8 +6,12 @@ for name in `ls *.${EXT}`; do
done done
: Function; : Function;
global. global.
: any
as any
BlockNumDB BlockNumDB
RelayMode BlockNumDBMin
LoadHistoryMessage UseTruncateBlockDB
LastLoadedBlockNum ContextSendLoadToBegin

View File

@ -1,4 +1,32 @@
{ {
"name": "tera",
"version": "1.0.0",
"description": "Tera wallet",
"main": "dist/run-node.js",
"repository": "https://git.yumc.pw/circlecloud/tera.git",
"keywords": [
"wallet",
"cryptowallet",
"quick",
"messenger",
"cryptocurrency",
"cryptomessenger"
],
"author": "MiaoWoo<admin@yumc.pw>",
"license": "MIT",
"scripts": {
"clean": "",
"prebuild": "yarn clean"
},
"dependencies": {
"bintrees": "^1.0.2",
"greenlock": "^2.6.7",
"ntp-client": "^0.5.3",
"secp256k1": "^3.6.1",
"stun": "^1.1.0",
"uglify-js": "^3.4.9",
"zip": "^1.2.0"
},
"devDependencies": { "devDependencies": {
"@types/node": "^12.6.1", "@types/node": "^12.6.1",
"typescript": "^3.5.3" "typescript": "^3.5.3"

View File

@ -23,7 +23,7 @@ global.HTTPCaller.CreateAccount = function(Params, response) {
var MaxCountViewRows = global.HTTP_MAX_COUNT_ROWS; var MaxCountViewRows = global.HTTP_MAX_COUNT_ROWS;
global.HTTPCaller.GetBalance = function(Params) { global.HTTPCaller.GetBalance = function(Params) {
if (typeof Params === "object") { if (typeof Params === "object") {
var arr = global.DApps.Accounts.GetRowsAccounts(ParseNum(Params.AccountID), 1); var arr = global.DApps.Accounts.GetRowsAccounts(global.ParseNum(Params.AccountID), 1);
if (arr.length) { if (arr.length) {
arr[0].result = 1; arr[0].result = 1;
return arr[0]; return arr[0];

View File

@ -14,13 +14,10 @@ import './constant'
import './log' import './log'
let { let {
ToLog,
TO_ERROR_LOG, TO_ERROR_LOG,
SaveToFile,
TimeStart, TimeStart,
LOAD_CONST, LOAD_CONST,
LoadParams, LoadParams,
GetDataPath,
CONST_NAME_ARR, CONST_NAME_ARR,
SaveParams, SaveParams,
SAVE_CONST, SAVE_CONST,
@ -41,26 +38,11 @@ String.prototype.right = function(count) {
else else
return this.substr(0, this.length); return this.substr(0, this.length);
}; };
if (fs.existsSync("./lib/bintrees")) global.RBTree = require('bintrees').RBTree;
global.RBTree = require("../lib/bintrees").RBTree; global.ntpClient = require('ntp-client');
else
global.RBTree = require('bintrees').RBTree;
if (fs.existsSync("./lib/ntp-client"))
global.ntpClient = require('../lib/ntp-client');
else
global.ntpClient = require('ntp-client');
global.Stun = require('stun'); global.Stun = require('stun');
global.ZIP = require("zip"); global.ZIP = require("zip");
var strOS = os.platform() + "_" + os.arch(); var strOS = os.platform() + "_" + os.arch();
if (global.NWMODE)
strOS = strOS + "-nw" + global.NWVERSION;
if (fs.existsSync("./lib/secp256k1/" + strOS + "/secp256k1.node")) {
try {
global.secp256k1 = require('../lib/secp256k1/' + strOS + '/secp256k1.node');
}
catch (e) {
}
}
if (!global.secp256k1) { if (!global.secp256k1) {
global.secp256k1 = require('secp256k1'); global.secp256k1 = require('secp256k1');
} }

View File

@ -10,7 +10,7 @@
var START_NONCE = 0; var START_NONCE = 0;
const COUNT_FIND_HASH1 = 64; const COUNT_FIND_HASH1 = 64;
const DELTA_LONG_MINING = 5000; var DELTA_LONG_MINING = 5000;
var BLOCKNUM_ALGO2 = 6560000; var BLOCKNUM_ALGO2 = 6560000;
if (global.LOCAL_RUN || global.TEST_NETWORK) { if (global.LOCAL_RUN || global.TEST_NETWORK) {
BLOCKNUM_ALGO2 = 0; BLOCKNUM_ALGO2 = 0;

View File

@ -1,27 +0,0 @@
{
"name": "tera",
"version": "1.0.0",
"description": "Tera wallet",
"main": "run-nw.js",
"main2": "run-electron.js",
"repository": "https://git.yumc.pw/circlecloud/tera.git",
"keywords": [
"wallet",
"cryptowallet",
"quick",
"messenger",
"cryptocurrency",
"cryptomessenger"
],
"author": "progr76@gmail.com",
"license": "MIT",
"dependencies": {
"bintrees": "^1.0.2",
"greenlock": "^2.6.7",
"ntp-client": "^0.5.3",
"secp256k1": "^3.6.1",
"stun": "^1.1.0",
"uglify-js": "^3.4.9",
"zip": "^1.2.0"
}
}

View File

@ -1,6 +1,8 @@
{ {
"compilerOptions": { "compilerOptions": {
"outDir": "dist", "outDir": "dist",
"allowJs": true,
"sourceMap": true,
"target": "es5" "target": "es5"
}, },
"include": [ "include": [