@rainlanguage/ui-components 0.0.1-alpha.21 → 0.0.1-alpha.210
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/dist/__fixtures__/settings.yaml +125 -0
- package/dist/__mocks__/CodeMirrorRainlang.svelte +4 -0
- package/dist/__mocks__/CodeMirrorRainlang.svelte.d.ts +18 -0
- package/dist/__mocks__/MockComponent.svelte +4 -0
- package/dist/__mocks__/MockComponent.svelte.d.ts +3 -1
- package/dist/__mocks__/stores.d.ts +47 -33
- package/dist/__mocks__/stores.js +61 -38
- package/dist/components/ButtonLoading.svelte +1 -1
- package/dist/components/ButtonVaultLink.svelte +11 -11
- package/dist/components/ButtonVaultLink.svelte.d.ts +4 -3
- package/dist/components/CheckboxInactiveOrdersVault.svelte +20 -0
- package/dist/components/CheckboxInactiveOrdersVault.svelte.d.ts +19 -0
- package/dist/components/CheckboxMyItemsOnly.svelte +3 -2
- package/dist/components/CheckboxMyItemsOnly.svelte.d.ts +2 -3
- package/dist/components/CheckboxZeroBalanceVault.svelte.d.ts +2 -2
- package/dist/components/CodeMirrorDotrain.svelte +4 -0
- package/dist/components/CodeMirrorDotrain.svelte.d.ts +1 -0
- package/dist/components/CodeMirrorRainlang.svelte +3 -12
- package/dist/components/CodeMirrorRainlang.svelte.d.ts +2 -2
- package/dist/components/EditableSpan.svelte +3 -14
- package/dist/components/EditableSpan.svelte.d.ts +0 -1
- package/dist/components/Hash.svelte +3 -3
- package/dist/components/License.svelte +5 -4
- package/dist/components/ListViewOrderbookFilters.svelte +45 -23
- package/dist/components/ListViewOrderbookFilters.svelte.d.ts +27 -22
- package/dist/components/LocalDbStatusBadge.svelte +27 -0
- package/dist/components/LocalDbStatusBadge.svelte.d.ts +19 -0
- package/dist/components/LocalDbStatusCard.svelte +40 -0
- package/dist/components/LocalDbStatusCard.svelte.d.ts +20 -0
- package/dist/components/LocalDbStatusModal.svelte +103 -0
- package/dist/components/LocalDbStatusModal.svelte.d.ts +21 -0
- package/dist/components/OrderOrVaultHash.svelte +12 -12
- package/dist/components/OrderOrVaultHash.svelte.d.ts +4 -4
- package/dist/components/PageHeader.svelte +1 -1
- package/dist/components/TanstackAppTable.svelte +179 -28
- package/dist/components/TanstackAppTable.svelte.d.ts +14 -8
- package/dist/components/ToastDetail.svelte +42 -0
- package/dist/components/ToastDetail.svelte.d.ts +20 -0
- package/dist/components/Tooltip.svelte +8 -0
- package/dist/components/Tooltip.svelte.d.ts +21 -0
- package/dist/components/VaultBalanceChangeTypeFilter.svelte +23 -0
- package/dist/components/VaultBalanceChangeTypeFilter.svelte.d.ts +19 -0
- package/dist/components/VaultCard.svelte +18 -0
- package/dist/components/VaultCard.svelte.d.ts +19 -0
- package/dist/components/charts/LightweightChart.svelte +1 -1
- package/dist/components/charts/LightweightChart.svelte.d.ts +5 -5
- package/dist/components/charts/OrderTradesChart.svelte +300 -28
- package/dist/components/charts/OrderTradesChart.svelte.d.ts +4 -4
- package/dist/components/charts/TanstackLightweightChartLine.svelte +5 -9
- package/dist/components/charts/VaultBalanceChart.svelte +8 -26
- package/dist/components/charts/VaultBalanceChart.svelte.d.ts +1 -7
- package/dist/components/charts/transformAndSortData.d.ts +24 -0
- package/dist/components/charts/transformAndSortData.js +111 -0
- package/dist/components/checkbox/CheckboxActiveOrders.svelte +11 -0
- package/dist/components/checkbox/CheckboxActiveOrders.svelte.d.ts +19 -0
- package/dist/components/deployment/ButtonSelectOption.svelte +2 -0
- package/dist/components/deployment/ButtonSelectOption.svelte.d.ts +1 -0
- package/dist/components/deployment/ComposedRainlangModal.svelte +2 -1
- package/dist/components/deployment/ComposedRainlangModal.svelte.d.ts +1 -4
- package/dist/components/deployment/DeploymentSectionHeader.svelte +7 -4
- package/dist/components/deployment/DeploymentSteps.svelte +209 -216
- package/dist/components/deployment/DeploymentSteps.svelte.d.ts +6 -12
- package/dist/components/deployment/DeploymentTile.svelte +2 -2
- package/dist/components/deployment/DeploymentTile.svelte.d.ts +1 -1
- package/dist/components/deployment/DeploymentsSection.svelte +15 -22
- package/dist/components/deployment/DeploymentsSection.svelte.d.ts +3 -2
- package/dist/components/deployment/DepositInput.svelte +8 -10
- package/dist/components/deployment/DepositInput.svelte.d.ts +1 -2
- package/dist/components/deployment/DisclaimerModal.svelte +6 -7
- package/dist/components/deployment/FieldDefinitionInput.svelte +7 -11
- package/dist/components/deployment/FieldDefinitionInput.svelte.d.ts +1 -2
- package/dist/components/deployment/InvalidOrdersSection.svelte +17 -0
- package/dist/components/deployment/InvalidOrdersSection.svelte.d.ts +19 -0
- package/dist/components/deployment/{StrategyPage.svelte → OrderPage.svelte} +15 -24
- package/dist/components/deployment/OrderPage.svelte.d.ts +21 -0
- package/dist/components/deployment/SelectToken.svelte +125 -48
- package/dist/components/deployment/SelectToken.svelte.d.ts +4 -3
- package/dist/components/deployment/TokenBalance.svelte +19 -0
- package/dist/components/deployment/TokenBalance.svelte.d.ts +19 -0
- package/dist/components/deployment/TokenIOInput.svelte +25 -15
- package/dist/components/deployment/TokenIOInput.svelte.d.ts +3 -3
- package/dist/components/deployment/TokenSelectionModal.svelte +148 -0
- package/dist/components/deployment/TokenSelectionModal.svelte.d.ts +20 -0
- package/dist/components/deployment/{ValidStrategiesSection.svelte → ValidOrdersSection.svelte} +7 -7
- package/dist/components/deployment/ValidOrdersSection.svelte.d.ts +19 -0
- package/dist/components/deployment/VaultIdInformation.svelte +17 -0
- package/dist/components/deployment/VaultIdInformation.svelte.d.ts +21 -0
- package/dist/components/detail/OrderDetail.svelte +184 -80
- package/dist/components/detail/OrderDetail.svelte.d.ts +21 -15
- package/dist/components/detail/TanstackOrderQuote.svelte +92 -46
- package/dist/components/detail/TanstackOrderQuote.svelte.d.ts +14 -16
- package/dist/components/detail/VaultDetail.svelte +78 -77
- package/dist/components/detail/VaultDetail.svelte.d.ts +12 -18
- package/dist/components/dropdown/DropdownActiveNetworks.svelte +44 -0
- package/dist/components/dropdown/DropdownActiveNetworks.svelte.d.ts +19 -0
- package/dist/components/dropdown/DropdownCheckbox.svelte +4 -4
- package/dist/components/dropdown/DropdownOrderListAccounts.svelte +5 -2
- package/dist/components/dropdown/DropdownOrderListAccounts.svelte.d.ts +2 -3
- package/dist/components/dropdown/DropdownOrderbooksFilter.svelte +172 -0
- package/dist/components/dropdown/DropdownOrderbooksFilter.svelte.d.ts +25 -0
- package/dist/components/dropdown/DropdownTokensFilter.svelte +152 -0
- package/dist/components/dropdown/DropdownTokensFilter.svelte.d.ts +28 -0
- package/dist/components/icon/Refresh.svelte +2 -1
- package/dist/components/icon/Refresh.svelte.d.ts +1 -0
- package/dist/components/input/InputOrderHash.svelte +1 -1
- package/dist/components/input/InputOrderHash.svelte.d.ts +3 -3
- package/dist/components/input/InputRegistryUrl.svelte +36 -14
- package/dist/components/input/InputToken.svelte +2 -2
- package/dist/components/input/InputTokenAmount.svelte +16 -21
- package/dist/components/input/InputTokenAmount.svelte.d.ts +3 -3
- package/dist/components/tables/OrderAPY.svelte +6 -33
- package/dist/components/tables/OrderAPY.svelte.d.ts +1 -4
- package/dist/components/tables/OrderTradesListTable.svelte +84 -81
- package/dist/components/tables/OrderTradesListTable.svelte.d.ts +4 -4
- package/dist/components/tables/OrderVaultsVolTable.svelte +17 -22
- package/dist/components/tables/OrderVaultsVolTable.svelte.d.ts +2 -2
- package/dist/components/tables/OrdersListTable.svelte +200 -108
- package/dist/components/tables/OrdersListTable.svelte.d.ts +17 -21
- package/dist/components/tables/VaultBalanceChangesTable.svelte +83 -43
- package/dist/components/tables/VaultBalanceChangesTable.svelte.d.ts +13 -11
- package/dist/components/tables/VaultsListTable.svelte +268 -145
- package/dist/components/tables/VaultsListTable.svelte.d.ts +24 -32
- package/dist/components/transactions/FixedBottomTransaction.svelte +63 -0
- package/dist/components/transactions/FixedBottomTransaction.svelte.d.ts +16 -0
- package/dist/components/transactions/TransactionDetail.svelte +31 -0
- package/dist/components/transactions/TransactionDetail.svelte.d.ts +20 -0
- package/dist/components/transactions/TransactionList.svelte +17 -0
- package/dist/components/transactions/TransactionList.svelte.d.ts +16 -0
- package/dist/components/transactions/getStatusEmoji.d.ts +2 -0
- package/dist/components/transactions/getStatusEmoji.js +20 -0
- package/dist/components/wallet/WalletConnect.svelte +5 -4
- package/dist/components/wallet/WalletConnect.svelte.d.ts +0 -1
- package/dist/consts.d.ts +1 -0
- package/dist/consts.js +1 -0
- package/dist/errors/DeploymentStepsError.d.ts +8 -2
- package/dist/errors/DeploymentStepsError.js +7 -1
- package/dist/hooks/useGui.d.ts +1 -1
- package/dist/hooks/useGui.js +1 -1
- package/dist/hooks/useLocalDb.d.ts +3 -0
- package/dist/hooks/useLocalDb.js +10 -0
- package/dist/hooks/useRaindexClient.d.ts +3 -0
- package/dist/hooks/useRaindexClient.js +11 -0
- package/dist/index.d.ts +42 -19
- package/dist/index.js +41 -16
- package/dist/models/Transaction.d.ts +75 -0
- package/dist/models/Transaction.js +100 -0
- package/dist/providers/GuiProvider.svelte +1 -1
- package/dist/providers/GuiProvider.svelte.d.ts +1 -1
- package/dist/providers/LocalDbProvider.svelte +8 -0
- package/dist/providers/LocalDbProvider.svelte.d.ts +21 -0
- package/dist/providers/RaindexClientProvider.svelte +8 -0
- package/dist/providers/RaindexClientProvider.svelte.d.ts +21 -0
- package/dist/providers/dotrainRegistry/DotrainRegistryProvider.svelte +8 -0
- package/dist/providers/dotrainRegistry/DotrainRegistryProvider.svelte.d.ts +24 -0
- package/dist/providers/dotrainRegistry/context.d.ts +9 -0
- package/dist/providers/dotrainRegistry/context.js +40 -0
- package/dist/providers/dotrainRegistry/useDotrainRegistry.d.ts +5 -0
- package/dist/providers/dotrainRegistry/useDotrainRegistry.js +35 -0
- package/dist/providers/registry/RegistryManager.d.ts +65 -0
- package/dist/providers/registry/RegistryManager.js +133 -0
- package/dist/providers/registry/RegistryProvider.svelte +6 -0
- package/dist/providers/registry/RegistryProvider.svelte.d.ts +21 -0
- package/dist/providers/registry/context.d.ts +10 -0
- package/dist/providers/registry/context.js +46 -0
- package/dist/providers/registry/useRegistry.d.ts +7 -0
- package/dist/providers/registry/useRegistry.js +29 -0
- package/dist/providers/toasts/ToastProvider.svelte +17 -0
- package/dist/providers/toasts/ToastProvider.svelte.d.ts +18 -0
- package/dist/providers/toasts/context.d.ts +14 -0
- package/dist/providers/toasts/context.js +22 -0
- package/dist/providers/toasts/useToasts.d.ts +16 -0
- package/dist/providers/toasts/useToasts.js +63 -0
- package/dist/providers/transactions/TransactionManager.d.ts +235 -0
- package/dist/providers/transactions/TransactionManager.js +509 -0
- package/dist/providers/transactions/TransactionProvider.svelte +11 -0
- package/dist/providers/transactions/TransactionProvider.svelte.d.ts +24 -0
- package/dist/providers/transactions/context.d.ts +19 -0
- package/dist/providers/transactions/context.js +28 -0
- package/dist/providers/transactions/useTransactions.d.ts +13 -0
- package/dist/providers/transactions/useTransactions.js +18 -0
- package/dist/providers/wallet/WalletProvider.svelte +7 -0
- package/dist/providers/wallet/WalletProvider.svelte.d.ts +21 -0
- package/dist/providers/wallet/context.d.ts +10 -0
- package/dist/providers/wallet/context.js +47 -0
- package/dist/providers/wallet/useAccount.d.ts +8 -0
- package/dist/providers/wallet/useAccount.js +148 -0
- package/dist/queries/keys.d.ts +1 -0
- package/dist/queries/keys.js +1 -0
- package/dist/queries/queryClient.d.ts +1 -1
- package/dist/queries/queryClient.js +11 -6
- package/dist/services/awaitTransactionIndexing.d.ts +107 -0
- package/dist/services/awaitTransactionIndexing.js +58 -0
- package/dist/services/getExplorerLink.d.ts +1 -1
- package/dist/services/getExplorerLink.js +2 -4
- package/dist/services/handleShareChoices.d.ts +2 -2
- package/dist/services/handleShareChoices.js +7 -2
- package/dist/services/historicalOrderCharts.d.ts +2 -2
- package/dist/services/historicalOrderCharts.js +267 -333
- package/dist/services/index.d.ts +2 -1
- package/dist/services/index.js +2 -1
- package/dist/services/loadRegistryUrl.d.ts +2 -0
- package/dist/services/loadRegistryUrl.js +22 -0
- package/dist/services/pairTradesChartData.d.ts +47 -0
- package/dist/services/pairTradesChartData.js +190 -0
- package/dist/services/registry.d.ts +5 -5
- package/dist/services/registry.js +8 -208
- package/dist/services/time.d.ts +12 -0
- package/dist/services/time.js +88 -6
- package/dist/storesGeneric/cachedWritableStore.d.ts +57 -0
- package/dist/storesGeneric/cachedWritableStore.js +93 -0
- package/dist/types/account.d.ts +3 -0
- package/dist/types/appStores.d.ts +9 -14
- package/dist/types/modal.d.ts +26 -14
- package/dist/types/{strategy.d.ts → order.d.ts} +3 -3
- package/dist/types/order.js +1 -0
- package/dist/types/toast.d.ts +11 -0
- package/dist/types/toast.js +1 -0
- package/dist/types/tokenBalance.d.ts +6 -0
- package/dist/types/tokenBalance.js +1 -0
- package/dist/types/transaction.d.ts +66 -21
- package/dist/types/transaction.js +31 -1
- package/dist/utils/configHelpers.d.ts +4 -0
- package/dist/utils/configHelpers.js +21 -0
- package/dist/utils/constructHashLink.d.ts +24 -0
- package/dist/utils/constructHashLink.js +115 -0
- package/dist/utils/getNetworkName.d.ts +1 -0
- package/dist/utils/getNetworkName.js +13 -0
- package/dist/utils/number.d.ts +0 -7
- package/dist/utils/number.js +0 -27
- package/dist/utils/tokens.d.ts +2 -0
- package/dist/utils/tokens.js +3 -0
- package/dist/utils/vaultBalanceChangeLabels.d.ts +4 -0
- package/dist/utils/vaultBalanceChangeLabels.js +18 -0
- package/package.json +39 -34
- package/dist/__fixtures__/orderDetail.d.ts +0 -99
- package/dist/__fixtures__/orderDetail.js +0 -204
- package/dist/__fixtures__/settings-12-11-24.json +0 -160
- package/dist/__mocks__/mockTransactionStore.d.ts +0 -22
- package/dist/__mocks__/mockTransactionStore.js +0 -56
- package/dist/__mocks__/settings.d.ts +0 -3
- package/dist/__mocks__/settings.js +0 -37
- package/dist/components/deployment/InvalidStrategiesSection.svelte +0 -19
- package/dist/components/deployment/InvalidStrategiesSection.svelte.d.ts +0 -19
- package/dist/components/deployment/StrategyPage.svelte.d.ts +0 -19
- package/dist/components/deployment/ValidStrategiesSection.svelte.d.ts +0 -19
- package/dist/components/deployment/getDeploymentTransactionArgs.d.ts +0 -17
- package/dist/components/deployment/getDeploymentTransactionArgs.js +0 -28
- package/dist/components/detail/DepositOrWithdrawButtons.svelte +0 -44
- package/dist/components/detail/DepositOrWithdrawButtons.svelte.d.ts +0 -26
- package/dist/components/dropdown/DropdownActiveSubgraphs.svelte +0 -38
- package/dist/components/dropdown/DropdownActiveSubgraphs.svelte.d.ts +0 -21
- package/dist/components/dropdown/DropdownOrderStatus.svelte +0 -31
- package/dist/components/dropdown/DropdownOrderStatus.svelte.d.ts +0 -19
- package/dist/stores/transactionStore.d.ts +0 -98
- package/dist/stores/transactionStore.js +0 -303
- package/dist/utils/time.d.ts +0 -12
- package/dist/utils/time.js +0 -27
- package/dist/utils/vault.d.ts +0 -2
- package/dist/utils/vault.js +0 -29
- /package/dist/types/{strategy.js → account.js} +0 -0
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { SvelteComponent } from "svelte";
|
|
2
|
-
import {
|
|
2
|
+
import { type GuiDepositCfg } from '@rainlanguage/orderbook';
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
5
5
|
deposit: GuiDepositCfg;
|
|
6
|
-
gui: DotrainOrderGui;
|
|
7
6
|
};
|
|
8
7
|
events: {
|
|
9
8
|
[evt: string]: CustomEvent<any>;
|
|
@@ -13,6 +13,7 @@ async function handleAcceptDisclaimer() {
|
|
|
13
13
|
bind:open
|
|
14
14
|
class="max-h-full dark:border dark:border-gray-700 dark:bg-gray-900"
|
|
15
15
|
dialogClass="fixed top-0 start-0 end-1 h-modal md:inset-0 md:h-full z-50 w-full p-4 flex justify-center items-center h-full"
|
|
16
|
+
data-testid="deployment-disclaimer-modal"
|
|
16
17
|
>
|
|
17
18
|
<div class="flex flex-col items-start gap-y-8 p-4">
|
|
18
19
|
<div class="space-y-4">
|
|
@@ -20,7 +21,7 @@ async function handleAcceptDisclaimer() {
|
|
|
20
21
|
<div class="flex items-center justify-center">
|
|
21
22
|
<ExclamationCircleSolid class="h-6 w-6 text-red-500" />
|
|
22
23
|
<span class="ml-2">
|
|
23
|
-
Before you deploy your
|
|
24
|
+
Before you deploy your order, make sure you understand the following...
|
|
24
25
|
</span>
|
|
25
26
|
</div>
|
|
26
27
|
</Alert>
|
|
@@ -29,16 +30,14 @@ async function handleAcceptDisclaimer() {
|
|
|
29
30
|
This front end is provided as a tool to interact with the Raindex smart contracts.
|
|
30
31
|
</li>
|
|
31
32
|
<li class="ml-4">
|
|
32
|
-
You are deploying your own
|
|
33
|
-
|
|
33
|
+
You are deploying your own order and depositing funds to an immutable smart contract using
|
|
34
|
+
your own wallet and private keys.
|
|
34
35
|
</li>
|
|
35
36
|
<li class="ml-4">
|
|
36
37
|
Nobody is custodying your funds, there is no recourse for recovery of funds if lost.
|
|
37
38
|
</li>
|
|
38
|
-
<li class="ml-4">There is no endorsement or guarantee provided with these
|
|
39
|
-
<li class="ml-4">
|
|
40
|
-
Do not proceed if you do not understand the strategy you are deploying.
|
|
41
|
-
</li>
|
|
39
|
+
<li class="ml-4">There is no endorsement or guarantee provided with these orders.</li>
|
|
40
|
+
<li class="ml-4">Do not proceed if you do not understand the order you are deploying.</li>
|
|
42
41
|
<li class="ml-4">Do not invest unless you are prepared to lose all funds.</li>
|
|
43
42
|
</ul>
|
|
44
43
|
</div>
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<script>import { Input } from "flowbite-svelte";
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
} from "@rainlanguage/orderbook/js_api";
|
|
3
|
+
} from "@rainlanguage/orderbook";
|
|
5
4
|
import ButtonSelectOption from "./ButtonSelectOption.svelte";
|
|
6
5
|
import DeploymentSectionHeader from "./DeploymentSectionHeader.svelte";
|
|
7
6
|
import { onMount } from "svelte";
|
|
7
|
+
import { useGui } from "../../hooks/useGui";
|
|
8
8
|
export let fieldDefinition;
|
|
9
|
-
|
|
9
|
+
const gui = useGui();
|
|
10
10
|
let currentValue;
|
|
11
11
|
let inputValue = currentValue?.value ? currentValue?.value : fieldDefinition.default || null;
|
|
12
12
|
onMount(() => {
|
|
@@ -23,10 +23,7 @@ onMount(() => {
|
|
|
23
23
|
});
|
|
24
24
|
async function handlePresetClick(preset) {
|
|
25
25
|
inputValue = preset.value;
|
|
26
|
-
gui
|
|
27
|
-
isPreset: true,
|
|
28
|
-
value: preset.id
|
|
29
|
-
});
|
|
26
|
+
gui.setFieldValue(fieldDefinition.binding, inputValue);
|
|
30
27
|
const result = gui.getFieldValue(fieldDefinition.binding);
|
|
31
28
|
if (result.error) {
|
|
32
29
|
throw new Error(result.error.msg);
|
|
@@ -35,10 +32,7 @@ async function handlePresetClick(preset) {
|
|
|
35
32
|
}
|
|
36
33
|
async function handleCustomInputChange(value) {
|
|
37
34
|
inputValue = value;
|
|
38
|
-
gui
|
|
39
|
-
isPreset: false,
|
|
40
|
-
value
|
|
41
|
-
});
|
|
35
|
+
gui.setFieldValue(fieldDefinition.binding, inputValue);
|
|
42
36
|
const result = gui.getFieldValue(fieldDefinition.binding);
|
|
43
37
|
if (result.error) {
|
|
44
38
|
throw new Error(result.error.msg);
|
|
@@ -54,6 +48,7 @@ async function handleCustomInputChange(value) {
|
|
|
54
48
|
<div class="flex w-full flex-wrap gap-4">
|
|
55
49
|
{#each fieldDefinition.presets as preset}
|
|
56
50
|
<ButtonSelectOption
|
|
51
|
+
dataTestId={`binding-${fieldDefinition.binding}-preset-${preset.name || preset.value}`}
|
|
57
52
|
buttonText={preset.name || preset.value}
|
|
58
53
|
clickHandler={() => handlePresetClick(preset)}
|
|
59
54
|
active={currentValue?.value === preset.value}
|
|
@@ -64,6 +59,7 @@ async function handleCustomInputChange(value) {
|
|
|
64
59
|
|
|
65
60
|
{#if !fieldDefinition.presets || fieldDefinition.showCustomField}
|
|
66
61
|
<Input
|
|
62
|
+
data-testid={`binding-${fieldDefinition.binding}-input`}
|
|
67
63
|
size="lg"
|
|
68
64
|
placeholder="Enter custom value"
|
|
69
65
|
bind:value={inputValue}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { SvelteComponent } from "svelte";
|
|
2
|
-
import {
|
|
2
|
+
import { type GuiFieldDefinitionCfg } from '@rainlanguage/orderbook';
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
5
5
|
fieldDefinition: GuiFieldDefinitionCfg;
|
|
6
|
-
gui: DotrainOrderGui;
|
|
7
6
|
};
|
|
8
7
|
events: {
|
|
9
8
|
[evt: string]: CustomEvent<any>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script>export let ordersWithErrors;
|
|
2
|
+
</script>
|
|
3
|
+
|
|
4
|
+
<div
|
|
5
|
+
class="flex flex-col gap-4 rounded-xl bg-red-100 p-6 dark:bg-red-900"
|
|
6
|
+
data-testid="invalid-orders"
|
|
7
|
+
>
|
|
8
|
+
<h2 class="text-xl font-semibold text-gray-900 dark:text-white">Invalid orders in registry</h2>
|
|
9
|
+
<div class="flex flex-col gap-2">
|
|
10
|
+
{#each ordersWithErrors as order}
|
|
11
|
+
<div class="flex flex-col gap-1">
|
|
12
|
+
<span class="font-medium">{order.name}</span>
|
|
13
|
+
<span class="text-red-600 dark:text-red-400">{order.error}</span>
|
|
14
|
+
</div>
|
|
15
|
+
{/each}
|
|
16
|
+
</div>
|
|
17
|
+
</div>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import type { InvalidOrderDetail } from '../../types/order';
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: {
|
|
5
|
+
ordersWithErrors: InvalidOrderDetail[];
|
|
6
|
+
};
|
|
7
|
+
events: {
|
|
8
|
+
[evt: string]: CustomEvent<any>;
|
|
9
|
+
};
|
|
10
|
+
slots: {};
|
|
11
|
+
exports?: {} | undefined;
|
|
12
|
+
bindings?: string | undefined;
|
|
13
|
+
};
|
|
14
|
+
export type InvalidOrdersSectionProps = typeof __propDef.props;
|
|
15
|
+
export type InvalidOrdersSectionEvents = typeof __propDef.events;
|
|
16
|
+
export type InvalidOrdersSectionSlots = typeof __propDef.slots;
|
|
17
|
+
export default class InvalidOrdersSection extends SvelteComponent<InvalidOrdersSectionProps, InvalidOrdersSectionEvents, InvalidOrdersSectionSlots> {
|
|
18
|
+
}
|
|
19
|
+
export {};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
<script>import { fade } from "svelte/transition";
|
|
2
|
-
import { DotrainOrderGui } from "@rainlanguage/orderbook/js_api";
|
|
3
2
|
import DeploymentsSection from "./DeploymentsSection.svelte";
|
|
4
3
|
import SvelteMarkdown from "svelte-markdown";
|
|
5
|
-
|
|
6
|
-
export let
|
|
4
|
+
import { onMount } from "svelte";
|
|
5
|
+
export let orderName = "";
|
|
6
|
+
export let orderDetail;
|
|
7
|
+
export let deployments = [];
|
|
7
8
|
let markdownContent = "";
|
|
8
9
|
let error;
|
|
9
10
|
const isMarkdownUrl = (url) => {
|
|
@@ -19,29 +20,19 @@ const fetchMarkdownContent = async (url) => {
|
|
|
19
20
|
error = `Failed to fetch markdown`;
|
|
20
21
|
}
|
|
21
22
|
};
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
if (result.error) {
|
|
26
|
-
throw new Error(result.error.msg);
|
|
27
|
-
}
|
|
28
|
-
const strategyDetails = result.value;
|
|
29
|
-
if (strategyDetails.description && isMarkdownUrl(strategyDetails.description)) {
|
|
30
|
-
await fetchMarkdownContent(strategyDetails.description);
|
|
31
|
-
}
|
|
32
|
-
return strategyDetails;
|
|
33
|
-
} catch {
|
|
34
|
-
throw new Error("Failed to get strategy details");
|
|
23
|
+
onMount(async () => {
|
|
24
|
+
if (orderDetail?.description && isMarkdownUrl(orderDetail.description)) {
|
|
25
|
+
await fetchMarkdownContent(orderDetail.description);
|
|
35
26
|
}
|
|
36
|
-
};
|
|
27
|
+
});
|
|
37
28
|
</script>
|
|
38
29
|
|
|
39
|
-
{#
|
|
30
|
+
{#if orderDetail}
|
|
40
31
|
<div>
|
|
41
32
|
<div in:fade class="flex flex-col gap-8">
|
|
42
33
|
<div class="flex max-w-2xl flex-col gap-3 text-start lg:gap-6">
|
|
43
34
|
<h1 class="text-4xl font-semibold text-gray-900 lg:text-6xl dark:text-white">
|
|
44
|
-
{
|
|
35
|
+
{orderDetail.name ?? orderName}
|
|
45
36
|
</h1>
|
|
46
37
|
{#if markdownContent}
|
|
47
38
|
<div data-testid="markdown-content" class="prose dark:prose-invert">
|
|
@@ -56,19 +47,19 @@ const getStrategyWithMarkdown = async () => {
|
|
|
56
47
|
data-testid="plain-description"
|
|
57
48
|
class="text-base text-gray-600 lg:text-lg dark:text-gray-400"
|
|
58
49
|
>
|
|
59
|
-
{
|
|
50
|
+
{orderDetail.description}
|
|
60
51
|
</p>
|
|
61
52
|
</div>
|
|
62
53
|
{/if}
|
|
63
54
|
</div>
|
|
64
55
|
<div class="u flex flex-col gap-4">
|
|
65
56
|
<h2 class="text-3xl font-semibold text-gray-900 dark:text-white">Deployments</h2>
|
|
66
|
-
<DeploymentsSection {
|
|
57
|
+
<DeploymentsSection {deployments} {orderName} />
|
|
67
58
|
</div>
|
|
68
59
|
</div>
|
|
69
60
|
</div>
|
|
70
|
-
{:
|
|
61
|
+
{:else}
|
|
71
62
|
<div>
|
|
72
|
-
<p class="text-red-500">
|
|
63
|
+
<p class="text-red-500">Failed to load order details.</p>
|
|
73
64
|
</div>
|
|
74
|
-
{/
|
|
65
|
+
{/if}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import type { NameAndDescriptionCfg } from '@rainlanguage/orderbook';
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: {
|
|
5
|
+
orderName?: string;
|
|
6
|
+
orderDetail: NameAndDescriptionCfg;
|
|
7
|
+
deployments?: Map<string, NameAndDescriptionCfg> | [string, NameAndDescriptionCfg][];
|
|
8
|
+
};
|
|
9
|
+
events: {
|
|
10
|
+
[evt: string]: CustomEvent<any>;
|
|
11
|
+
};
|
|
12
|
+
slots: {};
|
|
13
|
+
exports?: {} | undefined;
|
|
14
|
+
bindings?: string | undefined;
|
|
15
|
+
};
|
|
16
|
+
export type OrderPageProps = typeof __propDef.props;
|
|
17
|
+
export type OrderPageEvents = typeof __propDef.events;
|
|
18
|
+
export type OrderPageSlots = typeof __propDef.slots;
|
|
19
|
+
export default class OrderPage extends SvelteComponent<OrderPageProps, OrderPageEvents, OrderPageSlots> {
|
|
20
|
+
}
|
|
21
|
+
export {};
|
|
@@ -2,13 +2,20 @@
|
|
|
2
2
|
import { CheckCircleSolid, CloseCircleSolid } from "flowbite-svelte-icons";
|
|
3
3
|
import { Spinner } from "flowbite-svelte";
|
|
4
4
|
import { onMount } from "svelte";
|
|
5
|
+
import { useGui } from "../../hooks/useGui";
|
|
6
|
+
import ButtonSelectOption from "./ButtonSelectOption.svelte";
|
|
7
|
+
import TokenSelectionModal from "./TokenSelectionModal.svelte";
|
|
8
|
+
import TokenBalanceComponent from "./TokenBalance.svelte";
|
|
5
9
|
export let token;
|
|
6
|
-
export let gui;
|
|
7
10
|
export let onSelectTokenSelect;
|
|
11
|
+
export let tokenBalances = /* @__PURE__ */ new Map();
|
|
8
12
|
let inputValue = null;
|
|
9
13
|
let tokenInfo = null;
|
|
10
14
|
let error = "";
|
|
11
15
|
let checking = false;
|
|
16
|
+
let selectionMode = "dropdown";
|
|
17
|
+
let selectedToken = null;
|
|
18
|
+
const gui = useGui();
|
|
12
19
|
onMount(async () => {
|
|
13
20
|
try {
|
|
14
21
|
let result = await gui.getTokenInfo(token.key);
|
|
@@ -16,12 +23,50 @@ onMount(async () => {
|
|
|
16
23
|
throw new Error(result.error.msg);
|
|
17
24
|
}
|
|
18
25
|
tokenInfo = result.value;
|
|
19
|
-
if (
|
|
20
|
-
inputValue =
|
|
26
|
+
if (result.value.address) {
|
|
27
|
+
inputValue = result.value.address;
|
|
28
|
+
onSelectTokenSelect(token.key);
|
|
21
29
|
}
|
|
22
30
|
} catch {
|
|
23
31
|
}
|
|
24
32
|
});
|
|
33
|
+
$: if (tokenInfo?.address && inputValue === null) {
|
|
34
|
+
inputValue = tokenInfo.address;
|
|
35
|
+
}
|
|
36
|
+
function setMode(mode) {
|
|
37
|
+
selectionMode = mode;
|
|
38
|
+
error = "";
|
|
39
|
+
if (mode === "custom") {
|
|
40
|
+
selectedToken = null;
|
|
41
|
+
tokenInfo = null;
|
|
42
|
+
inputValue = "";
|
|
43
|
+
error = "";
|
|
44
|
+
clearTokenSelection();
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
function handleTokenSelect(token2) {
|
|
48
|
+
selectedToken = token2;
|
|
49
|
+
inputValue = token2.address;
|
|
50
|
+
saveTokenSelection(token2.address);
|
|
51
|
+
}
|
|
52
|
+
async function saveTokenSelection(address) {
|
|
53
|
+
checking = true;
|
|
54
|
+
error = "";
|
|
55
|
+
try {
|
|
56
|
+
await gui.setSelectToken(token.key, address);
|
|
57
|
+
await getInfoForSelectedToken();
|
|
58
|
+
} catch (e) {
|
|
59
|
+
const errorMessage = e.message || "Invalid token address.";
|
|
60
|
+
error = errorMessage;
|
|
61
|
+
} finally {
|
|
62
|
+
checking = false;
|
|
63
|
+
onSelectTokenSelect(token.key);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
function clearTokenSelection() {
|
|
67
|
+
gui.unsetSelectToken(token.key);
|
|
68
|
+
onSelectTokenSelect(token.key);
|
|
69
|
+
}
|
|
25
70
|
async function getInfoForSelectedToken() {
|
|
26
71
|
error = "";
|
|
27
72
|
try {
|
|
@@ -36,61 +81,93 @@ async function getInfoForSelectedToken() {
|
|
|
36
81
|
}
|
|
37
82
|
}
|
|
38
83
|
async function handleInput(event) {
|
|
39
|
-
tokenInfo = null;
|
|
40
84
|
const currentTarget = event.currentTarget;
|
|
41
85
|
if (currentTarget instanceof HTMLInputElement) {
|
|
42
86
|
inputValue = currentTarget.value;
|
|
87
|
+
if (tokenInfo && tokenInfo.address.toLowerCase() !== inputValue.toLowerCase()) {
|
|
88
|
+
tokenInfo = null;
|
|
89
|
+
selectedToken = null;
|
|
90
|
+
}
|
|
43
91
|
if (!inputValue) {
|
|
44
92
|
error = "";
|
|
93
|
+
tokenInfo = null;
|
|
94
|
+
selectedToken = null;
|
|
95
|
+
return;
|
|
45
96
|
}
|
|
46
|
-
|
|
47
|
-
try {
|
|
48
|
-
await gui.saveSelectToken(token.key, currentTarget.value);
|
|
49
|
-
await getInfoForSelectedToken();
|
|
50
|
-
} catch (e) {
|
|
51
|
-
const errorMessage = e.message ? e.message : "Invalid token address.";
|
|
52
|
-
error = errorMessage;
|
|
53
|
-
}
|
|
97
|
+
saveTokenSelection(inputValue);
|
|
54
98
|
}
|
|
55
|
-
checking = false;
|
|
56
|
-
onSelectTokenSelect();
|
|
57
99
|
}
|
|
58
100
|
</script>
|
|
59
101
|
|
|
60
|
-
<div class="flex w-full flex-col">
|
|
61
|
-
<div class="
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
{
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
102
|
+
<div class="token-selection-container flex w-full flex-col gap-4">
|
|
103
|
+
<div class="token-header">
|
|
104
|
+
{#if token.name || token.description}
|
|
105
|
+
<div class="flex flex-col">
|
|
106
|
+
{#if token.name}
|
|
107
|
+
<h1 class="break-words text-xl font-semibold text-gray-900 lg:text-xl dark:text-white">
|
|
108
|
+
{token.name}
|
|
109
|
+
</h1>
|
|
110
|
+
{/if}
|
|
111
|
+
{#if token.description}
|
|
112
|
+
<p class="text-sm font-light text-gray-600 lg:text-base dark:text-gray-400">
|
|
113
|
+
{token.description}
|
|
114
|
+
</p>
|
|
115
|
+
{/if}
|
|
116
|
+
</div>
|
|
117
|
+
{/if}
|
|
118
|
+
</div>
|
|
119
|
+
|
|
120
|
+
<div class="selection-mode flex gap-2">
|
|
121
|
+
<ButtonSelectOption
|
|
122
|
+
active={selectionMode === 'dropdown'}
|
|
123
|
+
buttonText="Select from list"
|
|
124
|
+
clickHandler={() => setMode('dropdown')}
|
|
125
|
+
dataTestId="dropdown-mode-button"
|
|
126
|
+
/>
|
|
127
|
+
<ButtonSelectOption
|
|
128
|
+
active={selectionMode === 'custom'}
|
|
129
|
+
buttonText="Custom address"
|
|
130
|
+
clickHandler={() => setMode('custom')}
|
|
131
|
+
dataTestId="custom-mode-button"
|
|
132
|
+
/>
|
|
133
|
+
</div>
|
|
134
|
+
|
|
135
|
+
{#if selectionMode === 'dropdown'}
|
|
136
|
+
<TokenSelectionModal {selectedToken} onSelect={handleTokenSelect} />
|
|
137
|
+
{/if}
|
|
138
|
+
|
|
139
|
+
{#if selectionMode === 'custom'}
|
|
140
|
+
<div class="custom-input">
|
|
141
|
+
<Input
|
|
142
|
+
type="text"
|
|
143
|
+
size="lg"
|
|
144
|
+
placeholder="Enter token address (0x...)"
|
|
145
|
+
bind:value={inputValue}
|
|
146
|
+
on:input={handleInput}
|
|
147
|
+
/>
|
|
93
148
|
</div>
|
|
94
|
-
|
|
149
|
+
{/if}
|
|
150
|
+
|
|
151
|
+
<div class="token-status">
|
|
152
|
+
{#if checking}
|
|
153
|
+
<div class="flex h-5 flex-row items-center gap-2">
|
|
154
|
+
<Spinner class="h-5 w-5" />
|
|
155
|
+
<span>Checking...</span>
|
|
156
|
+
</div>
|
|
157
|
+
{:else if tokenInfo}
|
|
158
|
+
<div
|
|
159
|
+
class="flex h-5 flex-row items-center gap-2"
|
|
160
|
+
data-testid={`select-token-success-${token.key}`}
|
|
161
|
+
>
|
|
162
|
+
<CheckCircleSolid class="h-5 w-5" color="green" />
|
|
163
|
+
<span>{tokenInfo.name}</span>
|
|
164
|
+
<TokenBalanceComponent tokenBalance={tokenBalances.get(token.key)} />
|
|
165
|
+
</div>
|
|
166
|
+
{:else if error}
|
|
167
|
+
<div class="flex h-5 flex-row items-center gap-2" data-testid="error">
|
|
168
|
+
<CloseCircleSolid class="h-5 w-5" color="red" />
|
|
169
|
+
<span>{error}</span>
|
|
170
|
+
</div>
|
|
171
|
+
{/if}
|
|
95
172
|
</div>
|
|
96
173
|
</div>
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { SvelteComponent } from "svelte";
|
|
2
|
-
import type {
|
|
2
|
+
import type { GuiSelectTokensCfg } from '@rainlanguage/orderbook';
|
|
3
|
+
import type { TokenBalance } from '../../types/tokenBalance';
|
|
3
4
|
declare const __propDef: {
|
|
4
5
|
props: {
|
|
5
6
|
token: GuiSelectTokensCfg;
|
|
6
|
-
|
|
7
|
-
|
|
7
|
+
onSelectTokenSelect: (key: string) => void;
|
|
8
|
+
tokenBalances?: Map<string, TokenBalance>;
|
|
8
9
|
};
|
|
9
10
|
events: {
|
|
10
11
|
[evt: string]: CustomEvent<any>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<script>import { Spinner } from "flowbite-svelte";
|
|
2
|
+
export let tokenBalance;
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
{#if tokenBalance}
|
|
6
|
+
{#if tokenBalance.loading}
|
|
7
|
+
<div class="flex items-center gap-2 text-sm text-gray-600 dark:text-gray-400">
|
|
8
|
+
<Spinner class="h-4 w-4" />
|
|
9
|
+
</div>
|
|
10
|
+
{:else if !tokenBalance.error}
|
|
11
|
+
<div class="text-sm text-gray-600 dark:text-gray-400">
|
|
12
|
+
Balance: {tokenBalance.value.formattedBalance}
|
|
13
|
+
</div>
|
|
14
|
+
{:else if tokenBalance.error}
|
|
15
|
+
<div class="text-sm text-red-600 dark:text-red-400">
|
|
16
|
+
{tokenBalance.error}
|
|
17
|
+
</div>
|
|
18
|
+
{/if}
|
|
19
|
+
{/if}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import type { TokenBalance } from '../../types/tokenBalance';
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: {
|
|
5
|
+
tokenBalance: TokenBalance | undefined;
|
|
6
|
+
};
|
|
7
|
+
events: {
|
|
8
|
+
[evt: string]: CustomEvent<any>;
|
|
9
|
+
};
|
|
10
|
+
slots: {};
|
|
11
|
+
exports?: {} | undefined;
|
|
12
|
+
bindings?: string | undefined;
|
|
13
|
+
};
|
|
14
|
+
export type TokenBalanceProps = typeof __propDef.props;
|
|
15
|
+
export type TokenBalanceEvents = typeof __propDef.events;
|
|
16
|
+
export type TokenBalanceSlots = typeof __propDef.slots;
|
|
17
|
+
export default class TokenBalance extends SvelteComponent<TokenBalanceProps, TokenBalanceEvents, TokenBalanceSlots> {
|
|
18
|
+
}
|
|
19
|
+
export {};
|
|
@@ -1,26 +1,27 @@
|
|
|
1
1
|
<script>import { Input } from "flowbite-svelte";
|
|
2
|
-
import {
|
|
3
|
-
} from "@rainlanguage/orderbook/js_api";
|
|
4
|
-
import DeploymentSectionHeader from "./DeploymentSectionHeader.svelte";
|
|
2
|
+
import {} from "@rainlanguage/orderbook";
|
|
5
3
|
import { onMount } from "svelte";
|
|
6
|
-
|
|
4
|
+
import { useGui } from "../../hooks/useGui";
|
|
5
|
+
import VaultIdInformation from "./VaultIdInformation.svelte";
|
|
6
|
+
const gui = useGui();
|
|
7
7
|
export let label;
|
|
8
8
|
export let vault;
|
|
9
|
-
export let
|
|
9
|
+
export let tokenBalances = /* @__PURE__ */ new Map();
|
|
10
10
|
let tokenInfo = null;
|
|
11
11
|
let inputValue = "";
|
|
12
12
|
let error = "";
|
|
13
13
|
onMount(() => {
|
|
14
|
+
if (!vault.token?.key) return;
|
|
14
15
|
const result = gui.getVaultIds();
|
|
15
16
|
if (result.error) {
|
|
16
17
|
error = result.error.msg;
|
|
17
18
|
return;
|
|
18
19
|
}
|
|
19
20
|
const vaultIds = result.value;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
inputValue =
|
|
21
|
+
const vaultMap = vaultIds.get(label.toLowerCase());
|
|
22
|
+
if (vaultMap) {
|
|
23
|
+
const vaultId = vaultMap.get(vault.token.key);
|
|
24
|
+
inputValue = vaultId || "";
|
|
24
25
|
}
|
|
25
26
|
});
|
|
26
27
|
const handleGetTokenInfo = async () => {
|
|
@@ -38,10 +39,13 @@ const handleGetTokenInfo = async () => {
|
|
|
38
39
|
}
|
|
39
40
|
};
|
|
40
41
|
const handleInput = async () => {
|
|
41
|
-
|
|
42
|
+
if (!vault.token) {
|
|
43
|
+
error = "Vault token is not set.";
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
42
46
|
error = "";
|
|
43
47
|
try {
|
|
44
|
-
gui
|
|
48
|
+
gui.setVaultId(label.toLowerCase(), vault.token.key, inputValue);
|
|
45
49
|
} catch (e) {
|
|
46
50
|
const errorMessage = e.message ? e.message : "Error setting vault ID.";
|
|
47
51
|
error = errorMessage;
|
|
@@ -53,12 +57,18 @@ $: if (vault.token?.key) {
|
|
|
53
57
|
</script>
|
|
54
58
|
|
|
55
59
|
<div class="flex w-full flex-col gap-6">
|
|
56
|
-
<
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
+
<div class="flex w-full flex-col gap-2">
|
|
61
|
+
<div class="flex items-center gap-2">
|
|
62
|
+
<VaultIdInformation
|
|
63
|
+
title={`${label} ${tokenInfo?.symbol ? `(${tokenInfo.symbol})` : ''}`}
|
|
64
|
+
description={`${tokenInfo?.symbol || 'Token'} vault ID`}
|
|
65
|
+
tokenBalance={tokenBalances.get(vault.token?.key || '')}
|
|
66
|
+
/>
|
|
67
|
+
</div>
|
|
68
|
+
</div>
|
|
60
69
|
<div class="flex flex-col gap-2">
|
|
61
70
|
<Input
|
|
71
|
+
data-testid="vault-id-input"
|
|
62
72
|
size="lg"
|
|
63
73
|
type="text"
|
|
64
74
|
placeholder="Enter vault ID"
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { SvelteComponent } from "svelte";
|
|
2
|
-
import { type OrderIOCfg
|
|
2
|
+
import { type OrderIOCfg } from '@rainlanguage/orderbook';
|
|
3
|
+
import type { TokenBalance } from '../../types/tokenBalance';
|
|
3
4
|
declare const __propDef: {
|
|
4
5
|
props: {
|
|
5
|
-
i: number;
|
|
6
6
|
label: "Input" | "Output";
|
|
7
7
|
vault: OrderIOCfg;
|
|
8
|
-
|
|
8
|
+
tokenBalances?: Map<string, TokenBalance>;
|
|
9
9
|
};
|
|
10
10
|
events: {
|
|
11
11
|
[evt: string]: CustomEvent<any>;
|