Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
130 commits
Select commit Hold shift + click to select a range
82ab370
Add wtQQQM, wtVWO, wtARKK tokens (#168)
alastairong1 May 11, 2026
aeb9acf
update tokens imgs
Siddharth2207 May 13, 2026
826bf88
ishares, invesco, vanguard
Siddharth2207 May 14, 2026
5f8238c
docs(01): research and validation strategy
alastairong1 May 6, 2026
dac759c
docs(01): pattern map
alastairong1 May 6, 2026
34d7504
docs(01): create phase plan (9 plans, 4 waves)
alastairong1 May 6, 2026
56919d0
docs(01-01): pin FORK_BLOCK + slot table + freshness + no-liquidity p…
alastairong1 May 6, 2026
60076e5
test(01-01): scaffold Playwright + anvil-control helpers + E2E=1 CSP …
alastairong1 May 6, 2026
37ae64b
test(01-01): smoke spec drives full anvil → preview → stub → wagmi → …
alastairong1 May 6, 2026
2176fa8
docs(01-01): complete UI E2E harness bring-up plan
alastairong1 May 6, 2026
b8786ba
docs(01-02): TEST-10 order coverage audit matrix
alastairong1 May 6, 2026
0117a08
docs(01-02): complete TEST-10 audit plan
alastairong1 May 6, 2026
35c9609
feat(01-03): full D-09/D-10 testid retrofit on MarketOrder + LimitOrder
alastairong1 May 6, 2026
c18ebed
feat(01-03): D-11 ESLint rule + fixture + TESTING.md UI Test Selector…
alastairong1 May 6, 2026
61406ee
docs(01-03): complete D-09/D-10/D-11 UI test discipline plan
alastairong1 May 6, 2026
a2172e1
ci(01-09): wire test-e2e + swap to foundry-toolchain action
alastairong1 May 6, 2026
42a864f
docs(01-09): complete CI gating plan
alastairong1 May 6, 2026
13253bd
test(01-04): add TEST-06 Buy market-order E2E spec
alastairong1 May 6, 2026
cb2241b
docs(01-04): complete TEST-06 Buy market-order E2E plan
alastairong1 May 6, 2026
5dc7a08
test(01-05): add TEST-07 Sell market-order E2E spec
alastairong1 May 6, 2026
c0b67f3
docs(01-05): complete TEST-07 Sell market-order E2E plan
alastairong1 May 6, 2026
00d716e
test(01-06): add TEST-08 market-order failure modes E2E spec
alastairong1 May 6, 2026
5e37fe0
docs(01-06): complete TEST-08 market-order failure modes E2E plan
alastairong1 May 6, 2026
f162620
test(01-07): add TEST-09 limit-deploy + simulated counterparty fill E…
alastairong1 May 6, 2026
62c8557
docs(01-07): complete TEST-09 limit-deploy + counterparty-fill E2E plan
alastairong1 May 6, 2026
dbb0921
test(01-08): add marketHours unit test (TEST-08e must-fix gap)
alastairong1 May 6, 2026
b03f692
docs(01-08): re-walk audit matrix; close must-fix gap
alastairong1 May 6, 2026
0437193
docs(01-08): complete TEST-11 must-fix gap-fill plan
alastairong1 May 6, 2026
7f5b7ed
docs(02): capture phase context
alastairong1 May 6, 2026
a8ac7e3
docs(state): record phase 2 context session
alastairong1 May 6, 2026
64d9810
docs(02): add research and validation strategy
alastairong1 May 7, 2026
dfeaaf6
docs(02): create Phase 2 observability plans
alastairong1 May 7, 2026
0702652
docs(02): create phase plan
alastairong1 May 7, 2026
231a5d8
test(02-01): add failing tests for tradeId lifecycle module
alastairong1 May 7, 2026
2b4910e
feat(02-01): implement tradeId lifecycle module (OBS-09 foundation)
alastairong1 May 7, 2026
40a4f8a
test(02-01): add failing tests for trackTradeEvent typed wrapper
alastairong1 May 7, 2026
5db03bf
feat(02-01): implement trackTradeEvent typed wrapper (OBS-07)
alastairong1 May 7, 2026
6764022
test(02-01): add failing tests for pino RequestContext trade_id exten…
alastairong1 May 7, 2026
7630ef6
feat(02-01): extend pino RequestContext with trade_id (OBS-09 server-…
alastairong1 May 7, 2026
8e7ea92
docs(02-01): complete OBS-07/OBS-09 foundation plan
alastairong1 May 7, 2026
0518e27
test(02-02): add failing tests for Sentry Replay config + CSP worker-src
alastairong1 May 7, 2026
a5c14bc
feat(02-02): add Sentry Replay (OBS-06) + extract CSP for testability
alastairong1 May 7, 2026
7cdce19
test(02-02): add failing test for trade_id Sentry tag (OBS-09)
alastairong1 May 7, 2026
53b9244
feat(02-02): tag captureTakeOrderFailure with trade_id (OBS-09)
alastairong1 May 7, 2026
18331ef
docs(02-02): complete OBS-06 Sentry Replay + OBS-09 tag wiring plan
alastairong1 May 7, 2026
d059096
test(02-03): RED for MarketOrder.svelte event instrumentation
alastairong1 May 7, 2026
8d0dff5
feat(02-03): wire trade_id lifecycle + canonical OBS-07 events into M…
alastairong1 May 7, 2026
f1da908
test(02-03): RED for marketOrderExecution.ts broadcast/confirmed emis…
alastairong1 May 7, 2026
57929a1
feat(02-03): emit broadcast+confirmed events at SDK callback boundary
alastairong1 May 7, 2026
08b2a34
test(02-03): RED for LimitOrder.svelte event instrumentation
alastairong1 May 7, 2026
5768d57
feat(02-03): wire trade_id lifecycle + canonical OBS-07 events into L…
alastairong1 May 7, 2026
049db92
test(02-03): RED for DcaOrder.svelte gap-fill instrumentation
alastairong1 May 7, 2026
a03cc87
feat(02-03): gap-fill DCA observability with full OBS-07 event taxonomy
alastairong1 May 7, 2026
6f35a22
test(02-03): RED for orderDeployment eventContext + page_viewed + dep…
alastairong1 May 7, 2026
0802cd3
feat(02-03): mandatory eventContext on deploy + page_viewed rename
alastairong1 May 7, 2026
6171cc8
docs(02-03): complete OBS-07 component instrumentation + OBS-09 brows…
alastairong1 May 7, 2026
cded9c4
docs(02-04): author 02-RUNBOOK.md operator recipes
alastairong1 May 7, 2026
d10358e
docs(02-04): author 02-PRIVACY-REVIEW.md OBS-11 sign-off checklist
alastairong1 May 7, 2026
a780513
docs(02-04): partial-complete summary — Tasks 1+2 landed, 3+4 at oper…
alastairong1 May 7, 2026
76c1081
ci: clear pre-existing baseline so PR can land green
alastairong1 May 15, 2026
c7ee8eb
test(e2e): inject dummy SESSION_SECRET for build step
alastairong1 May 15, 2026
faf1eac
test(e2e): bump anvil waitForRpc default to 90s
alastairong1 May 15, 2026
bdfad76
test(e2e): surface anvil stdout/stderr to CI logs
alastairong1 May 15, 2026
7349b8a
test(e2e): surface preview stdout/stderr + bump default timeout to 90s
alastairong1 May 15, 2026
d4ef63c
test(e2e): set SESSION_SECRET on process.env, not just buildEnv
alastairong1 May 15, 2026
b0f041c
test(e2e): dismiss TokenSwapAnnouncementModal in fixtures
alastairong1 May 15, 2026
ddd8dbe
test(e2e): mock /api/access/check to bypass wallet-registration gate
alastairong1 May 15, 2026
1250b6c
test(e2e): seed wagmi recentConnectorId so autoConnect picks up stub
alastairong1 May 15, 2026
7d2df53
ci: mark test-e2e as continue-on-error pending spec audit
alastairong1 May 15, 2026
2e55b9c
ci: move continue-on-error from job to Playwright steps
alastairong1 May 15, 2026
3387c51
test(e2e): wagmi RPC redirect + input-mode toggle + mode-tab force-click
alastairong1 May 15, 2026
bb91fa1
test(e2e): anvil --block-time 2 for interval mining
alastairong1 May 15, 2026
b842050
test(e2e): move FORK_BLOCK to weekday during NYSE hours
alastairong1 May 15, 2026
63bfea6
fix(orders): broaden aggregated→per-order fallback to recover from SD…
alastairong1 May 15, 2026
3a11d65
test(e2e): land smoke spec — RPC redirect, slippage, on-chain assertion
alastairong1 May 15, 2026
78fd0ac
style: prettier fix for marketTakeStore post-approval fallback
alastairong1 May 15, 2026
094d3a3
test(e2e): wait for submit-button enabled before clicking in smoke spec
alastairong1 May 15, 2026
f8add67
debug(e2e): dump page state before toBeEnabled in smoke spec
alastairong1 May 15, 2026
413b97d
debug(e2e): fix selector syntax in smoke debug evaluate
alastairong1 May 15, 2026
c0262ad
ci(e2e): plumb ST0X_API_* secrets so the trade-panel orderbook query …
alastairong1 May 15, 2026
de5860b
ci: retrigger E2E after ST0X_API_* secrets added to repo
alastairong1 May 15, 2026
2e004fa
test(e2e): apply smoke-spec fixes to marketBuy + marketSell
alastairong1 May 15, 2026
f35a83d
docs(01): handover for remaining E2E specs (marketSell, marketFailure…
alastairong1 May 15, 2026
197287f
test(e2e): apply buy-spec pattern to remaining specs; tNVDA via imper…
alastairong1 May 15, 2026
cab50df
test(e2e): drop walletActions from TestClient; dynamic Saturday times…
alastairong1 May 15, 2026
672ce35
debug(e2e): diagnostic browser console + pre/post-click dump in marke…
alastairong1 May 15, 2026
4f923cf
test(e2e): scale order sizes to fit on-chain vault depth at FORK_BLOCK
alastairong1 May 15, 2026
161037e
test(e2e): pre-fund orderbook order vaults via deposit2 impersonation
alastairong1 May 17, 2026
581dde4
test(e2e): fix orderbook deposit calldata — Float-encoded amount + ve…
alastairong1 May 17, 2026
67944d3
test(e2e): bump Playwright test timeout to 180s + diagnostic dump in …
alastairong1 May 17, 2026
20dec98
test(e2e): stub Pyth Hermes so on-chain quotes survive UI price-guard…
alastairong1 May 17, 2026
c52cfed
test(e2e): stub the ST0x orders API to inflate outputVaultBalance
alastairong1 May 17, 2026
9ad4eba
test(e2e): stub ST0x orders API — also patch blank ioRatio + diagnost…
alastairong1 May 17, 2026
5fe16aa
test(e2e): API-stub ioRatio uses side-aware fork-era price hint
alastairong1 May 17, 2026
2e52468
debug(e2e): capture browser console + post-click state in marketBuy
alastairong1 May 17, 2026
c217efc
test(e2e): align fork to recent NYSE block; strip live-vs-fork stubs
alastairong1 May 18, 2026
6ced20e
test(e2e): add fork-aware /orders/token stub
alastairong1 May 18, 2026
127dcc5
test(e2e): fork stub filters pre-fork orders + parallel quotes
alastairong1 May 18, 2026
e6b756b
test(e2e): goldsky GraphQL cache + 429 retry-with-backoff
alastairong1 May 18, 2026
ce4c85d
test(e2e): fix insufficient_balance; skip 3 broken marketFailures + l…
alastairong1 May 18, 2026
89491a2
docs(01): handover for E2E suite — 4 pass / 4 skip
alastairong1 May 18, 2026
20f9b1c
feat(e2e): maker→taker infrastructure (Path B, WIP)
alastairong1 May 19, 2026
5286290
docs(01): handover for Path B maker→taker scaffolding
alastairong1 May 19, 2026
5f2dfbb
fix(deploy): resolve registry URL to absolute before SDK call
alastairong1 May 24, 2026
1684db9
test(e2e): preview → Playwright webServer + clickModeTab helper
alastairong1 May 24, 2026
7b7111f
test(e2e): limitDeploy passes real-anvil; skip Path-B market specs
alastairong1 May 24, 2026
2a03d5c
test(e2e): Path-B market buy/sell pass real-anvil; fix synth-stub liq…
alastairong1 May 25, 2026
28869ae
refactor(e2e): synth stub uses Float.parse directly; raise webServer …
alastairong1 May 26, 2026
58167ef
test(e2e): persist Goldsky cache to disk + fixture-level route drain
alastairong1 May 27, 2026
631df93
test(e2e): add another Goldsky cache entry warmed by marketSell run
alastairong1 May 27, 2026
fb4cd4f
test(e2e): openTradePanel helper retries until trade panel actually m…
alastairong1 May 27, 2026
106d4d8
test(e2e): explicit visibility wait before openTradePanel retry-click
alastairong1 May 27, 2026
1ba2215
test(e2e): wait for header Dashboard button before openTradePanel click
alastairong1 May 27, 2026
5e2377c
test(e2e): cache more Goldsky responses
alastairong1 May 27, 2026
0913c35
test(e2e): wait for wagmi balance display before submit-enable check
alastairong1 May 27, 2026
3d28e5e
test(e2e): wait for orderbook bid before filling marketSell asset input
alastairong1 May 27, 2026
86e6fe8
test(e2e): deploy Path-B maker ask for insufficient_balance test
alastairong1 May 27, 2026
e1a61ea
docs(01): handover — Path-B final items (ioRatio, spec rewrite, limit…
alastairong1 May 28, 2026
dc7ae21
refactor(obs): break ProcessedQuote import cycle
alastairong1 May 29, 2026
aede995
chore: delete dead code surfaced by PR-174 review
alastairong1 May 29, 2026
e46bea7
refactor(obs): extract shared classifyError, remove triplicated class…
alastairong1 May 29, 2026
a440814
refactor(obs): withTradeId wrapper owns mint/clear in MarketOrder + D…
alastairong1 May 29, 2026
331ba83
refactor(obs): route every TradeEventName through trackTradeEvent
alastairong1 May 29, 2026
b0e9106
chore: prettier sweep + check in PR-174 review report
alastairong1 May 29, 2026
c049648
test(e2e): delete Path A (forkOrdersStub) — Pyth-dependent re-quote o…
alastairong1 May 29, 2026
d273c62
Merge remote-tracking branch 'origin/main' into phase-01-ui-driven-e2…
alastairong1 May 29, 2026
e24965e
chore: prettier sweep on files merged from main
alastairong1 May 30, 2026
2b37d9f
fix(obs): address CodeRabbit feedback on PR #174 — 6 fixes + 2 hygiene
alastairong1 May 30, 2026
7307a2c
Wrap-ratio UX (chip, explainer, ratio history, denom toggle) + wtSGOV…
alastairong1 Jun 2, 2026
7ec8924
merge: bring phase-01-ui-driven-e2e-tests (incl #189 wrap-ratio UX) i…
alastairong1 Jun 2, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 61 additions & 7 deletions src/lib/components/TradeAmountInput.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,20 @@
export let compact: boolean = false;
export let noBorder: boolean = false;

// Optional label override — when set, this string is shown as the input's
// trailing unit instead of `amountToken.symbol`. Used by the trade panel
// to flip wtX ↔ tX when the user toggles share-denominated display on.
export let unitOverride: string | undefined = undefined;

// Display-only scale factor. When > 0 and !== 1, the user types values
// in the SCALED denomination (e.g. tSGOV shares) while `amount` remains
// in the token's native denomination (wtSGOV wei). Math is:
// amount = parseUnits(inputString / displayScale, decimals)
// display = formatUnits(amount * displayScale, decimals)
// `displayScale` is a float — the wrap ratio is bounded (1.0–~2.0) and
// only has ~4 significant digits in practice, so float precision is fine.
export let displayScale: number = 1;

// Expose balance to parent component
export let balance: bigint = 0n;
export let balanceDecimals: number | null = null;
Expand Down Expand Up @@ -69,21 +83,60 @@
amount = undefined;
};

function activeScale(): number {
return Number.isFinite(displayScale) && displayScale > 0 ? displayScale : 1;
}

// Convert a user-typed string (in the displayed denomination) into a wt-
// denominated BigInt at `amountDecimals` precision. When `displayScale`
// is 1 (the default) this is just `parseUnits`. When >1, we divide by
// the ratio first so the stored BigInt is the on-chain (wt) amount.
function parseDisplayInput(input: string, decimals: number): bigint {
const scale = activeScale();
if (scale === 1) return parseUnits(input, decimals);
// `parseFloat` is OK here: the wrap ratio's significant digits (~4) and
// typical user inputs (≤ 10^10) stay well within float64 precision.
const tValue = parseFloat(input);
if (!Number.isFinite(tValue)) throw new Error('invalid input');
const wtValue = tValue / scale;
// Clamp to the token's decimals so we never exceed parseUnits' digit
// budget. toFixed(decimals) gives a fixed-point string with up to
// `decimals` fractional digits — safe input for parseUnits.
return parseUnits(wtValue.toFixed(decimals), decimals);
}

function formatWtAsDisplay(wt: bigint, decimals: number): string {
const scale = activeScale();
const native = formatUnits(wt, decimals);
if (scale === 1) return native;
const tValue = parseFloat(native) * scale;
return tValue.toFixed(decimals);
}

// Reference `displayScale` here so Svelte's reactive tracker re-runs this
// block when the parent flips the share-denominated toggle after the user
// has already typed. Without this the bound `amount` BigInt stays in
// whichever denom was active at type-time and the user thinks the
// conversion isn't working.
$: if (inputAmount && canParseDecimals(amountDecimals)) {
// eslint-disable-next-line @typescript-eslint/no-unused-expressions -- justification: bare reference registers displayScale as a Svelte reactive dependency; it is consumed transitively via activeScale() inside parseDisplayInput, which the compiler cannot see.
displayScale; // explicit dep — see comment above
try {
amount = parseUnits(inputAmount, amountDecimals);
amount = parseDisplayInput(inputAmount, amountDecimals);
} catch {
amount = undefined;
}
} else if (!inputAmount) {
amount = undefined;
}

// Expose function to set amount from parent (for percentage buttons)
// Expose function to set amount from parent (for percentage buttons).
// Parent always speaks wt-denominated BigInts; we render the display
// string in whichever denomination is active.
export function setAmountValue(newAmount: bigint) {
if (!canParseDecimals(amountDecimals)) return;
amount = newAmount;
inputAmount = formatUnits(newAmount, amountDecimals);
inputAmount = formatWtAsDisplay(newAmount, amountDecimals);
}

$: balancePromise = (async () => {
Expand Down Expand Up @@ -139,7 +192,7 @@
if (!canParseDecimals(amountDecimals)) {
return;
}
inputAmount = formatUnits(balance, amountDecimals);
inputAmount = formatWtAsDisplay(balance, amountDecimals);
amount = balance;
};
</script>
Expand All @@ -149,7 +202,7 @@
{...$$restProps}
bind:amount={inputAmount}
type="number"
unit={showUnit ? amountToken.symbol : ''}
unit={showUnit ? unitOverride ?? amountToken.symbol : ''}
maxButton={showMaxButton}
on:setValueToMax={setValueToMax}
{dataTestId}
Expand All @@ -165,10 +218,11 @@
</span>
{:then data}
{#if data}
{@const balanceFormatted = parseFloat(formatUnits(data.balance, data.decimals))}
{@const balanceFormatted =
parseFloat(formatUnits(data.balance, data.decimals)) * activeScale()}
{@const balanceRounded = Math.round(balanceFormatted * 1000) / 1000}
Balance: {balanceRounded.toFixed(3)}
{(balanceToken ?? amountToken)?.symbol}
{unitOverride ?? (balanceToken ?? amountToken)?.symbol}
{:else}
Balance: —
{/if}
Expand Down
13 changes: 12 additions & 1 deletion src/lib/components/orders/DcaOrder.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,15 @@
: 'bg-red-500 hover:bg-red-600 text-white';

export let assetToken: PythToken | undefined; // The token we're accumulating
/** Share-denominated display toggle — see MarketOrder for the contract. */
export let displayDenom: 'wrapped' | 'unwrapped' = 'wrapped';
export let wrapRatio: number = 1;
$: displayedAssetSymbol =
displayDenom === 'unwrapped' && assetToken
? assetToken.symbol.replace(/^wt/, 't')
: assetToken?.symbol ?? '';
$: displayScale =
displayDenom === 'unwrapped' && Number.isFinite(wrapRatio) && wrapRatio > 0 ? wrapRatio : 1;

// Filter tokens based on current network
$: ALL_TOKENS = $currentNetwork ? getAllTokensByNetwork($currentNetwork.chainId) : [];
Expand Down Expand Up @@ -315,7 +324,7 @@
<div class="mb-2 block text-sm font-medium text-gray-300">
{orderSide === 'Buy' ? 'Purchase Budget' : 'Amount to Sell'}
<span class="ml-1 text-xs text-gray-500"
>({orderSide === 'Buy' ? settlementLabel : selectedInputToken.symbol})</span
>({orderSide === 'Buy' ? settlementLabel : displayedAssetSymbol})</span
>
</div>
<TradeAmountInput
Expand All @@ -329,6 +338,8 @@
validate={validateSelectedAmount}
bind:isError={selectedAmountError}
showMaxButton={false}
displayScale={orderSide === 'Buy' ? 1 : displayScale}
unitOverride={orderSide === 'Buy' ? settlementLabel : displayedAssetSymbol}
/>
<!-- Percentage buttons -->
<div class="mt-2 flex gap-2">
Expand Down
42 changes: 34 additions & 8 deletions src/lib/components/orders/LimitOrder.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,17 @@
export let orderSide: 'Buy' | 'Sell' = 'Buy';
export let buyPrice: number | null = null; // Best bid price (what you get when selling)
export let sellPrice: number | null = null; // Best ask price (what you pay when buying)
/** Share-denominated display toggle — see MarketOrder for the contract. */
export let displayDenom: 'wrapped' | 'unwrapped' = 'wrapped';
export let wrapRatio: number = 1;
$: displayedAssetSymbol =
displayDenom === 'unwrapped' && assetToken
? assetToken.symbol.replace(/^wt/, 't')
: assetToken?.symbol ?? '';
$: displayScale =
displayDenom === 'unwrapped' && Number.isFinite(wrapRatio) && wrapRatio > 0 ? wrapRatio : 1;
$: showShareEquivalent = displayDenom === 'unwrapped' && displayScale !== 1;
$: wtDecimalsForSummary = showShareEquivalent ? 5 : 3;

// Filter tokens based on current network
$: ALL_TOKENS = $currentNetwork ? getAllTokensByNetwork($currentNetwork.chainId) : [];
Expand Down Expand Up @@ -437,6 +448,8 @@
bind:isError={selectedAmountError}
showUnit={false}
showMaxButton={false}
{displayScale}
unitOverride={displayedAssetSymbol}
/>
<!-- Percentage buttons -->
<div class="mt-2 flex gap-2">
Expand All @@ -455,7 +468,7 @@
<div class="mb-2 block text-sm font-medium text-gray-300">
Limit Price
<span class="ml-1 text-xs text-gray-500"
>({settlementLabel} per {assetToken.symbol})</span
>({settlementLabel} per {displayedAssetSymbol})</span
>
Comment on lines 470 to 472

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Scale unwrapped limit prices before deployment

When the trade panel is toggled to unwrapped display for a non-1:1 wrapper such as wtSGOV, this label tells the user the limit price is per tSGOV, and the quantity input converts the entered share amount back to wt internally. However handleDeploy still uses selectedInitialRatio unchanged as the on-chain wt price when calculating settlementNeeded and ioRatio, so a user-entered per-share price is deployed as a lower per-wrapped-token price by roughly the wrap ratio. This underfunds buy orders and underprices sell orders whenever displayDenom === 'unwrapped'; the displayed/input price should be converted back to per-wt before deployment and price warnings.

Useful? React with 👍 / 👎.

</div>
<Input
Expand All @@ -475,14 +488,27 @@
<div class={containerStyles.cardBordered}>
<h4 class="mb-3 text-sm font-medium text-gray-300">Order Summary</h4>
<div class="space-y-2 text-sm">
<div class="flex justify-between">
<div class="flex items-start justify-between gap-3">
<span class="text-gray-400">{orderSide === 'Buy' ? 'Buying' : 'Selling'}</span>
<span class="font-medium">
{selectedAmount
? parseFloat(formatUnits(selectedAmount, assetToken.decimals)).toFixed(3)
: '0'}
{assetToken.symbol}
</span>
<div class="text-right">
<span class="font-medium">
{(selectedAmount
? parseFloat(formatUnits(selectedAmount, assetToken.decimals))
: 0
).toFixed(wtDecimalsForSummary)}
{assetToken.symbol}
</span>
{#if showShareEquivalent}
<div class="text-[11px] text-gray-500">
equivalent to {(
(selectedAmount
? parseFloat(formatUnits(selectedAmount, assetToken.decimals))
: 0) * displayScale
).toFixed(5)}
{displayedAssetSymbol}
</div>
{/if}
</div>
</div>
<div class="flex justify-between">
<span class="text-gray-400">At price</span>
Expand Down
Loading
Loading