fix the loading for Key.js
Now, like all other modules loaded in the bitcore object, Key is only required when it is actually used. All tests pass in node and the browser.
This commit is contained in:
parent
8a41414114
commit
5b67d91f35
|
@ -30,7 +30,8 @@ requireWhenAccessed('Peer', './Peer');
|
|||
requireWhenAccessed('Block', './Block');
|
||||
requireWhenAccessed('ScriptInterpreter', './ScriptInterpreter');
|
||||
requireWhenAccessed('Bloom', './Bloom');
|
||||
module.exports.KeyModule = require('./Key');
|
||||
//module.exports.KeyModule = require('./Key');
|
||||
requireWhenAccessed('KeyModule', './Key');
|
||||
requireWhenAccessed('SINKey', './SINKey');
|
||||
requireWhenAccessed('SIN', './SIN');
|
||||
requireWhenAccessed('PrivateKey', './PrivateKey');
|
||||
|
|
|
@ -35,6 +35,7 @@ var modules = [
|
|||
'PeerManager',
|
||||
'PrivateKey',
|
||||
'RpcClient',
|
||||
'Key',
|
||||
'SIN',
|
||||
'SINKey',
|
||||
'Script',
|
||||
|
@ -60,7 +61,6 @@ b.require('browserify-buffertools/buffertools.js', {expose:'buffertools'});
|
|||
b.require('./bitcore', {expose: 'bitcore'});
|
||||
b.require('buffer', {expose: 'buffer'});
|
||||
b.require('base58-native');
|
||||
b.require('./Key.js', {expose: 'KeyModule'});
|
||||
b.require('./util/log');
|
||||
b.require('./util/util');
|
||||
b.require('./util/EncodedData');
|
||||
|
|
Loading…
Reference in New Issue