hive-keychain-commons 1.8.2 → 1.8.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,5 @@
1
1
  import { Exchange } from '../interfaces/exchange';
2
2
  export declare const ExchangesUtils: {
3
3
  getExchanges: () => Exchange[];
4
+ isExchange: (username: string) => boolean;
4
5
  };
@@ -40,6 +40,11 @@ const getExchanges = () => {
40
40
  },
41
41
  ];
42
42
  };
43
+ const isExchange = (username) => {
44
+ const exchanges = getExchanges();
45
+ return !!exchanges.find((e) => e.username === username);
46
+ };
43
47
  exports.ExchangesUtils = {
44
48
  getExchanges,
49
+ isExchange,
45
50
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hive-keychain-commons",
3
- "version": "1.8.2",
3
+ "version": "1.8.3",
4
4
  "description": "Platform-agnostic functions used in Hive Keychain mobile and extensions",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",