Skip to content
This repository was archived by the owner on Oct 30, 2024. It is now read-only.

Commit 8bcee5d

Browse files
committed
Fix browser tests
1 parent ee1ae51 commit 8bcee5d

4 files changed

Lines changed: 11 additions & 7 deletions

File tree

dist/wallet-address-validator.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15567,6 +15567,7 @@ module.exports = {
1556715567
};
1556815568
},{"../src/crypto/utils":144,"./crypto/utils":144}],163:[function(require,module,exports){
1556915569
var currencies = require('./currencies');
15570+
const { addressType } = require('../src/crypto/utils');
1557015571

1557115572
var DEFAULT_CURRENCY_NAME = 'bitcoin';
1557215573

@@ -15595,10 +15596,11 @@ module.exports = {
1559515596
},
1559615597
findCurrency: function(symbol) {
1559715598
return currencies.getByNameOrSymbol(symbol) || null ;
15598-
}
15599+
},
15600+
addressType,
1559915601
};
1560015602

15601-
},{"./currencies":145}],164:[function(require,module,exports){
15603+
},{"../src/crypto/utils":144,"./currencies":145}],164:[function(require,module,exports){
1560215604
const { addressType } = require('../src/crypto/utils');
1560315605
const { bech32 } = require('bech32');
1560415606

dist/wallet-address-validator.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/wallet_address_validator.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
var currencies = require('./currencies');
2+
const { addressType } = require('../src/crypto/utils');
23

34
var DEFAULT_CURRENCY_NAME = 'bitcoin';
45

@@ -27,5 +28,6 @@ module.exports = {
2728
},
2829
findCurrency: function(symbol) {
2930
return currencies.getByNameOrSymbol(symbol) || null ;
30-
}
31+
},
32+
addressType,
3133
};

test/wallet_address_validator.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
const { addressType } = require('../src/crypto/utils');
2-
31
var isNode = typeof module !== 'undefined' && typeof module.exports !== 'undefined'
42

53
var chai = isNode ? require('chai') : window.chai,
64
expect = chai.expect
75

8-
var WAValidator = isNode ? require('../src/wallet_address_validator') : window.WAValidator
6+
var WAValidator = isNode ? require('../src/wallet_address_validator') : window.WAValidator;
7+
8+
const addressType = WAValidator.addressType;
99

1010
function isValidAddressType(address, currency, networkType, addressType) {
1111
const type = WAValidator.getAddressType(address, currency, networkType);

0 commit comments

Comments
 (0)