@dynamic-labs/sdk-react-core 4.81.0 → 4.83.0
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/CHANGELOG.md +24 -0
- package/package.cjs +2 -2
- package/package.js +2 -2
- package/package.json +13 -13
- package/src/lib/data/api/aleo/getAleoCuratedPrices.cjs +73 -0
- package/src/lib/data/api/aleo/getAleoCuratedPrices.d.ts +38 -0
- package/src/lib/data/api/aleo/getAleoCuratedPrices.js +69 -0
- package/src/lib/shared/assets/index.d.ts +2 -0
- package/src/lib/shared/assets/midnight-shielded.cjs +54 -0
- package/src/lib/shared/assets/midnight-shielded.js +30 -0
- package/src/lib/shared/assets/midnight-unshielded.cjs +54 -0
- package/src/lib/shared/assets/midnight-unshielded.js +30 -0
- package/src/lib/styles/index.shadow.cjs +1 -1
- package/src/lib/styles/index.shadow.js +1 -1
- package/src/lib/utils/functions/compareChains/compareChains.cjs +1 -0
- package/src/lib/utils/functions/compareChains/compareChains.js +1 -0
- package/src/lib/utils/functions/getTransactionLink/blockExplorerPatterns.cjs +12 -0
- package/src/lib/utils/functions/getTransactionLink/blockExplorerPatterns.js +12 -0
- package/src/lib/utils/hooks/useAleoAutoMergeRecords/index.d.ts +1 -0
- package/src/lib/utils/hooks/useAleoAutoMergeRecords/useAleoAutoMergeRecords.cjs +246 -0
- package/src/lib/utils/hooks/useAleoAutoMergeRecords/useAleoAutoMergeRecords.d.ts +17 -0
- package/src/lib/utils/hooks/useAleoAutoMergeRecords/useAleoAutoMergeRecords.js +242 -0
- package/src/lib/utils/hooks/useAleoAutoShieldSponsoredTokens/index.d.ts +1 -0
- package/src/lib/utils/hooks/useAleoAutoShieldSponsoredTokens/useAleoAutoShieldSponsoredTokens.cjs +263 -0
- package/src/lib/utils/hooks/useAleoAutoShieldSponsoredTokens/useAleoAutoShieldSponsoredTokens.d.ts +59 -0
- package/src/lib/utils/hooks/useAleoAutoShieldSponsoredTokens/useAleoAutoShieldSponsoredTokens.js +259 -0
- package/src/lib/utils/hooks/useAleoShieldedBalances/useAleoShieldedBalances.cjs +139 -68
- package/src/lib/utils/hooks/useAleoShieldedBalances/useAleoShieldedBalances.js +139 -68
- package/src/lib/views/BackupUnsuccessfulView/BackupUnsuccessfulView.cjs +12 -1
- package/src/lib/views/BackupUnsuccessfulView/BackupUnsuccessfulView.js +12 -1
- package/src/lib/widgets/DynamicWidget/components/ActiveMidnightWalletBalance/ActiveMidnightWalletBalance.cjs +193 -0
- package/src/lib/widgets/DynamicWidget/components/ActiveMidnightWalletBalance/ActiveMidnightWalletBalance.d.ts +7 -0
- package/src/lib/widgets/DynamicWidget/components/ActiveMidnightWalletBalance/ActiveMidnightWalletBalance.js +189 -0
- package/src/lib/widgets/DynamicWidget/components/ActiveMidnightWalletBalance/index.d.ts +1 -0
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletBalance/ActiveWalletBalance.cjs +26 -1
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletBalance/ActiveWalletBalance.js +26 -1
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveMidnightWalletAddresses/ActiveMidnightWalletAddresses.cjs +124 -0
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveMidnightWalletAddresses/ActiveMidnightWalletAddresses.d.ts +9 -0
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveMidnightWalletAddresses/ActiveMidnightWalletAddresses.js +120 -0
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveMidnightWalletAddresses/index.d.ts +1 -0
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.cjs +21 -10
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.js +22 -11
- package/src/lib/widgets/DynamicWidget/components/WalletDetailsCard/WalletDetailsCard.cjs +22 -2
- package/src/lib/widgets/DynamicWidget/components/WalletDetailsCard/WalletDetailsCard.d.ts +8 -1
- package/src/lib/widgets/DynamicWidget/components/WalletDetailsCard/WalletDetailsCard.js +23 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,28 @@
|
|
|
1
1
|
|
|
2
|
+
## [4.83.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.82.0...v4.83.0) (2026-05-11)
|
|
3
|
+
|
|
4
|
+
## [4.82.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.81.0...v4.82.0) (2026-05-11)
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* adds react-native embedded webview ([#11168](https://github.com/dynamic-labs/dynamic-auth/issues/11168)) ([31c17e3](https://github.com/dynamic-labs/dynamic-auth/commit/31c17e34e198efc806299011ab286bf48a244908))
|
|
10
|
+
* **aleo:** expose WaaS-specific methods directly on AleoWallet ([#11174](https://github.com/dynamic-labs/dynamic-auth/issues/11174)) ([ccfb8f4](https://github.com/dynamic-labs/dynamic-auth/commit/ccfb8f4de690ee4a30b6c20e037fef51a69df8e1))
|
|
11
|
+
* **aleo:** two-step Exchange Send (unshield → public→public) ([#11172](https://github.com/dynamic-labs/dynamic-auth/issues/11172)) ([02a992c](https://github.com/dynamic-labs/dynamic-auth/commit/02a992c3239519ed283a9804f092bffca9ba4d18))
|
|
12
|
+
* **demo:** registry-driven Aleo transactions form ([#11105](https://github.com/dynamic-labs/dynamic-auth/issues/11105)) ([766949e](https://github.com/dynamic-labs/dynamic-auth/commit/766949e7bb9f613e157418ed4221cac43fbf0394))
|
|
13
|
+
* **sdk-react-core:** add ActiveMidnightWalletAddresses widget ([#11083](https://github.com/dynamic-labs/dynamic-auth/issues/11083)) ([1858292](https://github.com/dynamic-labs/dynamic-auth/commit/18582926348420332f89a3d1b2c2ca2cd453f69e))
|
|
14
|
+
* **widget:** auto-merge + auto-shield sponsored Aleo tokens on wallet load ([#11157](https://github.com/dynamic-labs/dynamic-auth/issues/11157)) ([cda1de1](https://github.com/dynamic-labs/dynamic-auth/commit/cda1de1f04789eb24bba2fbe0a49b5f42f6a609d))
|
|
15
|
+
* **widget:** auto-shield indicator + post-shield balance refresh polling ([#11173](https://github.com/dynamic-labs/dynamic-auth/issues/11173)) ([f49d480](https://github.com/dynamic-labs/dynamic-auth/commit/f49d480dc5ef85efd7d201687d9b0309090a69c8))
|
|
16
|
+
* **widget:** wire Aleo curated prices into the Shielded balance tab ([#11178](https://github.com/dynamic-labs/dynamic-auth/issues/11178)) ([eab1606](https://github.com/dynamic-labs/dynamic-auth/commit/eab16062140a0474d14a2cc43fd0a1624e4da92e))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Bug Fixes
|
|
20
|
+
|
|
21
|
+
* **ci:** wire dd-trace ci visibility env vars for [@demov1](https://github.com/demov1) playwright task ([#11199](https://github.com/dynamic-labs/dynamic-auth/issues/11199)) ([9af4827](https://github.com/dynamic-labs/dynamic-auth/commit/9af48271e4721dac54d495097d43522f76ec724d))
|
|
22
|
+
* **playwright:** expose raw auth token for stable JWT reads ([#11204](https://github.com/dynamic-labs/dynamic-auth/issues/11204)) ([b002dfb](https://github.com/dynamic-labs/dynamic-auth/commit/b002dfb642755830c6c9c813ebb4d749882518d6))
|
|
23
|
+
* **playwright:** replace waitForTimeout in networkControl + reinitialize spec ([#11161](https://github.com/dynamic-labs/dynamic-auth/issues/11161)) ([5e72371](https://github.com/dynamic-labs/dynamic-auth/commit/5e723713ceb8c804d253c261be86abb997daeabd))
|
|
24
|
+
* remediate high-severity dependency vulnerabilities ([#11171](https://github.com/dynamic-labs/dynamic-auth/issues/11171)) ([285e7cb](https://github.com/dynamic-labs/dynamic-auth/commit/285e7cb0d07f957a97e8d9ef4fab0b8d2d24e031))
|
|
25
|
+
|
|
2
26
|
## [4.81.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.80.0...v4.81.0) (2026-05-07)
|
|
3
27
|
|
|
4
28
|
|
package/package.cjs
CHANGED
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
|
|
4
4
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
|
|
6
|
-
var version = "4.
|
|
6
|
+
var version = "4.83.0";
|
|
7
7
|
var dependencies = {
|
|
8
8
|
"@dynamic-labs/sdk-api-core": "0.0.964",
|
|
9
9
|
"@dynamic-labs-sdk/client": "0.26.9",
|
|
10
|
-
"@dynamic-labs-wallet/browser-wallet-client": "0.0.
|
|
10
|
+
"@dynamic-labs-wallet/browser-wallet-client": "0.0.337",
|
|
11
11
|
"@hcaptcha/react-hcaptcha": "1.4.4",
|
|
12
12
|
"@thumbmarkjs/thumbmarkjs": "0.16.0",
|
|
13
13
|
"country-list": "2.3.0",
|
package/package.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use client'
|
|
2
|
-
var version = "4.
|
|
2
|
+
var version = "4.83.0";
|
|
3
3
|
var dependencies = {
|
|
4
4
|
"@dynamic-labs/sdk-api-core": "0.0.964",
|
|
5
5
|
"@dynamic-labs-sdk/client": "0.26.9",
|
|
6
|
-
"@dynamic-labs-wallet/browser-wallet-client": "0.0.
|
|
6
|
+
"@dynamic-labs-wallet/browser-wallet-client": "0.0.337",
|
|
7
7
|
"@hcaptcha/react-hcaptcha": "1.4.4",
|
|
8
8
|
"@thumbmarkjs/thumbmarkjs": "0.16.0",
|
|
9
9
|
"country-list": "2.3.0",
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/sdk-react-core",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.83.0",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"@dynamic-labs/sdk-api-core": "0.0.964",
|
|
6
6
|
"@dynamic-labs-sdk/client": "0.26.9",
|
|
7
|
-
"@dynamic-labs-wallet/browser-wallet-client": "0.0.
|
|
7
|
+
"@dynamic-labs-wallet/browser-wallet-client": "0.0.337",
|
|
8
8
|
"@hcaptcha/react-hcaptcha": "1.4.4",
|
|
9
9
|
"@thumbmarkjs/thumbmarkjs": "0.16.0",
|
|
10
10
|
"country-list": "2.3.0",
|
|
@@ -16,17 +16,17 @@
|
|
|
16
16
|
"yup": "0.32.11",
|
|
17
17
|
"react-international-phone": "4.5.0",
|
|
18
18
|
"bs58": "5.0.0",
|
|
19
|
-
"@dynamic-labs/assert-package-version": "4.
|
|
20
|
-
"@dynamic-labs/iconic": "4.
|
|
21
|
-
"@dynamic-labs/locale": "4.
|
|
22
|
-
"@dynamic-labs/logger": "4.
|
|
23
|
-
"@dynamic-labs/multi-wallet": "4.
|
|
24
|
-
"@dynamic-labs/rpc-providers": "4.
|
|
25
|
-
"@dynamic-labs/store": "4.
|
|
26
|
-
"@dynamic-labs/types": "4.
|
|
27
|
-
"@dynamic-labs/utils": "4.
|
|
28
|
-
"@dynamic-labs/wallet-book": "4.
|
|
29
|
-
"@dynamic-labs/wallet-connector-core": "4.
|
|
19
|
+
"@dynamic-labs/assert-package-version": "4.83.0",
|
|
20
|
+
"@dynamic-labs/iconic": "4.83.0",
|
|
21
|
+
"@dynamic-labs/locale": "4.83.0",
|
|
22
|
+
"@dynamic-labs/logger": "4.83.0",
|
|
23
|
+
"@dynamic-labs/multi-wallet": "4.83.0",
|
|
24
|
+
"@dynamic-labs/rpc-providers": "4.83.0",
|
|
25
|
+
"@dynamic-labs/store": "4.83.0",
|
|
26
|
+
"@dynamic-labs/types": "4.83.0",
|
|
27
|
+
"@dynamic-labs/utils": "4.83.0",
|
|
28
|
+
"@dynamic-labs/wallet-book": "4.83.0",
|
|
29
|
+
"@dynamic-labs/wallet-connector-core": "4.83.0",
|
|
30
30
|
"eventemitter3": "5.0.1"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
var _tslib = require('../../../../../_virtual/_tslib.cjs');
|
|
7
|
+
var utils = require('@dynamic-labs/utils');
|
|
8
|
+
require('@dynamic-labs-sdk/client/core');
|
|
9
|
+
require('@dynamic-labs/sdk-api-core');
|
|
10
|
+
require('react');
|
|
11
|
+
require('eventemitter3');
|
|
12
|
+
require('@dynamic-labs-sdk/client');
|
|
13
|
+
var ApiEndpoint = require('../../../config/ApiEndpoint.cjs');
|
|
14
|
+
require('@dynamic-labs/iconic');
|
|
15
|
+
require('@dynamic-labs/wallet-connector-core');
|
|
16
|
+
require('react/jsx-runtime');
|
|
17
|
+
require('../../../context/ViewContext/ViewContext.cjs');
|
|
18
|
+
require('../../../shared/logger.cjs');
|
|
19
|
+
require('@dynamic-labs/wallet-book');
|
|
20
|
+
require('../../../utils/constants/colors.cjs');
|
|
21
|
+
require('../../../utils/constants/values.cjs');
|
|
22
|
+
require('../../../shared/consts/index.cjs');
|
|
23
|
+
var getApiHeaders = require('../../../client/extension/hooks/useInitializeSdkClient/getApiHeaders/getApiHeaders.cjs');
|
|
24
|
+
require('../../../events/dynamicEvents.cjs');
|
|
25
|
+
var getMinAuthToken = require('../../../client/extension/functions/getMinAuthToken/getMinAuthToken.cjs');
|
|
26
|
+
require('@dynamic-labs/multi-wallet');
|
|
27
|
+
require('react-international-phone');
|
|
28
|
+
require('../../../store/state/nonce/nonce.cjs');
|
|
29
|
+
var randomString = require('../../../utils/functions/randomString/randomString.cjs');
|
|
30
|
+
require('@dynamic-labs/locale');
|
|
31
|
+
require('../../../store/state/dynamicContextProps/dynamicContextProps.cjs');
|
|
32
|
+
require('../../../store/state/primaryWalletId/primaryWalletId.cjs');
|
|
33
|
+
require('../../../store/state/connectedWalletsInfo/connectedWalletsInfo.cjs');
|
|
34
|
+
require('../../../utils/functions/getWaasAddressTypeLabel/getWaasAddressTypeLabel.cjs');
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Fetch the curated Aleo token price list for the given network. The
|
|
38
|
+
* endpoint returns every curated token regardless of balance, so this
|
|
39
|
+
* works as the price source for the Shielded balance tab — which never
|
|
40
|
+
* goes through the multichain `/accountBalances` pipeline.
|
|
41
|
+
*
|
|
42
|
+
* Auth + base URL mirror the OpenAPI-generated `sdkApi`. We don't go
|
|
43
|
+
* through `sdkApi` here because this endpoint isn't in the OpenAPI
|
|
44
|
+
* surface yet; a manual fetch keeps the dynamic-auth side small and
|
|
45
|
+
* focused, and the auth token / device-fingerprint headers are still
|
|
46
|
+
* picked up via `getApiHeaders` + `getMinAuthToken`.
|
|
47
|
+
*/
|
|
48
|
+
const getAleoCuratedPrices = (_a) => _tslib.__awaiter(void 0, [_a], void 0, function* ({ environmentId, network, }) {
|
|
49
|
+
var _b, _c;
|
|
50
|
+
const basePath = ApiEndpoint.getBaseUrl();
|
|
51
|
+
if (!basePath)
|
|
52
|
+
return [];
|
|
53
|
+
// `basePath` already includes the `/api/v0` prefix (set on the
|
|
54
|
+
// generated `Configuration().basePath`), so this path is just the
|
|
55
|
+
// relative SDK route.
|
|
56
|
+
const url = `${basePath}/sdk/${encodeURIComponent(environmentId)}/chains/aleo/prices?network=${encodeURIComponent(network)}`;
|
|
57
|
+
const headers = Object.assign({ 'Content-Type': 'application/json', 'x-dyn-request-id': randomString.randomString(50) }, getApiHeaders.getApiHeaders());
|
|
58
|
+
const jwt = getMinAuthToken.getMinAuthToken();
|
|
59
|
+
if (jwt) {
|
|
60
|
+
headers.Authorization = `Bearer ${jwt}`;
|
|
61
|
+
}
|
|
62
|
+
const response = yield utils.FetchService.fetch(url, {
|
|
63
|
+
headers,
|
|
64
|
+
method: 'GET',
|
|
65
|
+
});
|
|
66
|
+
if (!response.ok) {
|
|
67
|
+
throw new Error(`getAleoCuratedPrices: ${response.status} ${response.statusText}`);
|
|
68
|
+
}
|
|
69
|
+
const data = (yield response.json());
|
|
70
|
+
return (_c = (_b = data === null || data === void 0 ? void 0 : data.result) === null || _b === void 0 ? void 0 : _b.prices) !== null && _c !== void 0 ? _c : [];
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
exports.getAleoCuratedPrices = getAleoCuratedPrices;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Single entry returned by the redcoast `/chains/aleo/prices` endpoint.
|
|
3
|
+
* Wallet-facing keys mirror the multichain balance shape (`address`,
|
|
4
|
+
* `isNative`, `price`) so consumers can join with `unshieldedTokenBalances`
|
|
5
|
+
* on `(address, isNative)` without a translation layer.
|
|
6
|
+
*/
|
|
7
|
+
export type AleoCuratedTokenPrice = {
|
|
8
|
+
address: string;
|
|
9
|
+
isNative: boolean;
|
|
10
|
+
symbol: string;
|
|
11
|
+
/**
|
|
12
|
+
* CoinGecko id used for the lookup. Echoed back so consumers can
|
|
13
|
+
* confirm which pricing source was used.
|
|
14
|
+
*/
|
|
15
|
+
tokenId: string | null;
|
|
16
|
+
/**
|
|
17
|
+
* USD price per whole token unit, or `null` when the pricing source
|
|
18
|
+
* has no current price (token is unranked / cache empty). Render an
|
|
19
|
+
* empty cell rather than treating `null` as `0`.
|
|
20
|
+
*/
|
|
21
|
+
price: number | null;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Fetch the curated Aleo token price list for the given network. The
|
|
25
|
+
* endpoint returns every curated token regardless of balance, so this
|
|
26
|
+
* works as the price source for the Shielded balance tab — which never
|
|
27
|
+
* goes through the multichain `/accountBalances` pipeline.
|
|
28
|
+
*
|
|
29
|
+
* Auth + base URL mirror the OpenAPI-generated `sdkApi`. We don't go
|
|
30
|
+
* through `sdkApi` here because this endpoint isn't in the OpenAPI
|
|
31
|
+
* surface yet; a manual fetch keeps the dynamic-auth side small and
|
|
32
|
+
* focused, and the auth token / device-fingerprint headers are still
|
|
33
|
+
* picked up via `getApiHeaders` + `getMinAuthToken`.
|
|
34
|
+
*/
|
|
35
|
+
export declare const getAleoCuratedPrices: ({ environmentId, network, }: {
|
|
36
|
+
environmentId: string;
|
|
37
|
+
network: 'mainnet' | 'testnet';
|
|
38
|
+
}) => Promise<AleoCuratedTokenPrice[]>;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
import { __awaiter } from '../../../../../_virtual/_tslib.js';
|
|
3
|
+
import { FetchService } from '@dynamic-labs/utils';
|
|
4
|
+
import '@dynamic-labs-sdk/client/core';
|
|
5
|
+
import '@dynamic-labs/sdk-api-core';
|
|
6
|
+
import 'react';
|
|
7
|
+
import 'eventemitter3';
|
|
8
|
+
import '@dynamic-labs-sdk/client';
|
|
9
|
+
import ApiEndpoint from '../../../config/ApiEndpoint.js';
|
|
10
|
+
import '@dynamic-labs/iconic';
|
|
11
|
+
import '@dynamic-labs/wallet-connector-core';
|
|
12
|
+
import 'react/jsx-runtime';
|
|
13
|
+
import '../../../context/ViewContext/ViewContext.js';
|
|
14
|
+
import '../../../shared/logger.js';
|
|
15
|
+
import '@dynamic-labs/wallet-book';
|
|
16
|
+
import '../../../utils/constants/colors.js';
|
|
17
|
+
import '../../../utils/constants/values.js';
|
|
18
|
+
import '../../../shared/consts/index.js';
|
|
19
|
+
import { getApiHeaders } from '../../../client/extension/hooks/useInitializeSdkClient/getApiHeaders/getApiHeaders.js';
|
|
20
|
+
import '../../../events/dynamicEvents.js';
|
|
21
|
+
import { getMinAuthToken } from '../../../client/extension/functions/getMinAuthToken/getMinAuthToken.js';
|
|
22
|
+
import '@dynamic-labs/multi-wallet';
|
|
23
|
+
import 'react-international-phone';
|
|
24
|
+
import '../../../store/state/nonce/nonce.js';
|
|
25
|
+
import { randomString } from '../../../utils/functions/randomString/randomString.js';
|
|
26
|
+
import '@dynamic-labs/locale';
|
|
27
|
+
import '../../../store/state/dynamicContextProps/dynamicContextProps.js';
|
|
28
|
+
import '../../../store/state/primaryWalletId/primaryWalletId.js';
|
|
29
|
+
import '../../../store/state/connectedWalletsInfo/connectedWalletsInfo.js';
|
|
30
|
+
import '../../../utils/functions/getWaasAddressTypeLabel/getWaasAddressTypeLabel.js';
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Fetch the curated Aleo token price list for the given network. The
|
|
34
|
+
* endpoint returns every curated token regardless of balance, so this
|
|
35
|
+
* works as the price source for the Shielded balance tab — which never
|
|
36
|
+
* goes through the multichain `/accountBalances` pipeline.
|
|
37
|
+
*
|
|
38
|
+
* Auth + base URL mirror the OpenAPI-generated `sdkApi`. We don't go
|
|
39
|
+
* through `sdkApi` here because this endpoint isn't in the OpenAPI
|
|
40
|
+
* surface yet; a manual fetch keeps the dynamic-auth side small and
|
|
41
|
+
* focused, and the auth token / device-fingerprint headers are still
|
|
42
|
+
* picked up via `getApiHeaders` + `getMinAuthToken`.
|
|
43
|
+
*/
|
|
44
|
+
const getAleoCuratedPrices = (_a) => __awaiter(void 0, [_a], void 0, function* ({ environmentId, network, }) {
|
|
45
|
+
var _b, _c;
|
|
46
|
+
const basePath = ApiEndpoint.getBaseUrl();
|
|
47
|
+
if (!basePath)
|
|
48
|
+
return [];
|
|
49
|
+
// `basePath` already includes the `/api/v0` prefix (set on the
|
|
50
|
+
// generated `Configuration().basePath`), so this path is just the
|
|
51
|
+
// relative SDK route.
|
|
52
|
+
const url = `${basePath}/sdk/${encodeURIComponent(environmentId)}/chains/aleo/prices?network=${encodeURIComponent(network)}`;
|
|
53
|
+
const headers = Object.assign({ 'Content-Type': 'application/json', 'x-dyn-request-id': randomString(50) }, getApiHeaders());
|
|
54
|
+
const jwt = getMinAuthToken();
|
|
55
|
+
if (jwt) {
|
|
56
|
+
headers.Authorization = `Bearer ${jwt}`;
|
|
57
|
+
}
|
|
58
|
+
const response = yield FetchService.fetch(url, {
|
|
59
|
+
headers,
|
|
60
|
+
method: 'GET',
|
|
61
|
+
});
|
|
62
|
+
if (!response.ok) {
|
|
63
|
+
throw new Error(`getAleoCuratedPrices: ${response.status} ${response.statusText}`);
|
|
64
|
+
}
|
|
65
|
+
const data = (yield response.json());
|
|
66
|
+
return (_c = (_b = data === null || data === void 0 ? void 0 : data.result) === null || _b === void 0 ? void 0 : _b.prices) !== null && _c !== void 0 ? _c : [];
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
export { getAleoCuratedPrices };
|
|
@@ -80,6 +80,8 @@ export { ReactComponent as LockIcon } from './lock.svg';
|
|
|
80
80
|
export { ReactComponent as LockedIcon } from './locked.svg';
|
|
81
81
|
export { ReactComponent as LogoutIcon } from './logout.svg';
|
|
82
82
|
export { ReactComponent as MailIcon } from './mail.svg';
|
|
83
|
+
export { ReactComponent as MidnightShieldedIcon } from './midnight-shielded.svg';
|
|
84
|
+
export { ReactComponent as MidnightUnshieldedIcon } from './midnight-unshielded.svg';
|
|
83
85
|
export { ReactComponent as MonitorAndDeviceIcon } from './monitor-and-device.svg';
|
|
84
86
|
export { ReactComponent as MonitorIcon } from './monitor.svg';
|
|
85
87
|
export { ReactComponent as MfaRecoveryIcon } from './mfa-recovery-icon.svg';
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
var React = require('react');
|
|
7
|
+
|
|
8
|
+
function _interopNamespace(e) {
|
|
9
|
+
if (e && e.__esModule) return e;
|
|
10
|
+
var n = Object.create(null);
|
|
11
|
+
if (e) {
|
|
12
|
+
Object.keys(e).forEach(function (k) {
|
|
13
|
+
if (k !== 'default') {
|
|
14
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
15
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
get: function () { return e[k]; }
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
n["default"] = e;
|
|
23
|
+
return Object.freeze(n);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
27
|
+
|
|
28
|
+
var _path;
|
|
29
|
+
var _excluded = ["title", "titleId"];
|
|
30
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
31
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
32
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
|
|
33
|
+
var SvgMidnightShielded = function SvgMidnightShielded(_ref) {
|
|
34
|
+
var title = _ref.title,
|
|
35
|
+
titleId = _ref.titleId,
|
|
36
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
37
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends({
|
|
38
|
+
width: 16,
|
|
39
|
+
height: 16,
|
|
40
|
+
viewBox: "0 0 13.333 13.118",
|
|
41
|
+
fill: "none",
|
|
42
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
43
|
+
"aria-labelledby": titleId
|
|
44
|
+
}, props), title ? /*#__PURE__*/React__namespace.createElement("title", {
|
|
45
|
+
id: titleId
|
|
46
|
+
}, title) : null, _path || (_path = /*#__PURE__*/React__namespace.createElement("path", {
|
|
47
|
+
fillRule: "evenodd",
|
|
48
|
+
clipRule: "evenodd",
|
|
49
|
+
d: "M6.222.17a.667.667 0 0 1 .89 0 7.304 7.304 0 0 0 5.266 1.858c.316-.017.6.192.68.498a8.67 8.67 0 0 1-6.224 10.571.668.668 0 0 1-.333 0A8.67 8.67 0 0 1 .276 2.527a.667.667 0 0 1 .68-.5A7.304 7.304 0 0 0 6.222.17Zm-4.768 3.2a7.337 7.337 0 0 0 5.212 8.392A7.337 7.337 0 0 0 11.88 3.37a8.63 8.63 0 0 1-5.212-1.835A8.63 8.63 0 0 1 1.454 3.37Zm7.684 1.529c.26.26.26.683 0 .943L6.471 8.509a.667.667 0 0 1-.942 0L4.195 7.175a.667.667 0 1 1 .943-.943L6 7.094 8.195 4.9c.26-.26.683-.26.943 0Z",
|
|
50
|
+
fill: "var(--fill-0, #ABACB2)"
|
|
51
|
+
})));
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
exports.ReactComponent = SvgMidnightShielded;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
|
|
4
|
+
var _path;
|
|
5
|
+
var _excluded = ["title", "titleId"];
|
|
6
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
7
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
8
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
|
|
9
|
+
var SvgMidnightShielded = function SvgMidnightShielded(_ref) {
|
|
10
|
+
var title = _ref.title,
|
|
11
|
+
titleId = _ref.titleId,
|
|
12
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
13
|
+
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
14
|
+
width: 16,
|
|
15
|
+
height: 16,
|
|
16
|
+
viewBox: "0 0 13.333 13.118",
|
|
17
|
+
fill: "none",
|
|
18
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
19
|
+
"aria-labelledby": titleId
|
|
20
|
+
}, props), title ? /*#__PURE__*/React.createElement("title", {
|
|
21
|
+
id: titleId
|
|
22
|
+
}, title) : null, _path || (_path = /*#__PURE__*/React.createElement("path", {
|
|
23
|
+
fillRule: "evenodd",
|
|
24
|
+
clipRule: "evenodd",
|
|
25
|
+
d: "M6.222.17a.667.667 0 0 1 .89 0 7.304 7.304 0 0 0 5.266 1.858c.316-.017.6.192.68.498a8.67 8.67 0 0 1-6.224 10.571.668.668 0 0 1-.333 0A8.67 8.67 0 0 1 .276 2.527a.667.667 0 0 1 .68-.5A7.304 7.304 0 0 0 6.222.17Zm-4.768 3.2a7.337 7.337 0 0 0 5.212 8.392A7.337 7.337 0 0 0 11.88 3.37a8.63 8.63 0 0 1-5.212-1.835A8.63 8.63 0 0 1 1.454 3.37Zm7.684 1.529c.26.26.26.683 0 .943L6.471 8.509a.667.667 0 0 1-.942 0L4.195 7.175a.667.667 0 1 1 .943-.943L6 7.094 8.195 4.9c.26-.26.683-.26.943 0Z",
|
|
26
|
+
fill: "var(--fill-0, #ABACB2)"
|
|
27
|
+
})));
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export { SvgMidnightShielded as ReactComponent };
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
var React = require('react');
|
|
7
|
+
|
|
8
|
+
function _interopNamespace(e) {
|
|
9
|
+
if (e && e.__esModule) return e;
|
|
10
|
+
var n = Object.create(null);
|
|
11
|
+
if (e) {
|
|
12
|
+
Object.keys(e).forEach(function (k) {
|
|
13
|
+
if (k !== 'default') {
|
|
14
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
15
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
get: function () { return e[k]; }
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
n["default"] = e;
|
|
23
|
+
return Object.freeze(n);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
27
|
+
|
|
28
|
+
var _path;
|
|
29
|
+
var _excluded = ["title", "titleId"];
|
|
30
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
31
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
32
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
|
|
33
|
+
var SvgMidnightUnshielded = function SvgMidnightUnshielded(_ref) {
|
|
34
|
+
var title = _ref.title,
|
|
35
|
+
titleId = _ref.titleId,
|
|
36
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
37
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends({
|
|
38
|
+
width: 16,
|
|
39
|
+
height: 16,
|
|
40
|
+
viewBox: "0 0 16 16",
|
|
41
|
+
fill: "none",
|
|
42
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
43
|
+
"aria-labelledby": titleId
|
|
44
|
+
}, props), title ? /*#__PURE__*/React__namespace.createElement("title", {
|
|
45
|
+
id: titleId
|
|
46
|
+
}, title) : null, _path || (_path = /*#__PURE__*/React__namespace.createElement("path", {
|
|
47
|
+
fillRule: "evenodd",
|
|
48
|
+
clipRule: "evenodd",
|
|
49
|
+
d: "M7.555 1.503a.667.667 0 0 1 .89 0 7.304 7.304 0 0 0 5.266 1.858c.317-.016.6.192.68.499A8.67 8.67 0 0 1 8.166 14.43a.666.666 0 0 1-.332 0A8.67 8.67 0 0 1 1.609 3.86a.667.667 0 0 1 .68-.5 7.304 7.304 0 0 0 5.267-1.858Zm-4.767 3.2A7.337 7.337 0 0 0 8 13.095a7.337 7.337 0 0 0 5.212-8.392A8.63 8.63 0 0 1 8 2.869a8.63 8.63 0 0 1-5.212 1.834Z",
|
|
50
|
+
fill: "var(--fill-0, #ABACB2)"
|
|
51
|
+
})));
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
exports.ReactComponent = SvgMidnightUnshielded;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
|
|
4
|
+
var _path;
|
|
5
|
+
var _excluded = ["title", "titleId"];
|
|
6
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
7
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
8
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
|
|
9
|
+
var SvgMidnightUnshielded = function SvgMidnightUnshielded(_ref) {
|
|
10
|
+
var title = _ref.title,
|
|
11
|
+
titleId = _ref.titleId,
|
|
12
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
13
|
+
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
14
|
+
width: 16,
|
|
15
|
+
height: 16,
|
|
16
|
+
viewBox: "0 0 16 16",
|
|
17
|
+
fill: "none",
|
|
18
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
19
|
+
"aria-labelledby": titleId
|
|
20
|
+
}, props), title ? /*#__PURE__*/React.createElement("title", {
|
|
21
|
+
id: titleId
|
|
22
|
+
}, title) : null, _path || (_path = /*#__PURE__*/React.createElement("path", {
|
|
23
|
+
fillRule: "evenodd",
|
|
24
|
+
clipRule: "evenodd",
|
|
25
|
+
d: "M7.555 1.503a.667.667 0 0 1 .89 0 7.304 7.304 0 0 0 5.266 1.858c.317-.016.6.192.68.499A8.67 8.67 0 0 1 8.166 14.43a.666.666 0 0 1-.332 0A8.67 8.67 0 0 1 1.609 3.86a.667.667 0 0 1 .68-.5 7.304 7.304 0 0 0 5.267-1.858Zm-4.767 3.2A7.337 7.337 0 0 0 8 13.095a7.337 7.337 0 0 0 5.212-8.392A8.63 8.63 0 0 1 8 2.869a8.63 8.63 0 0 1-5.212 1.834Z",
|
|
26
|
+
fill: "var(--fill-0, #ABACB2)"
|
|
27
|
+
})));
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export { SvgMidnightUnshielded as ReactComponent };
|