diff --git a/packages/desktop/features/buy-sell.features.ts b/packages/desktop/features/buy-sell.features.ts index 07735ed62c..de3c65ecb1 100644 --- a/packages/desktop/features/buy-sell.features.ts +++ b/packages/desktop/features/buy-sell.features.ts @@ -2,6 +2,9 @@ import { IFeatureFlag } from '@lib/features/interfaces' const buySellFeatures: IFeatureFlag = { enabled: true, + sell: { + enabled: true + } } export default buySellFeatures diff --git a/packages/desktop/lib/auxiliary/popup/enums/popup-id.enum.ts b/packages/desktop/lib/auxiliary/popup/enums/popup-id.enum.ts index 429921049d..dd8bb4410d 100644 --- a/packages/desktop/lib/auxiliary/popup/enums/popup-id.enum.ts +++ b/packages/desktop/lib/auxiliary/popup/enums/popup-id.enum.ts @@ -39,6 +39,7 @@ export enum PopupId { ReceiveAddress = 'receiveAddress', RemoveProposal = 'removeProposal', Revote = 'revote', + SelectToken = 'selectToken', SendFlow = 'sendFlow', SignTypedData = 'signTypedData', SignMessage = 'signMessage', diff --git a/packages/desktop/views/dashboard/buy-sell/components/TokenTile.svelte b/packages/desktop/views/dashboard/buy-sell/components/TokenTile.svelte new file mode 100644 index 0000000000..ee3336b5a2 --- /dev/null +++ b/packages/desktop/views/dashboard/buy-sell/components/TokenTile.svelte @@ -0,0 +1,50 @@ + + +{#if token && token.metadata} + +
+ +
+
+ + {token.metadata.name + ? truncateString(token.metadata.name, 13, 0) + : truncateString(token.id, 6, 7)} + + + {token.metadata + ? `≈ ${formatTokenAmount(tokenAmount ?? BigInt(0), token.metadata, { round: false })}` + : '-'} + +
+
+ + {marketPrice ? formatCurrency(marketPrice, currency) : '-'} + + + {fiatValue !== undefined ? formatCurrency(fiatValue ?? '', currency) : '-'} + +
+
+
+
+{/if} diff --git a/packages/desktop/views/dashboard/buy-sell/components/TransakAccountPanel.svelte b/packages/desktop/views/dashboard/buy-sell/components/TransakAccountPanel.svelte deleted file mode 100644 index e4a16a29cb..0000000000 --- a/packages/desktop/views/dashboard/buy-sell/components/TransakAccountPanel.svelte +++ /dev/null @@ -1,49 +0,0 @@ - - - -
-
- - - - IOTA -
- -
-
- - {fiatBalance} -
- -
- - {$selectedAccount?.depositAddress} - -
-
-
diff --git a/packages/desktop/views/dashboard/buy-sell/components/TransakAmountInput.svelte b/packages/desktop/views/dashboard/buy-sell/components/TransakAmountInput.svelte new file mode 100644 index 0000000000..61e8ab3c1d --- /dev/null +++ b/packages/desktop/views/dashboard/buy-sell/components/TransakAmountInput.svelte @@ -0,0 +1,26 @@ + + +
+ + {currency} +
diff --git a/packages/desktop/views/dashboard/buy-sell/components/TransakExchangePanel.svelte b/packages/desktop/views/dashboard/buy-sell/components/TransakExchangePanel.svelte new file mode 100644 index 0000000000..693dfc12e7 --- /dev/null +++ b/packages/desktop/views/dashboard/buy-sell/components/TransakExchangePanel.svelte @@ -0,0 +1,74 @@ + + + + {#if error} +
+ + {localize('views.buySell.error.title')} + {localize('views.buySell.error.description')} +
+ {:else if loading} +
+ {#if isFeatureEnabled('buySell.sell')} +
+ +
+ {/if} +
+
+ +
+ + +
+ +
+
+
+ {/if} +
diff --git a/packages/desktop/views/dashboard/buy-sell/components/TransakHistoryPanel.svelte b/packages/desktop/views/dashboard/buy-sell/components/TransakHistoryPanel.svelte new file mode 100644 index 0000000000..5c8eb59826 --- /dev/null +++ b/packages/desktop/views/dashboard/buy-sell/components/TransakHistoryPanel.svelte @@ -0,0 +1,8 @@ + + + + Order history + diff --git a/packages/desktop/views/dashboard/buy-sell/components/TransakWindowPlaceholder.svelte b/packages/desktop/views/dashboard/buy-sell/components/TransakWindowPlaceholder.svelte deleted file mode 100644 index 1abbf927dd..0000000000 --- a/packages/desktop/views/dashboard/buy-sell/components/TransakWindowPlaceholder.svelte +++ /dev/null @@ -1,30 +0,0 @@ - - - - {#if error} - - {localize('views.buySell.error.title')} - {localize('views.buySell.error.description')} -