Skip to content
This repository was archived by the owner on Jan 10, 2023. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 7 additions & 1 deletion src/components/trade/trades/History.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,13 @@ $: fetchData($address);
<Cell>-</Cell>
{/if}
{:else}
<Cell hasClass={history.pnl > 0 ? 'green' : 'red'}>{formatForDisplay(formatUnits(history.pnl, 6))}</Cell>
{#if history.pnl > 0}
<Cell hasClass={'green'}>+{formatForDisplay(formatUnits(history.pnl, 6))}</Cell>
{:else if history.pnl < 0}
<Cell hasClass={'red'}>{formatForDisplay(formatUnits(history.pnl, 6))}</Cell>
{:else}
<Cell>{formatForDisplay(formatUnits(history.pnl, 6))}</Cell>
{/if}
{/if}
</Row>
</div>
Expand Down
8 changes: 7 additions & 1 deletion src/components/trade/trades/Positions.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,13 @@
<Cell>{formatForDisplay(formatUnits(position.price, 18))}</Cell>
<Cell>{formatForDisplay(formatUnits(position.size, 6))}</Cell>
<Cell>{formatForDisplay(formatUnits(position.margin, 6))}</Cell>
<Cell>{formatForDisplay(formatUnits(position.upl, 6))}</Cell>
{#if position.upl > 0}
<Cell hasClass='green'>+{formatForDisplay(formatUnits(position.upl, 6))}</Cell>
{:else if position.upl < 0}
<Cell hasClass='red'>{formatForDisplay(formatUnits(position.upl, 6))}</Cell>
{:else}
<Cell>{formatForDisplay(formatUnits(position.upl, 6))}</Cell>
{/if}
<!--<Cell>{formatForDisplay(position.fundingTracker)}</Cell>-->
<Cell isTools={true}>
<!--<a >{@html PENCIL_ICON}</a>-->
Expand Down
2 changes: 1 addition & 1 deletion src/lib/errors.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const ERROR_STRINGS = {
'!order-type': 'The order type is not valid.',
'!price': 'Price is required.',
'!asset': 'This asset is not supported.',
'!min-size': 'The order size is below the minimum size (about $10 or 0.01 ETH).',
'!min-size': 'The order size is below the minimum size (about $20).',
'!market-exists': 'This market does not exist.',
'!market-closed': 'This market is currently closed.',
'!banned-user': 'This address is banned from submitting orders.',
Expand Down