Skip to content
This repository has been archived by the owner on Jan 25, 2024. It is now read-only.

Commit

Permalink
src/coins.js: isValidCoin -> isValidNetwork
Browse files Browse the repository at this point in the history
The function takes `network` as an argument after all.

Add deprecation notice for old func.
  • Loading branch information
OttoAllmendinger committed Jan 8, 2020
1 parent c9f367a commit 9556784
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/coins.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,11 @@ function isZcash (network) {
return typeforce.value(networks.zcash.coin)(network.coin)
}

isValidCoin = typeforce.oneOf(
/**
* @param network
* @returns {boolean} returns true iff network is any of the network stated in the argument
*/
const isValidNetwork = typeforce.oneOf(
isBitcoin,
isBitcoinCash,
isBitcoinSV,
Expand Down Expand Up @@ -85,5 +89,10 @@ module.exports = {
isDash,
isLitecoin,
isZcash,
isValidCoin

isValidNetwork,
/**
* @deprecated: use isValidNetwork
*/
isValidCoin: isValidNetwork
}

0 comments on commit 9556784

Please sign in to comment.