@stakekit/widget 0.0.288 → 0.0.289
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/bundle/index.bundle.css +1 -1
- package/dist/bundle/index.bundle.js +77 -77
- package/dist/package/index.package.css +10 -10
- package/dist/package/index.package.js +250 -147
- package/dist/types/generated/api/yield-schema.d.ts +16 -18
- package/dist/website/assets/index-BYTj9y8r.js +592 -0
- package/dist/website/assets/{index-B_e-5cjt.css → index-m2lpHJ_u.css} +1 -1
- package/dist/website/index.html +2 -2
- package/package.json +1 -1
- package/dist/website/assets/index-Ifmhd5nI.js +0 -592
|
@@ -20408,7 +20408,10 @@ var ArgumentFieldDto = Struct({
|
|
|
20408
20408
|
description: "Reference to API endpoint that provides options dynamically",
|
|
20409
20409
|
examples: ["/api/v1/validators?integrationId=eth-lido"]
|
|
20410
20410
|
})),
|
|
20411
|
-
default: optionalKey(
|
|
20411
|
+
default: optionalKey(Json.annotate({
|
|
20412
|
+
expected: "JSON value",
|
|
20413
|
+
description: "Default value for the field"
|
|
20414
|
+
})),
|
|
20412
20415
|
placeholder: optionalKey(String$1.annotate({ description: "Placeholder text for the field" })),
|
|
20413
20416
|
minimum: optionalKey(Union([String$1, Null]).annotate({
|
|
20414
20417
|
description: "Minimum allowed value for number fields (null if no minimum)",
|
|
@@ -24659,6 +24662,7 @@ var tokenString = (token) => {
|
|
|
24659
24662
|
return `${token.network}-${token.symbol}-${identityAddress(token)}`;
|
|
24660
24663
|
};
|
|
24661
24664
|
var equalTokens = (a, b) => tokenString(a) === tokenString(b);
|
|
24665
|
+
var getTokenArgumentAddress = (token) => token.address ?? "0x";
|
|
24662
24666
|
//#endregion
|
|
24663
24667
|
//#region src/domain/earn/contract.ts
|
|
24664
24668
|
var DashboardYieldCategory = {
|
|
@@ -24918,6 +24922,55 @@ var isEthenaUsdeStaking = (yieldId) => yieldId === "ethena-usde-staking";
|
|
|
24918
24922
|
var isBittensorStaking = (yieldId) => yieldId === "bittensor-native-staking";
|
|
24919
24923
|
var zeroRewardRateYieldIdWhitelist = /* @__PURE__ */ new Set(["optimism-usdc-gtusdcb-0x4ffc4e5f1f1f5c43dc9bc27b53728da13b02be35-4626-vault"]);
|
|
24920
24924
|
var isNonZeroRewardRateYield = (yieldDto) => yieldDto.rewardRate.total.isGreaterThan(0) || zeroRewardRateYieldIdWhitelist.has(yieldDto.id);
|
|
24925
|
+
/**
|
|
24926
|
+
* Yields closed to deposits (`status.enter: false`) that stay visible while
|
|
24927
|
+
* their investment schedule pauses deposits. Entry remains disabled for them.
|
|
24928
|
+
*/
|
|
24929
|
+
var displayOnlyYields = {
|
|
24930
|
+
"base-usdc-midas-mglo-vault": {
|
|
24931
|
+
network: "base",
|
|
24932
|
+
yieldType: "real_world_asset"
|
|
24933
|
+
},
|
|
24934
|
+
"robinhood-usdg-midas-mglo-vault": {
|
|
24935
|
+
network: "robinhood",
|
|
24936
|
+
yieldType: "real_world_asset"
|
|
24937
|
+
},
|
|
24938
|
+
"ethereum-usdc-midas-mglobal-vault": {
|
|
24939
|
+
network: "ethereum",
|
|
24940
|
+
yieldType: "real_world_asset"
|
|
24941
|
+
}
|
|
24942
|
+
};
|
|
24943
|
+
var isYieldVisible = (yieldDto) => yieldDto.status.enter || Object.hasOwn(displayOnlyYields, yieldDto.id);
|
|
24944
|
+
/**
|
|
24945
|
+
* API yield types that can hold a display-only yield within a token-catalog
|
|
24946
|
+
* scope; empty when the scope cannot contain one.
|
|
24947
|
+
*/
|
|
24948
|
+
var getDisplayOnlyYieldTypes = (scope) => [...new Set(Object.values(displayOnlyYields).filter(({ network, yieldType }) => (!scope.network || scope.network === network) && (!scope.yieldTypes || scope.yieldTypes.includes(yieldType))).map(({ yieldType }) => yieldType))];
|
|
24949
|
+
/**
|
|
24950
|
+
* Adds the display-only yields found among all offered yields to the
|
|
24951
|
+
* enterable token options, appending tokens that only offer such yields.
|
|
24952
|
+
*/
|
|
24953
|
+
var withDisplayOnlyYields = (enterable, offered) => {
|
|
24954
|
+
const options = [...enterable];
|
|
24955
|
+
for (const offeredOption of offered) {
|
|
24956
|
+
const displayOnly = offeredOption.availableYields.filter((id) => Object.hasOwn(displayOnlyYields, id));
|
|
24957
|
+
if (displayOnly.length === 0) continue;
|
|
24958
|
+
const index = options.findIndex((option) => equalTokens(option.token, offeredOption.token));
|
|
24959
|
+
const option = options[index];
|
|
24960
|
+
if (!option) {
|
|
24961
|
+
options.push({
|
|
24962
|
+
...offeredOption,
|
|
24963
|
+
availableYields: displayOnly
|
|
24964
|
+
});
|
|
24965
|
+
continue;
|
|
24966
|
+
}
|
|
24967
|
+
options[index] = {
|
|
24968
|
+
...option,
|
|
24969
|
+
availableYields: [...option.availableYields, ...displayOnly.filter((id) => !option.availableYields.includes(id))]
|
|
24970
|
+
};
|
|
24971
|
+
}
|
|
24972
|
+
return options;
|
|
24973
|
+
};
|
|
24921
24974
|
//#endregion
|
|
24922
24975
|
//#region src/public-api/theme.ts
|
|
24923
24976
|
var themeContract = {
|
|
@@ -25778,7 +25831,10 @@ var IntegrationMetadataDto = Struct({
|
|
|
25778
25831
|
})
|
|
25779
25832
|
}).annotate({ identifier: "IntegrationMetadataDto" });
|
|
25780
25833
|
var ArgumentSchemaDto = Struct({
|
|
25781
|
-
type: optionalKey(
|
|
25834
|
+
type: optionalKey(String$1.annotate({
|
|
25835
|
+
description: "Schema type",
|
|
25836
|
+
examples: ["object"]
|
|
25837
|
+
})),
|
|
25782
25838
|
properties: optionalKey(Record(String$1, Json.annotate({ expected: "JSON value" })).annotate({
|
|
25783
25839
|
description: "Schema properties (fields)",
|
|
25784
25840
|
examples: [{
|
|
@@ -25802,10 +25858,16 @@ var ArgumentSchemaDto = Struct({
|
|
|
25802
25858
|
"amount"
|
|
25803
25859
|
]]
|
|
25804
25860
|
})),
|
|
25805
|
-
additionalProperties: optionalKey(
|
|
25861
|
+
additionalProperties: optionalKey(Json.annotate({
|
|
25862
|
+
expected: "JSON value",
|
|
25863
|
+
description: "Allow additional properties"
|
|
25864
|
+
})),
|
|
25806
25865
|
items: optionalKey(Record(String$1, Json.annotate({ expected: "JSON value" })).annotate({ description: "Array items schema" })),
|
|
25807
25866
|
enum: optionalKey(ArraySchema(String$1).annotate({ description: "Enum values" })),
|
|
25808
|
-
default: optionalKey(
|
|
25867
|
+
default: optionalKey(Json.annotate({
|
|
25868
|
+
expected: "JSON value",
|
|
25869
|
+
description: "Default value"
|
|
25870
|
+
})),
|
|
25809
25871
|
notes: optionalKey(String$1.annotate({
|
|
25810
25872
|
description: "Notes about this action schema",
|
|
25811
25873
|
examples: ["Supply assets to earn interest and optionally use as collateral for borrowing."]
|
|
@@ -30901,7 +30963,7 @@ var layer = /*#__PURE__*/ layerMergedContext(/*#__PURE__*/ succeed$4(/* @__PURE_
|
|
|
30901
30963
|
})));
|
|
30902
30964
|
//#endregion
|
|
30903
30965
|
//#region package.json
|
|
30904
|
-
var version$1 = "0.0.
|
|
30966
|
+
var version$1 = "0.0.289";
|
|
30905
30967
|
//#endregion
|
|
30906
30968
|
//#region src/generated/api/borrow-client.ts
|
|
30907
30969
|
var make$2 = (httpClient, options = {}) => {
|
|
@@ -34687,7 +34749,6 @@ var translations_default$1 = {
|
|
|
34687
34749
|
},
|
|
34688
34750
|
"failed": "Failed",
|
|
34689
34751
|
"status": {
|
|
34690
|
-
"action-required": "Action required",
|
|
34691
34752
|
"canceled": "Canceled",
|
|
34692
34753
|
"completed": "Completed",
|
|
34693
34754
|
"created": "Created",
|
|
@@ -35645,7 +35706,6 @@ var localResources = {
|
|
|
35645
35706
|
},
|
|
35646
35707
|
"failed": "Échec",
|
|
35647
35708
|
"status": {
|
|
35648
|
-
"action-required": "Action requise",
|
|
35649
35709
|
"canceled": "Annulée",
|
|
35650
35710
|
"completed": "Terminée",
|
|
35651
35711
|
"created": "Créée",
|
|
@@ -61537,7 +61597,6 @@ var ActionStatus = {
|
|
|
61537
61597
|
SUCCESS: "SUCCESS",
|
|
61538
61598
|
STALE: "STALE"
|
|
61539
61599
|
};
|
|
61540
|
-
var NATIVE_TOKEN_PLACEHOLDER = "0x";
|
|
61541
61600
|
var toLower = (value) => value.toLowerCase();
|
|
61542
61601
|
var getActionInputToken = ({ actionDto, inputToken, yieldDto }) => {
|
|
61543
61602
|
if (inputToken) return inputToken;
|
|
@@ -61546,7 +61605,7 @@ var getActionInputToken = ({ actionDto, inputToken, yieldDto }) => {
|
|
|
61546
61605
|
if (!inputTokenValue) return yieldDto.token ?? yieldDto.tokens?.[0];
|
|
61547
61606
|
const needle = toLower(inputTokenValue);
|
|
61548
61607
|
return [yieldDto.token, ...yieldDto.tokens ?? []].find((token) => {
|
|
61549
|
-
return (token.address ? toLower(token.address) : null) === needle || token.symbol.toLowerCase() === needle || needle ===
|
|
61608
|
+
return (token.address ? toLower(token.address) : null) === needle || token.symbol.toLowerCase() === needle || needle === "0x" && !token.address;
|
|
61550
61609
|
}) ?? yieldDto.token ?? yieldDto.tokens?.[0];
|
|
61551
61610
|
};
|
|
61552
61611
|
var getActionValidatorAddresses = (actionDto) => actionDto.rawArguments?.validatorAddresses ?? (actionDto.rawArguments?.validatorAddress ? [actionDto.rawArguments.validatorAddress] : null);
|
|
@@ -62758,6 +62817,17 @@ var resolvePositionDetailsActionCapabilities = (val) => ({
|
|
|
62758
62817
|
});
|
|
62759
62818
|
var positionDetailsPendingHasContent = (val) => !!val.pendingActions?.length;
|
|
62760
62819
|
var positionDetailsHubHasContent = (val) => positionDetailsStakeHasContent(val) || val.canUnstake || positionDetailsPendingHasContent(val);
|
|
62820
|
+
/**
|
|
62821
|
+
* An active flow (stake, unstake, pending action) keeps its pane even when the
|
|
62822
|
+
* position disappears: exiting everything removes the position while the flow
|
|
62823
|
+
* still has steps or its completion screen to show.
|
|
62824
|
+
*/
|
|
62825
|
+
var resolvePositionDetailsPageLayout = ({ flowActive, integrationData, isLoading, positionBalancesByType, positionLost }) => {
|
|
62826
|
+
if (flowActive || isLoading) return "Actions";
|
|
62827
|
+
if (positionLost) return "PositionLost";
|
|
62828
|
+
if (integrationData && positionBalancesByType) return "Actions";
|
|
62829
|
+
return "InfoOnly";
|
|
62830
|
+
};
|
|
62761
62831
|
//#endregion
|
|
62762
62832
|
//#region src/app/runtime/deep-link-coordinator.ts
|
|
62763
62833
|
var pendingActionClaimKey = (intent) => {
|
|
@@ -70208,7 +70278,7 @@ var multiYieldsAtom = family((key) => enrichedYieldDirectoryResourceAtom.foregro
|
|
|
70208
70278
|
var visibleMultiYieldsAtom = family((key) => make$9((get) => {
|
|
70209
70279
|
const connectedNetwork = get(walletConnectedNetworkAtom);
|
|
70210
70280
|
return get(multiYieldsAtom(key)).pipe(map$2((yields) => yields?.filter((yieldModel) => {
|
|
70211
|
-
return yieldModel
|
|
70281
|
+
return isYieldVisible(yieldModel) && isWalletNetwork(yieldModel.token.network) && (connectedNetwork === null || connectedNetwork === yieldModel.token.network);
|
|
70212
70282
|
}) ?? null));
|
|
70213
70283
|
}));
|
|
70214
70284
|
var multiYieldsByIdAtom = family((key) => multiYieldsAtom(key).pipe(mapResult((yields) => new Map((yields ?? []).map((yieldModel) => [yieldModel.id, yieldModel])))));
|
|
@@ -72170,11 +72240,26 @@ var EarnTokenCatalogKey = class extends TaggedClass("EarnTokenCatalogKey") {};
|
|
|
72170
72240
|
var EarnTokenCatalogError = class extends TaggedError("EarnTokenCatalogError") {};
|
|
72171
72241
|
var earnTokenCatalogPolicy = withApiResourcePolicy({ staleTime: minutes(5) });
|
|
72172
72242
|
var earnTokenCatalogResourceAtom = makePresentableResourceFamily(family((key) => appRuntime.atom(() => gen(function* () {
|
|
72173
|
-
|
|
72243
|
+
const source = yield* LegacyResourceSource;
|
|
72244
|
+
const network = key.network ?? void 0;
|
|
72245
|
+
const yieldTypes = key.category ? getApiYieldTypesForDashboardCategory(key.category) : void 0;
|
|
72246
|
+
const displayOnlyYieldTypes = getDisplayOnlyYieldTypes({
|
|
72247
|
+
network,
|
|
72248
|
+
yieldTypes
|
|
72249
|
+
});
|
|
72250
|
+
const offered = displayOnlyYieldTypes.length === 0 ? succeed$4([]) : source.getTokenOptions({
|
|
72251
|
+
network,
|
|
72252
|
+
yieldTypes: displayOnlyYieldTypes
|
|
72253
|
+
}).pipe(catch_((cause) => logWarning("Display-only yields unavailable").pipe(annotateLogs({
|
|
72254
|
+
cause,
|
|
72255
|
+
event: "earn_display_only_yields_degraded"
|
|
72256
|
+
}), as([]))));
|
|
72257
|
+
const [enterableTokens, offeredTokens] = yield* all$1([source.getTokenOptions({
|
|
72174
72258
|
enter: true,
|
|
72175
|
-
network
|
|
72176
|
-
yieldTypes
|
|
72177
|
-
}).pipe(mapError$1((cause) => new EarnTokenCatalogError({ cause })));
|
|
72259
|
+
network,
|
|
72260
|
+
yieldTypes
|
|
72261
|
+
}).pipe(mapError$1((cause) => new EarnTokenCatalogError({ cause }))), offered], { concurrency: "unbounded" });
|
|
72262
|
+
return withDisplayOnlyYields(enterableTokens, offeredTokens);
|
|
72178
72263
|
})).pipe(earnTokenCatalogPolicy, withLabel("earnTokenCatalogResourceAtom"))));
|
|
72179
72264
|
//#endregion
|
|
72180
72265
|
//#region src/resources/validator-directory/validator-directory.ts
|
|
@@ -72593,7 +72678,7 @@ var resolveYieldOptions = ({ selectedToken, yieldsById }) => {
|
|
|
72593
72678
|
const availableYields = new Set(selectedToken.availableYields);
|
|
72594
72679
|
return yieldsById.filter((yieldOption) => availableYields.has(yieldOption.id) && canShowYieldOption(yieldOption));
|
|
72595
72680
|
};
|
|
72596
|
-
var canShowYieldOption = (yieldOption) => yieldOption
|
|
72681
|
+
var canShowYieldOption = (yieldOption) => isYieldVisible(yieldOption) && isWalletNetwork(yieldOption.token.network);
|
|
72597
72682
|
var resolveYield = ({ entry, previousYield, selectedYieldId, selectedToken, yieldOptions }) => {
|
|
72598
72683
|
if (selectedYieldId) {
|
|
72599
72684
|
const selected = findYieldById(yieldOptions, selectedYieldId);
|
|
@@ -72622,7 +72707,7 @@ var resolveYield = ({ entry, previousYield, selectedYieldId, selectedToken, yiel
|
|
|
72622
72707
|
return getDefaultYield(yieldOptions);
|
|
72623
72708
|
};
|
|
72624
72709
|
var findYieldById = (yieldOptions, yieldId) => yieldOptions.find((yieldOption) => yieldOption.id.toLowerCase() === yieldId.toLowerCase()) ?? null;
|
|
72625
|
-
var getDefaultYield = (yieldOptions) => yieldOptions.find(isNonZeroRewardRateYield) ?? yieldOptions[0] ?? null;
|
|
72710
|
+
var getDefaultYield = (yieldOptions) => yieldOptions.find((yieldOption) => yieldOption.status.enter && isNonZeroRewardRateYield(yieldOption)) ?? yieldOptions.find((yieldOption) => yieldOption.status.enter) ?? yieldOptions[0] ?? null;
|
|
72626
72711
|
var getPreferredYieldId = ({ preferredTokenYieldsPerNetwork, selectedToken }) => {
|
|
72627
72712
|
const tokenKey = tokenString(selectedToken.token);
|
|
72628
72713
|
const network = selectedToken.token.network;
|
|
@@ -73051,6 +73136,7 @@ var earnSelectionViewAtom$1 = make$9((context) => context.get(earnSelectionProje
|
|
|
73051
73136
|
var makeYieldEntryActionCommand = ({ entry, wallet }) => {
|
|
73052
73137
|
const selectedYield = entry.yield;
|
|
73053
73138
|
if (!wallet.address || !selectedYield || !entry.token) return null;
|
|
73139
|
+
if (!selectedYield.status.enter) return null;
|
|
73054
73140
|
if (Boolean(getYieldActionArg(selectedYield, "enter", "providerId")?.required) && !entry.selectedProviderYieldId) return null;
|
|
73055
73141
|
const validators = [...entry.validators.values()];
|
|
73056
73142
|
const validatorArguments = (() => {
|
|
@@ -73074,7 +73160,7 @@ var makeYieldEntryActionCommand = ({ entry, wallet }) => {
|
|
|
73074
73160
|
yieldId: selectedYield.id,
|
|
73075
73161
|
arguments: {
|
|
73076
73162
|
amount: executableAmount.toFixed(),
|
|
73077
|
-
|
|
73163
|
+
inputToken: getTokenArgumentAddress(entry.token),
|
|
73078
73164
|
...wallet.isLedgerLive ? { ledgerWalletApiCompatible: true } : {},
|
|
73079
73165
|
...entry.tronResource ? { tronResource: entry.tronResource } : {},
|
|
73080
73166
|
...entry.useMaxAmount ? { useMaxAmount: true } : {},
|
|
@@ -90785,11 +90871,12 @@ var getActivityDirection = (type) => {
|
|
|
90785
90871
|
case "DELEGATE": return "neutral";
|
|
90786
90872
|
}
|
|
90787
90873
|
};
|
|
90874
|
+
/** Waiting actions show no badge: the user may have continued elsewhere. */
|
|
90788
90875
|
var projectActivityStatusLabel = (action, presentationTime) => {
|
|
90789
90876
|
switch (action.status) {
|
|
90790
90877
|
case ActionStatus.SUCCESS: return "completed";
|
|
90791
90878
|
case ActionStatus.FAILED: return "failed";
|
|
90792
|
-
case ActionStatus.WAITING_FOR_NEXT: return presentationTime && !isContinuableYieldAction(action, presentationTime.now) ? "expired" :
|
|
90879
|
+
case ActionStatus.WAITING_FOR_NEXT: return presentationTime && !isContinuableYieldAction(action, presentationTime.now) ? "expired" : null;
|
|
90793
90880
|
case ActionStatus.CANCELED: return "canceled";
|
|
90794
90881
|
case ActionStatus.CREATED: return "created";
|
|
90795
90882
|
case ActionStatus.PROCESSING: return "processing";
|
|
@@ -91073,17 +91160,16 @@ var page = "fyuxtt0";
|
|
|
91073
91160
|
var header = "fyuxtt1";
|
|
91074
91161
|
var heading = "fyuxtt2";
|
|
91075
91162
|
var badgeMuted = "fyuxtt5 fyuxtt4 fyuxtt3 _1irym63v";
|
|
91076
|
-
var
|
|
91077
|
-
var
|
|
91078
|
-
var
|
|
91079
|
-
var
|
|
91080
|
-
var
|
|
91081
|
-
var
|
|
91082
|
-
var
|
|
91083
|
-
var
|
|
91084
|
-
var
|
|
91085
|
-
var
|
|
91086
|
-
var back = "fyuxtti";
|
|
91163
|
+
var amount = "fyuxtt6";
|
|
91164
|
+
var rows = "fyuxtt7";
|
|
91165
|
+
var row = "fyuxtt8";
|
|
91166
|
+
var rowValue = "fyuxtt9";
|
|
91167
|
+
var transactions = "fyuxtta";
|
|
91168
|
+
var transaction = "fyuxttb";
|
|
91169
|
+
var transactionTop = "fyuxttc";
|
|
91170
|
+
var explorerButton = "fyuxttd";
|
|
91171
|
+
var unavailable$1 = "fyuxttf fyuxtte _1irym6343";
|
|
91172
|
+
var back = "fyuxttg";
|
|
91087
91173
|
//#endregion
|
|
91088
91174
|
//#region src/features/activity/ui/activity-details/activity-details.page.tsx
|
|
91089
91175
|
var reviewPageByIntent = {
|
|
@@ -91227,51 +91313,39 @@ var ContinuationControls = () => {
|
|
|
91227
91313
|
return t9;
|
|
91228
91314
|
};
|
|
91229
91315
|
var StatusBadge = (t0) => {
|
|
91230
|
-
const $ = (0, import_compiler_runtime.c)(
|
|
91316
|
+
const $ = (0, import_compiler_runtime.c)(6);
|
|
91231
91317
|
const { status } = t0;
|
|
91232
91318
|
const { t } = useTranslation();
|
|
91233
|
-
|
|
91234
|
-
|
|
91235
|
-
|
|
91236
|
-
let t3;
|
|
91237
|
-
if ($[0] !== t2) {
|
|
91238
|
-
t3 = {
|
|
91319
|
+
let t1;
|
|
91320
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
91321
|
+
t1 = {
|
|
91239
91322
|
size: "small",
|
|
91240
|
-
type:
|
|
91323
|
+
type: "muted",
|
|
91241
91324
|
weight: "medium"
|
|
91242
91325
|
};
|
|
91243
|
-
$[0] =
|
|
91244
|
-
|
|
91245
|
-
|
|
91246
|
-
|
|
91247
|
-
|
|
91248
|
-
|
|
91249
|
-
|
|
91250
|
-
$[2] =
|
|
91251
|
-
$[3] =
|
|
91252
|
-
|
|
91253
|
-
|
|
91254
|
-
|
|
91255
|
-
|
|
91256
|
-
|
|
91257
|
-
|
|
91258
|
-
|
|
91259
|
-
|
|
91260
|
-
|
|
91261
|
-
$[6] = t5;
|
|
91262
|
-
$[7] = t6;
|
|
91263
|
-
} else t6 = $[7];
|
|
91264
|
-
let t7;
|
|
91265
|
-
if ($[8] !== t1 || $[9] !== t6) {
|
|
91266
|
-
t7 = /* @__PURE__ */ jsx(Box, {
|
|
91267
|
-
className: t1,
|
|
91268
|
-
children: t6
|
|
91326
|
+
$[0] = t1;
|
|
91327
|
+
} else t1 = $[0];
|
|
91328
|
+
const t2 = `activity.status.${status}`;
|
|
91329
|
+
let t3;
|
|
91330
|
+
if ($[1] !== t || $[2] !== t2) {
|
|
91331
|
+
t3 = t(t2);
|
|
91332
|
+
$[1] = t;
|
|
91333
|
+
$[2] = t2;
|
|
91334
|
+
$[3] = t3;
|
|
91335
|
+
} else t3 = $[3];
|
|
91336
|
+
let t4;
|
|
91337
|
+
if ($[4] !== t3) {
|
|
91338
|
+
t4 = /* @__PURE__ */ jsx(Box, {
|
|
91339
|
+
className: badgeMuted,
|
|
91340
|
+
children: /* @__PURE__ */ jsx(Text$1, {
|
|
91341
|
+
variant: t1,
|
|
91342
|
+
children: t3
|
|
91343
|
+
})
|
|
91269
91344
|
});
|
|
91270
|
-
$[
|
|
91271
|
-
$[
|
|
91272
|
-
|
|
91273
|
-
|
|
91274
|
-
return t7;
|
|
91345
|
+
$[4] = t3;
|
|
91346
|
+
$[5] = t4;
|
|
91347
|
+
} else t4 = $[5];
|
|
91348
|
+
return t4;
|
|
91275
91349
|
};
|
|
91276
91350
|
var Receipt = (t0) => {
|
|
91277
91351
|
const $ = (0, import_compiler_runtime.c)(68);
|
|
@@ -91337,7 +91411,7 @@ var Receipt = (t0) => {
|
|
|
91337
91411
|
} else t5 = $[10];
|
|
91338
91412
|
let t6;
|
|
91339
91413
|
if ($[11] !== view.statusLabel) {
|
|
91340
|
-
t6 = /* @__PURE__ */ jsx(StatusBadge, { status: view.statusLabel });
|
|
91414
|
+
t6 = view.statusLabel ? /* @__PURE__ */ jsx(StatusBadge, { status: view.statusLabel }) : null;
|
|
91341
91415
|
$[11] = view.statusLabel;
|
|
91342
91416
|
$[12] = t6;
|
|
91343
91417
|
} else t6 = $[12];
|
|
@@ -137244,6 +137318,7 @@ var positionDetailsClassicViewAtom = family((key) => make$9((get) => {
|
|
|
137244
137318
|
kycGateIsChecking: exitResources.kyc.isChecking,
|
|
137245
137319
|
kycProviderName: exitResources.kyc.providerName,
|
|
137246
137320
|
personalizedRewardRate,
|
|
137321
|
+
positionLost: isSuccess(workflow.positionBalancesResult) && !workflow.positionBalancesResult.waiting && workflow.positionBalancesResult.value === null,
|
|
137247
137322
|
positionBalancesByType: workflow.positionBalancesByType,
|
|
137248
137323
|
providersDetails: providers,
|
|
137249
137324
|
reducedStakedOrLiquidBalance: workflow.reducedStakedOrLiquidBalance,
|
|
@@ -138817,8 +138892,8 @@ function _temp$18(detail) {
|
|
|
138817
138892
|
//#endregion
|
|
138818
138893
|
//#region src/features/position-details/ui/classic/position-details.page.tsx
|
|
138819
138894
|
var PositionDetails = () => {
|
|
138820
|
-
const $ = (0, import_compiler_runtime.c)(
|
|
138821
|
-
const { onPendingActionAmountChange, integrationData: integrationDataValue, isLoading, positionBalancesByType: positionBalancesByTypeValue, onPendingActionClick, pendingActions: pendingActionsValue, providersDetails, positionSource, shareToAmountConversions: shareToAmountConversionsValue, unstakeToken: unstakeTokenValue, personalizedRewardRate, apyCompositionRewardRate, apyCompositionShowsUpToCampaign } = usePositionDetails();
|
|
138895
|
+
const $ = (0, import_compiler_runtime.c)(23);
|
|
138896
|
+
const { onPendingActionAmountChange, integrationData: integrationDataValue, isLoading, positionBalancesByType: positionBalancesByTypeValue, onPendingActionClick, pendingActions: pendingActionsValue, positionLost, providersDetails, positionSource, shareToAmountConversions: shareToAmountConversionsValue, unstakeToken: unstakeTokenValue, personalizedRewardRate, apyCompositionRewardRate, apyCompositionShowsUpToCampaign } = usePositionDetails();
|
|
138822
138897
|
const t0 = integrationDataValue?.metadata.name;
|
|
138823
138898
|
let t1;
|
|
138824
138899
|
if ($[0] !== t0) {
|
|
@@ -138828,8 +138903,19 @@ var PositionDetails = () => {
|
|
|
138828
138903
|
} else t1 = $[1];
|
|
138829
138904
|
useTrackPage("positionDetails", t1);
|
|
138830
138905
|
const { t } = useTranslation();
|
|
138906
|
+
if (!isLoading && positionLost) {
|
|
138907
|
+
let t2;
|
|
138908
|
+
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
138909
|
+
t2 = /* @__PURE__ */ jsx(Navigate, {
|
|
138910
|
+
replace: true,
|
|
138911
|
+
to: "/positions"
|
|
138912
|
+
});
|
|
138913
|
+
$[2] = t2;
|
|
138914
|
+
} else t2 = $[2];
|
|
138915
|
+
return t2;
|
|
138916
|
+
}
|
|
138831
138917
|
let t2;
|
|
138832
|
-
if ($[
|
|
138918
|
+
if ($[3] !== isLoading) {
|
|
138833
138919
|
t2 = isLoading ? /* @__PURE__ */ jsx(Box, {
|
|
138834
138920
|
className: container$4,
|
|
138835
138921
|
display: "flex",
|
|
@@ -138837,11 +138923,11 @@ var PositionDetails = () => {
|
|
|
138837
138923
|
alignItems: "center",
|
|
138838
138924
|
children: /* @__PURE__ */ jsx(Spinner, {})
|
|
138839
138925
|
}) : null;
|
|
138840
|
-
$[
|
|
138841
|
-
$[
|
|
138842
|
-
} else t2 = $[
|
|
138926
|
+
$[3] = isLoading;
|
|
138927
|
+
$[4] = t2;
|
|
138928
|
+
} else t2 = $[4];
|
|
138843
138929
|
let t3;
|
|
138844
|
-
if ($[
|
|
138930
|
+
if ($[5] !== apyCompositionRewardRate || $[6] !== apyCompositionShowsUpToCampaign || $[7] !== integrationDataValue || $[8] !== isLoading || $[9] !== onPendingActionAmountChange || $[10] !== onPendingActionClick || $[11] !== pendingActionsValue || $[12] !== personalizedRewardRate || $[13] !== positionBalancesByTypeValue || $[14] !== positionSource || $[15] !== providersDetails || $[16] !== shareToAmountConversionsValue || $[17] !== t || $[18] !== unstakeTokenValue) {
|
|
138845
138931
|
t3 = !isLoading && integrationDataValue && positionBalancesByTypeValue ? /* @__PURE__ */ jsxs(Box, {
|
|
138846
138932
|
className: container$4,
|
|
138847
138933
|
flex: 1,
|
|
@@ -138983,29 +139069,29 @@ var PositionDetails = () => {
|
|
|
138983
139069
|
/* @__PURE__ */ jsx(PositionDetailsValidatorModal, {})
|
|
138984
139070
|
]
|
|
138985
139071
|
}) : null;
|
|
138986
|
-
$[
|
|
138987
|
-
$[
|
|
138988
|
-
$[
|
|
138989
|
-
$[
|
|
138990
|
-
$[
|
|
138991
|
-
$[
|
|
138992
|
-
$[
|
|
138993
|
-
$[
|
|
138994
|
-
$[
|
|
138995
|
-
$[
|
|
138996
|
-
$[
|
|
138997
|
-
$[
|
|
138998
|
-
$[
|
|
138999
|
-
$[
|
|
139000
|
-
$[
|
|
139001
|
-
} else t3 = $[
|
|
139072
|
+
$[5] = apyCompositionRewardRate;
|
|
139073
|
+
$[6] = apyCompositionShowsUpToCampaign;
|
|
139074
|
+
$[7] = integrationDataValue;
|
|
139075
|
+
$[8] = isLoading;
|
|
139076
|
+
$[9] = onPendingActionAmountChange;
|
|
139077
|
+
$[10] = onPendingActionClick;
|
|
139078
|
+
$[11] = pendingActionsValue;
|
|
139079
|
+
$[12] = personalizedRewardRate;
|
|
139080
|
+
$[13] = positionBalancesByTypeValue;
|
|
139081
|
+
$[14] = positionSource;
|
|
139082
|
+
$[15] = providersDetails;
|
|
139083
|
+
$[16] = shareToAmountConversionsValue;
|
|
139084
|
+
$[17] = t;
|
|
139085
|
+
$[18] = unstakeTokenValue;
|
|
139086
|
+
$[19] = t3;
|
|
139087
|
+
} else t3 = $[19];
|
|
139002
139088
|
let t4;
|
|
139003
|
-
if ($[
|
|
139089
|
+
if ($[20] !== t2 || $[21] !== t3) {
|
|
139004
139090
|
t4 = /* @__PURE__ */ jsx(AnimationPage, { children: /* @__PURE__ */ jsxs(PageContainer, { children: [t2, t3] }) });
|
|
139005
|
-
$[
|
|
139006
|
-
$[
|
|
139007
|
-
$[
|
|
139008
|
-
} else t4 = $[
|
|
139091
|
+
$[20] = t2;
|
|
139092
|
+
$[21] = t3;
|
|
139093
|
+
$[22] = t4;
|
|
139094
|
+
} else t4 = $[22];
|
|
139009
139095
|
return t4;
|
|
139010
139096
|
};
|
|
139011
139097
|
var PositionDetailsPage$1 = () => {
|
|
@@ -139732,34 +139818,51 @@ var PositionBreadcrumb = (t0) => {
|
|
|
139732
139818
|
} else t3 = $[5];
|
|
139733
139819
|
return t3;
|
|
139734
139820
|
};
|
|
139735
|
-
var positionDetailsPageShouldShowActionsPane = (positionDetails) => positionDetails.isLoading || !!positionDetails.integrationData && !!positionDetails.positionBalancesByType;
|
|
139736
139821
|
var PositionDetailsPageComponent = () => {
|
|
139737
|
-
const $ = (0, import_compiler_runtime.c)(
|
|
139822
|
+
const $ = (0, import_compiler_runtime.c)(22);
|
|
139738
139823
|
const { t } = useTranslation();
|
|
139739
139824
|
const positionDetails = usePositionDetails();
|
|
139740
|
-
|
|
139741
|
-
|
|
139742
|
-
|
|
139825
|
+
const flowSegment = useMatch("positions/:integrationId/:balanceId/:flow/*")?.params.flow;
|
|
139826
|
+
const t0 = flowSegment === "stake" || flowSegment === "unstake" || flowSegment === "pending-action";
|
|
139827
|
+
let t1;
|
|
139828
|
+
if ($[0] !== positionDetails || $[1] !== t0) {
|
|
139829
|
+
t1 = resolvePositionDetailsPageLayout({
|
|
139830
|
+
...positionDetails,
|
|
139831
|
+
flowActive: t0
|
|
139832
|
+
});
|
|
139743
139833
|
$[0] = positionDetails;
|
|
139744
139834
|
$[1] = t0;
|
|
139745
|
-
|
|
139746
|
-
|
|
139835
|
+
$[2] = t1;
|
|
139836
|
+
} else t1 = $[2];
|
|
139837
|
+
const layout = t1;
|
|
139838
|
+
if (layout === "PositionLost") {
|
|
139839
|
+
let t2;
|
|
139840
|
+
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
139841
|
+
t2 = /* @__PURE__ */ jsx(Navigate, {
|
|
139842
|
+
replace: true,
|
|
139843
|
+
to: "/positions"
|
|
139844
|
+
});
|
|
139845
|
+
$[3] = t2;
|
|
139846
|
+
} else t2 = $[3];
|
|
139847
|
+
return t2;
|
|
139848
|
+
}
|
|
139849
|
+
const shouldShowActions = layout === "Actions";
|
|
139747
139850
|
const positionName = positionDetails.integrationData?.metadata.name ?? null;
|
|
139748
|
-
let t1;
|
|
139749
|
-
if ($[2] !== t) {
|
|
139750
|
-
t1 = t("dashboard.split_view.actions");
|
|
139751
|
-
$[2] = t;
|
|
139752
|
-
$[3] = t1;
|
|
139753
|
-
} else t1 = $[3];
|
|
139754
139851
|
let t2;
|
|
139755
139852
|
if ($[4] !== t) {
|
|
139756
|
-
t2 = t("dashboard.split_view.
|
|
139853
|
+
t2 = t("dashboard.split_view.actions");
|
|
139757
139854
|
$[4] = t;
|
|
139758
139855
|
$[5] = t2;
|
|
139759
139856
|
} else t2 = $[5];
|
|
139760
139857
|
let t3;
|
|
139761
|
-
if ($[6] !==
|
|
139762
|
-
t3 =
|
|
139858
|
+
if ($[6] !== t) {
|
|
139859
|
+
t3 = t("dashboard.split_view.details");
|
|
139860
|
+
$[6] = t;
|
|
139861
|
+
$[7] = t3;
|
|
139862
|
+
} else t3 = $[7];
|
|
139863
|
+
let t4;
|
|
139864
|
+
if ($[8] !== positionName || $[9] !== shouldShowActions) {
|
|
139865
|
+
t4 = shouldShowActions ? /* @__PURE__ */ jsxs(PositionDetailsPane, {
|
|
139763
139866
|
kind: "actions",
|
|
139764
139867
|
children: [/* @__PURE__ */ jsx(PositionBreadcrumb, { positionName }), /* @__PURE__ */ jsx(Box, {
|
|
139765
139868
|
display: "flex",
|
|
@@ -139770,46 +139873,46 @@ var PositionDetailsPageComponent = () => {
|
|
|
139770
139873
|
children: /* @__PURE__ */ jsx(Outlet, {})
|
|
139771
139874
|
})]
|
|
139772
139875
|
}) : null;
|
|
139773
|
-
$[
|
|
139774
|
-
$[
|
|
139775
|
-
$[
|
|
139776
|
-
} else
|
|
139777
|
-
let t4;
|
|
139778
|
-
if ($[9] !== positionName || $[10] !== shouldShowActions) {
|
|
139779
|
-
t4 = shouldShowActions ? null : /* @__PURE__ */ jsx(PositionBreadcrumb, { positionName });
|
|
139780
|
-
$[9] = positionName;
|
|
139781
|
-
$[10] = shouldShowActions;
|
|
139782
|
-
$[11] = t4;
|
|
139783
|
-
} else t4 = $[11];
|
|
139876
|
+
$[8] = positionName;
|
|
139877
|
+
$[9] = shouldShowActions;
|
|
139878
|
+
$[10] = t4;
|
|
139879
|
+
} else t4 = $[10];
|
|
139784
139880
|
let t5;
|
|
139785
|
-
if ($[12]
|
|
139786
|
-
t5 = /* @__PURE__ */ jsx(
|
|
139787
|
-
$[
|
|
139788
|
-
|
|
139881
|
+
if ($[11] !== positionName || $[12] !== shouldShowActions) {
|
|
139882
|
+
t5 = shouldShowActions ? null : /* @__PURE__ */ jsx(PositionBreadcrumb, { positionName });
|
|
139883
|
+
$[11] = positionName;
|
|
139884
|
+
$[12] = shouldShowActions;
|
|
139885
|
+
$[13] = t5;
|
|
139886
|
+
} else t5 = $[13];
|
|
139789
139887
|
let t6;
|
|
139790
|
-
if ($[
|
|
139791
|
-
t6 = /* @__PURE__ */
|
|
139792
|
-
kind: "info",
|
|
139793
|
-
children: [t4, t5]
|
|
139794
|
-
});
|
|
139795
|
-
$[13] = t4;
|
|
139888
|
+
if ($[14] === Symbol.for("react.memo_cache_sentinel")) {
|
|
139889
|
+
t6 = /* @__PURE__ */ jsx(PositionDetailsInfo, {});
|
|
139796
139890
|
$[14] = t6;
|
|
139797
139891
|
} else t6 = $[14];
|
|
139798
139892
|
let t7;
|
|
139799
|
-
if ($[15] !==
|
|
139800
|
-
t7 = /* @__PURE__ */
|
|
139801
|
-
|
|
139802
|
-
|
|
139803
|
-
|
|
139804
|
-
|
|
139893
|
+
if ($[15] !== t5) {
|
|
139894
|
+
t7 = /* @__PURE__ */ jsxs(PositionDetailsPane, {
|
|
139895
|
+
kind: "info",
|
|
139896
|
+
children: [t5, t6]
|
|
139897
|
+
});
|
|
139898
|
+
$[15] = t5;
|
|
139899
|
+
$[16] = t7;
|
|
139900
|
+
} else t7 = $[16];
|
|
139901
|
+
let t8;
|
|
139902
|
+
if ($[17] !== t2 || $[18] !== t3 || $[19] !== t4 || $[20] !== t7) {
|
|
139903
|
+
t8 = /* @__PURE__ */ jsx(AnimationPage, { children: /* @__PURE__ */ jsx(SplitView, {
|
|
139904
|
+
primaryBarLabel: t2,
|
|
139905
|
+
secondaryBarLabel: t3,
|
|
139906
|
+
primary: t4,
|
|
139907
|
+
secondary: t7
|
|
139805
139908
|
}) });
|
|
139806
|
-
$[
|
|
139807
|
-
$[
|
|
139808
|
-
$[
|
|
139809
|
-
$[
|
|
139810
|
-
$[
|
|
139811
|
-
} else
|
|
139812
|
-
return
|
|
139909
|
+
$[17] = t2;
|
|
139910
|
+
$[18] = t3;
|
|
139911
|
+
$[19] = t4;
|
|
139912
|
+
$[20] = t7;
|
|
139913
|
+
$[21] = t8;
|
|
139914
|
+
} else t8 = $[21];
|
|
139915
|
+
return t8;
|
|
139813
139916
|
};
|
|
139814
139917
|
var PositionDetailsPage = () => {
|
|
139815
139918
|
const $ = (0, import_compiler_runtime.c)(1);
|