aegis-swap-widget 0.10.0 → 0.10.2
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 +14 -0
- package/README.md +23 -11
- package/dist/aegis-swap-widget.js +7489 -7415
- package/dist/presets/wolf-game.js +40 -30
- package/dist/presets/wolfGame.d.ts +11 -4
- package/dist/widget/AmountUnitToggle.d.ts +3 -1
- package/dist/widget/engine-controller/useEngineMarketLinks.d.ts +18 -0
- package/dist/widget/engine-ui/EngineSimpleYieldPanel.d.ts +5 -1
- package/dist/widget/swapPoolId.d.ts +3 -0
- package/dist/widget/types.d.ts +17 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.10.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 487c7c4: Fix Wolf store resources other than the mounted one opening onto a disabled amount field with no quote. `wolfGameResourceWidgetProps` controls both surfaces when the host supplies `onResourceChange`; otherwise it seeds a shared widget-owned selection using `marketLinks`. Store and Earn resource changes now stay synchronized across tab switches, and later host symbol changes update both surfaces without remounting. Earn's built-in resource picker remains available in widget-owned mode, and unavailable Engine markets do not fall back to another resource.
|
|
8
|
+
|
|
9
|
+
Resolve bundled pool aliases in `poolId`, `defaultPoolId`, and `poolIds` against the available backend pool IDs, preserving discovered IDs for quotes and callbacks. Existing Wolf integrations can retain their helper callback and backend pool list when upgrading; no manual pool-ID conversion is required.
|
|
10
|
+
|
|
11
|
+
## 0.10.1
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- 57b9f65: Wolf Game launch feedback: the Wolf preset stops rendering the game-signal strip above the surfaces (weather and community readouts live in the game), the store sheet keeps a drafted quantity when flipping Buy/Sell and defaults its balance readout to resource units behind a '#'/'$' toggle, and the simple-yield form defaults to token-unit entry, labels the field "Deposit Amount" with a "Deposit" submit in the Wolf preset, and shows the available balance in dollars and units together.
|
|
16
|
+
|
|
3
17
|
## 0.10.0
|
|
4
18
|
|
|
5
19
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -125,17 +125,29 @@ and history. `backendBaseUrl` is a separate Swap data plane and must expose
|
|
|
125
125
|
`/v1/config`, `/v1/markets`, `/v1/tokens`, and token price history. Do not point
|
|
126
126
|
both props at a route that implements only the Engine endpoints.
|
|
127
127
|
|
|
128
|
-
`wolfGameResourceWidgetProps` controls the Store pool
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
128
|
+
`wolfGameResourceWidgetProps(resource, setResource)` controls the Store pool
|
|
129
|
+
and Earn market from one host resource. If the host has no resource state,
|
|
130
|
+
use `wolfGameResourceWidgetProps('GRASS')`: the widget links both surfaces and
|
|
131
|
+
provides its built-in Earn resource picker. Changes inside either surface
|
|
132
|
+
survive switching tabs. Passing a different symbol later updates both surfaces
|
|
133
|
+
without remounting; rerendering the same symbol preserves the user's selection.
|
|
134
|
+
Spread the preset first, then the resource props, and put host callbacks last
|
|
135
|
+
when they intentionally override a default. Unknown pools are ignored, and a
|
|
136
|
+
missing Engine market never falls back to a different resource.
|
|
137
|
+
|
|
138
|
+
The preset's bundled pool aliases also work with backend-discovered
|
|
139
|
+
`evm_<chainId>_<poolId>` IDs. Existing hosts may keep their backend-ID
|
|
140
|
+
`buySwapConfig.poolIds` override; the widget resolves the selected alias against
|
|
141
|
+
the available pools and preserves the discovered ID for quotes and callbacks.
|
|
142
|
+
Merge nested overrides with `...resourceProps.buySwapConfig` so the helper's
|
|
143
|
+
selection and callback remain attached. No host-side ID conversion is needed.
|
|
144
|
+
|
|
145
|
+
The Wolf preset defaults `partnerContextVariant` to `embedded`, so it renders no
|
|
146
|
+
standing game context above Trade and Earn. The published widget does not call
|
|
147
|
+
Wolf Game itself. Hosts that opt into `partnerContextVariant="signal"` or
|
|
148
|
+
`"showroom"` pass their server-normalized data through `partnerContext`; the
|
|
149
|
+
signal places one game-condition line directly below the surface tabs. The
|
|
150
|
+
Playground exposes the same choice as **Off / Game signal / Details hub**.
|
|
139
151
|
|
|
140
152
|
## Trade surface
|
|
141
153
|
|