aegis-swap-widget 0.15.0 → 0.16.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 +17 -0
- package/README.md +33 -1
- package/dist/{EngineTradeMarketChart-COTq5iKO.js → EngineTradeMarketChart-C7BVvoIQ.js} +1 -1
- package/dist/aegis-swap-widget.js +1 -1
- package/dist/{index-B0agjrrs.js → index-Ct0upRU8.js} +11791 -11753
- package/dist/styles.css +1 -1
- package/dist/widget/engine-controller/enginePositionManageCopy.d.ts +1 -0
- package/dist/widget/engine-controller/useEnginePositionActions.d.ts +14 -1
- package/dist/widget/engine-ui/EngineManageHealthPreview.d.ts +3 -2
- package/dist/widget/engine-ui/EnginePositionsPanel.d.ts +4 -2
- package/dist/widget/engine-ui/EngineTransactionReceipt.d.ts +1 -1
- package/dist/widget/useEngineController.d.ts +1 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.16.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 4af9f9c: Open action-specific loan and deposit reviews from live positions without authorizing or submitting. Reuse quoted Engine state for ordinary-loan collateral and repayment previews, qualify missing NFT valuation, and keep fresh position review controls usable while balances refresh.
|
|
8
|
+
|
|
9
|
+
Show withdrawal guidance only when the live market and position can support its review. Start collateral withdrawal on a funded idle token, explain balance versus collateral-risk bounds, distinguish confirmed transactions from delayed position data, and label receipt-gas costs as execution fees.
|
|
10
|
+
|
|
11
|
+
- b235549: Breaking: `AggregatedSwapQuote.priceImpact` is now `number | null` (was `number`). Consumers that call methods on it (for example `quote.priceImpact.toFixed()`), including Widget onQuote callback handlers, must handle `null` first. An omitted provider impact is preserved as null instead of inventing zero. Kyber routes, which report no impact field, now derive it from Kyber's amountInUsd/amountOutUsd with the Aegis output fee added back (covers market impact and pool fees; excludes the Aegis fee and gas) and stay null when those values are missing or zero; Ink routes report null. The Widget shows unknown impact as "Unavailable" with a warning tone while retaining explicit zero and existing nonzero tones.
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- e4d675e: Clear a previously displayed Aegis quote when a background refresh or fresh submit quote reports no Aegis route or rejects a non-Aegis leg. Show the unavailable state and disable swapping until a valid route returns, while retaining quotes during transient refresh failures.
|
|
16
|
+
- dd93234: Round borrowing limits down in the headline and limits ledger so compact token amounts never exceed the SDK's executable wallet, market or effective capacity.
|
|
17
|
+
- Updated dependencies [b235549]
|
|
18
|
+
- @aegis-engine/core@0.12.0
|
|
19
|
+
|
|
3
20
|
## 0.15.0
|
|
4
21
|
|
|
5
22
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -101,7 +101,8 @@ Simple Borrow shows the SDK's wallet/collateral limit separately from its market
|
|
|
101
101
|
limit in the Borrowing limit disclosure. Independently quoted limits can appear
|
|
102
102
|
before connecting; wallet-specific bounds remain unavailable until the wallet
|
|
103
103
|
balance is known. Custom Borrow shows the effective limit for the entered
|
|
104
|
-
collateral.
|
|
104
|
+
collateral. Numeric limit summaries round down so the displayed cap never exceeds
|
|
105
|
+
the SDK token bound. Its slider and Max action use the SDK token bound even when a dollar
|
|
105
106
|
price is unavailable; dollar-denominated room and health stay unavailable. Editing
|
|
106
107
|
the Custom borrow amount refreshes its
|
|
107
108
|
execution quote without repeating the collateral-capacity read. Simple Borrow
|
|
@@ -133,6 +134,37 @@ Hosts should preserve the mounted widget during an interaction and use
|
|
|
133
134
|
`onInteractionLockChange` to suspend conflicting navigation. Successful wallet
|
|
134
135
|
authorization does not mean the loan or deposit has been submitted or confirmed.
|
|
135
136
|
|
|
137
|
+
### Managing positions
|
|
138
|
+
|
|
139
|
+
The Positions surface offers Add collateral, Repay loan, Withdraw collateral,
|
|
140
|
+
Close loan and Withdraw deposit directly from the corresponding live position.
|
|
141
|
+
Each shortcut opens the existing manager with that action selected. Opening a
|
|
142
|
+
review does not authorize or submit it. Unavailable markets and missing live
|
|
143
|
+
position data do not expose these shortcuts. Loan and deposit shortcuts stay
|
|
144
|
+
available during a refresh while their previous live balances are still fresh;
|
|
145
|
+
the manager verifies action-specific readiness and refreshes its quote before execution.
|
|
146
|
+
|
|
147
|
+
Loan reviews reuse the current Engine state and the selected action to show
|
|
148
|
+
collateral and debt after the change, alongside the existing Engine risk preview.
|
|
149
|
+
Repayment uses the quote's projected state, never a proportional slider estimate.
|
|
150
|
+
When NFT collateral cannot be valued, the loan review labels its idle balances
|
|
151
|
+
as token collateral and withholds an incomplete total USD value.
|
|
152
|
+
Collateral withdrawal explains whether the current conservative bound is limited
|
|
153
|
+
by the Engine collateral requirement or by the position's token balance.
|
|
154
|
+
|
|
155
|
+
A deposit's displayed value is not a promise that it can all be withdrawn now.
|
|
156
|
+
The withdrawal manager reads current redeemable shares, supports a partial
|
|
157
|
+
selection, shows the minimum token outputs and checks liquidity again before
|
|
158
|
+
submission. A changed liquidity bound requires review instead of silently
|
|
159
|
+
shrinking the requested withdrawal.
|
|
160
|
+
|
|
161
|
+
Keep the transaction hash, chain receipt and refreshed position data distinct in
|
|
162
|
+
host UI. The widget's confirmation callback reports the receipt; the API/indexer
|
|
163
|
+
may catch up later. A confirmed transaction awaiting position data offers a
|
|
164
|
+
lookup retry, not another transaction. Pending hashes remain scoped to the
|
|
165
|
+
original wallet and chain across reloads; recovery checks the submitted
|
|
166
|
+
hash and does not reconstruct an executable intent from storage.
|
|
167
|
+
|
|
136
168
|
## Wolf Game Trade and Earn preset
|
|
137
169
|
|
|
138
170
|
The Wolf preset reproduces the focused gamer flow: a resource Store under
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as h, jsx as i, Fragment as Pe } from "react/jsx-runtime";
|
|
2
2
|
import * as E from "react";
|
|
3
3
|
import { useState as H, useEffect as ue, useRef as F, useId as kt, useMemo as ce } from "react";
|
|
4
|
-
import { E as St, u as _t, a as Ye, b as $t, c as Ft, d as Pt, e as Ot, F as mt, f as gt, g as ft, C as Ut, h as Ht, i as pt, j as Vt } from "./index-
|
|
4
|
+
import { E as St, u as _t, a as Ye, b as $t, c as Ft, d as Pt, e as Ot, F as mt, f as gt, g as ft, C as Ut, h as Ht, i as pt, j as Vt } from "./index-Ct0upRU8.js";
|
|
5
5
|
import { enginePoolPriceSegments as Xt, splitEngineMarketCandleSegments as Yt, fetchTokenPriceHistory as jt } from "@aegis-engine/core";
|
|
6
6
|
import { m as Wt } from "./marketOrientation-B6SD7xSk.js";
|
|
7
7
|
function qt({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as s, k as i, l as o, m as n, n as r, o as t, p as A, q as E, r as g, s as u, t as S, S as _, v as c, k as m, w as l, x as P, y as p, z as d, B as W } from "./index-
|
|
1
|
+
import { A as s, k as i, l as o, m as n, n as r, o as t, p as A, q as E, r as g, s as u, t as S, S as _, v as c, k as m, w as l, x as P, y as p, z as d, B as W } from "./index-Ct0upRU8.js";
|
|
2
2
|
import { u as R, a as T, b as G, c as I, d as O, e as L, f as x, g as D } from "./useEngineActivity-BkhItrUI.js";
|
|
3
3
|
import { WOLF_GAME_ENGINE_WIDGET_PRESET as k, WOLF_GAME_RESOURCES as v, WOLF_GAME_RESOURCE_ORDER as w, resolveWolfGameResource as M, wolfGameResourceWidgetProps as y } from "./presets/wolf-game.js";
|
|
4
4
|
import { normalizePartnerActionRequirement as N, normalizePartnerResourceAmount as z, partnerLaunchIntentForRequirement as C, partnerResourceAssetKey as U } from "./partner-context.js";
|