@cranberry-money/shared-utils 8.23.374 → 8.23.375

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.
@@ -63,7 +63,7 @@ export declare function formatAccountNumber(accountNumber: string | null | undef
63
63
  export declare function formatCryptoBalance(balance: string | number, symbol: string, decimals?: number): string;
64
64
  /**
65
65
  * Maps blockchain network names to their native asset symbols.
66
- * Uses NETWORK_TO_ASSET_SYMBOL from shared-constants to ensure consistency.
66
+ * Uses NETWORK_TO_NATIVE_ASSET from shared-constants to ensure consistency.
67
67
  *
68
68
  * @param networkName - The network name (case-insensitive)
69
69
  * @returns Native asset symbol (e.g., 'ETH', 'BTC', 'MATIC')
@@ -1,4 +1,4 @@
1
- import { AUD, NETWORK_TO_ASSET_SYMBOL, DECIMAL_PLACES, LOCALE_AUSTRALIA, } from '@cranberry-money/shared-constants';
1
+ import { AUD, NETWORK_TO_NATIVE_ASSET, DECIMAL_PLACES, LOCALE_AUSTRALIA, } from '@cranberry-money/shared-constants';
2
2
  export const NUMBER_FORMAT_OPTIONS_CURRENCY = {
3
3
  style: 'currency',
4
4
  minimumFractionDigits: DECIMAL_PLACES,
@@ -133,7 +133,7 @@ export function formatCryptoBalance(balance, symbol, decimals = 4) {
133
133
  }
134
134
  /**
135
135
  * Maps blockchain network names to their native asset symbols.
136
- * Uses NETWORK_TO_ASSET_SYMBOL from shared-constants to ensure consistency.
136
+ * Uses NETWORK_TO_NATIVE_ASSET from shared-constants to ensure consistency.
137
137
  *
138
138
  * @param networkName - The network name (case-insensitive)
139
139
  * @returns Native asset symbol (e.g., 'ETH', 'BTC', 'MATIC')
@@ -145,7 +145,7 @@ export function formatCryptoBalance(balance, symbol, decimals = 4) {
145
145
  * getBlockchainNetworkShortName('arbitrum') // "ETH" (uses ETH as native token)
146
146
  */
147
147
  export function getBlockchainNetworkShortName(networkName) {
148
- const name = networkName?.toUpperCase() || '';
149
- return NETWORK_TO_ASSET_SYMBOL[name] || networkName.toUpperCase();
148
+ const name = networkName?.toLowerCase() || '';
149
+ return NETWORK_TO_NATIVE_ASSET[name] || networkName.toUpperCase();
150
150
  }
151
151
  //# sourceMappingURL=formatting.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cranberry-money/shared-utils",
3
- "version": "8.23.374",
3
+ "version": "8.23.375",
4
4
  "description": "Shared utility functions for Blueberry platform",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -29,8 +29,8 @@
29
29
  "prepublishOnly": "npm run clean && npm run typecheck && npm test && npm run build"
30
30
  },
31
31
  "dependencies": {
32
- "@cranberry-money/shared-constants": "^8.15.399",
33
- "@cranberry-money/shared-types": "^8.22.374"
32
+ "@cranberry-money/shared-constants": "^8.15.400",
33
+ "@cranberry-money/shared-types": "^8.22.375"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@types/jest": "^30.0.0",