wallaby-cash 2.3.3 → 2.3.4

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/dist/index.cjs.js CHANGED
@@ -597,7 +597,7 @@ const MASTER_ENCRYPTION_KEY = '9fa9d3f3c77c20d3a50a08e5299644be29f6e6206ef3479fe
597
597
  { type: 'public-key', alg: exports.PublicKeyCredentialAlgorithm.ES256 },
598
598
  ];
599
599
  const isWeb = typeof window !== 'undefined' && typeof document !== 'undefined';
600
- const currentPackageVersion = "2.3.3" ;
600
+ const currentPackageVersion = "2.3.4" ;
601
601
 
602
602
  /**
603
603
  * Storage keys adapter for Storage interface across different platforms.
@@ -10534,13 +10534,17 @@ class WalletDataService extends Base {
10534
10534
  *
10535
10535
  * @public
10536
10536
  * Fetches the balances for a group of tokens in bulk.
10537
- * Takes an array of addresses and tokens and return their balances.
10538
- * @param { string } address Wallet address
10539
- * @param { string } symbol Token symbol
10540
- * @param { BlockchainName } chainName the chain name enum. i.e. 'ETHEREUM', 'BITCOIN'
10537
+ * Takes an array of addresses and tokens and return their balances.
10538
+ * @param { string } walletId Wallet ID
10539
+ * @param { TokenBalanceRequest[] } tokensAndAddressesList An array of token balance requests.
10540
+ * - address: Wallet address
10541
+ * - symbol: Token symbol
10542
+ * - chainName: Blockchain name (optional)
10543
+ * - tokenStandard: Token standard (optional)
10544
+ * Note: Either chainName or tokenStandard must be provided.
10541
10545
  * @returns { FetchBalanceData } Returns an array of the requested tokens balances.
10542
10546
  */
10543
- async getMultiTokenBalances(tokensAndAddressesList) {
10547
+ async getMultiTokenBalances({ walletId, tokensAndAddressesList }) {
10544
10548
  try {
10545
10549
  if (!tokensAndAddressesList.length) {
10546
10550
  throw new WallabyError({
@@ -10550,12 +10554,12 @@ class WalletDataService extends Base {
10550
10554
  });
10551
10555
  }
10552
10556
  const response = await this.request(WalletRoutes.getMultiTokenBalances, {
10553
- payload: { assets: tokensAndAddressesList },
10557
+ payload: { assets: tokensAndAddressesList, walletId },
10554
10558
  });
10555
10559
  return response;
10556
10560
  }
10557
10561
  catch (error) {
10558
- logger.error('SDK::WalletDataService::getTokenBalance::error', error);
10562
+ logger.error('SDK::WalletDataService::getMultiTokenBalances::error', error);
10559
10563
  throw error;
10560
10564
  }
10561
10565
  }