aegis-swap-widget 0.10.1 → 0.10.3
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 +16 -0
- package/README.md +16 -4
- package/dist/aegis-swap-widget.js +7578 -7500
- package/dist/presets/wolf-game.js +36 -33
- package/dist/presets/wolfGame.d.ts +8 -4
- package/dist/widget/engine-controller/useEngineMarketLinks.d.ts +18 -0
- package/dist/widget/engine-ui/EngineBuyPanel.d.ts +2 -2
- package/dist/widget/engine-ui/EngineStorePanel.d.ts +2 -2
- package/dist/widget/swapPoolId.d.ts +3 -0
- package/dist/widget/types.d.ts +14 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.10.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Fix Wolf Trade dollar entry: the $ control now selects a USDC spend budget instead of only changing the balance display. Entering $255 quotes 255 USDC of input, with the WATER output determined by the live quote. Switching units clears the draft to prevent reinterpreting a resource quantity as money. Dollar buys require a verified dollar-pegged counter token; Sell continues to use resource quantities.
|
|
8
|
+
|
|
9
|
+
Restore 25%, 50%, 75%, and Max shortcuts in the Wolf preset. Percentages use the spend-side wallet balance and round down to token precision. Custom numeric resource shortcuts remain supported. Core stays at ^0.6.0.
|
|
10
|
+
|
|
11
|
+
## 0.10.2
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- 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.
|
|
16
|
+
|
|
17
|
+
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.
|
|
18
|
+
|
|
3
19
|
## 0.10.1
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -125,10 +125,22 @@ 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
|
-
|
|
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.
|
|
132
144
|
|
|
133
145
|
The Wolf preset defaults `partnerContextVariant` to `embedded`, so it renders no
|
|
134
146
|
standing game context above Trade and Earn. The published widget does not call
|