@bitpay-labs/bitcore-wallet-service 11.6.2 → 11.6.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.
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@bitpay-labs/bitcore-wallet-service",
3
3
  "description": "A service for Mutisig HD Bitcoin Wallets",
4
4
  "author": "BitPay Inc",
5
- "version": "11.6.2",
5
+ "version": "11.6.3",
6
6
  "license": "MIT",
7
7
  "main": "ts_build/src/index.js",
8
8
  "types": "./ts_build/src/index.d.ts",
@@ -115,5 +115,5 @@
115
115
  "email": "kjoseph@bitpay.com"
116
116
  }
117
117
  ],
118
- "gitHead": "71a658df3edae5c9c290a537f062145a1266e366"
118
+ "gitHead": "181b837630c91f7c6fe7c891e238ce37995c1165"
119
119
  }
@@ -47,10 +47,10 @@ const PUSHNOTIFICATIONS_TYPES = {
47
47
  dataOnly: true,
48
48
  broadcastToActiveUsers: true
49
49
  },
50
- NewBlock: {
51
- dataOnly: true,
52
- broadcastToActiveUsers: true
53
- },
50
+ // NewBlock: {
51
+ // dataOnly: true,
52
+ // broadcastToActiveUsers: true
53
+ // },
54
54
  TxProposalAcceptedBy: {
55
55
  dataOnly: true
56
56
  },
@@ -713,15 +713,15 @@ export class PushNotificationsService {
713
713
 
714
714
  private coinGeckoGetCredentials() {
715
715
  if (!config.coinGecko) throw new Error('coinGecko missing credentials');
716
-
716
+
717
717
  const credentials = {
718
718
  API: config.coinGecko.api,
719
719
  API_KEY: config.coinGecko.apiKey,
720
720
  };
721
-
721
+
722
722
  return credentials;
723
723
  }
724
-
724
+
725
725
  getTokenData(chain: string): Promise<Array<{
726
726
  chainId: number;
727
727
  address: string;
@@ -733,11 +733,11 @@ export class PushNotificationsService {
733
733
  return new Promise((resolve, reject) => {
734
734
  const cacheKey = `cgTokenList:${chain}`;
735
735
  const credentials = this.coinGeckoGetCredentials();
736
-
736
+
737
737
  this.storage.checkAndUseGlobalCache(cacheKey, Defaults.COIN_GECKO_CACHE_DURATION, (err, values, oldvalues) => {
738
738
  if (err) logger.warn('Cache check failed', err);
739
739
  if (values) return resolve(values);
740
-
740
+
741
741
  const assetPlatformMap = {
742
742
  eth: 'ethereum',
743
743
  matic: 'polygon-pos',
@@ -747,17 +747,17 @@ export class PushNotificationsService {
747
747
  op: 'optimistic-ethereum',
748
748
  sol: 'solana',
749
749
  };
750
-
750
+
751
751
  const assetId = assetPlatformMap[chain];
752
752
  if (!assetId) return reject(new Error(`Unsupported chain '${chain}'`));
753
-
753
+
754
754
  const URL: string = `${credentials.API}/v3/token_lists/${assetId}/all.json`;
755
755
  const headers = {
756
756
  'Content-Type': 'application/json',
757
757
  'Accept': 'application/json',
758
758
  'x-cg-pro-api-key': credentials.API_KEY
759
759
  };
760
-
760
+
761
761
  this.request.get(
762
762
  URL,
763
763
  {
@@ -386,7 +386,7 @@ describe('Push notifications', function() {
386
386
  })
387
387
  ]);
388
388
  }
389
-
389
+
390
390
  requestStub = sinon.stub();
391
391
  requestStub.yields();
392
392
 
@@ -703,7 +703,7 @@ describe('Push notifications', function() {
703
703
  }, function(err) {
704
704
  server.createAddress({}, (err, address) => {
705
705
  should.not.exist(err);
706
-
706
+
707
707
  // Simulate incoming tx notification
708
708
  server._notify('NewIncomingTx', {
709
709
  txid: '997',
@@ -750,7 +750,7 @@ describe('Push notifications', function() {
750
750
  })
751
751
  ]);
752
752
  }
753
-
753
+
754
754
  requestStub = sinon.stub();
755
755
  requestStub.yields();
756
756
 
@@ -924,7 +924,7 @@ describe('Push notifications', function() {
924
924
  });
925
925
  });
926
926
 
927
- describe('Any wallet', function() {
927
+ describe.skip('Any wallet', function() {
928
928
  beforeEach(async function() {
929
929
  await helpers.beforeEach();
930
930
  ({ wallet, server } = await helpers.createAndJoinWallet(1, 1));
@@ -1273,7 +1273,7 @@ describe('Push notifications', function() {
1273
1273
  });
1274
1274
  });
1275
1275
 
1276
- describe('Any wallet - Should use braze subscription if both set', function() {
1276
+ describe.skip('Any wallet - Should use braze subscription if both set', function() {
1277
1277
  beforeEach(async function() {
1278
1278
  await helpers.beforeEach();
1279
1279
  ({ wallet, server } = await helpers.createAndJoinWallet(1, 1));
@@ -1520,4 +1520,4 @@ describe('Push notifications', function() {
1520
1520
  });
1521
1521
  });
1522
1522
  });
1523
- });
1523
+ });