diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index da7c2c0f..081cc59b 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -6,8 +6,13 @@ on: env: PUBLIC_ENVIRONMENT: 'development' PUBLIC_LOCAL_SIGNER: '' + PUBLIC_ACCOUNT_UPDATE_INTERVAL: 3000 + PUBLIC_NETWORK_UPDATE_INTERVAL: 3000 + PUBLIC_METAMASK_SNAP_ORIGIN: 'npm:@greymass/eos-wallet' + PUBLIC_METAMASK_SERVICE_URL: 'https://eos.account.unicove.com/buy' API_EOS_CHAIN: '' API_EOS_HISTORY: '' + API_EOS_LIGHTAPI: '' API_EOS_METRICS: '' API_JUNGLE4_CHAIN: '' API_JUNGLE4_HISTORY: '' diff --git a/README.md b/README.md index 3656d5a4..9e725aa7 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,7 @@ Add a `.env` file to the root of the project with the following content: PUBLIC_LOCAL_SIGNER="" API_EOS_HISTORY=https://eos.greymass.com API_EOS_CHAIN=https://eos.greymass.com +API_EOS_LIGHTAPI=https://eos.light-api.net API_JUNGLE4_HISTORY=https://jungle4.greymass.com API_JUNGLE4_CHAIN=https://jungle4.greymass.com API_KYLIN_HISTORY=https://kylintestnet.greymass.com diff --git a/bun.lockb b/bun.lockb index bfcb2276..4467472f 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/messages/en.json b/messages/en.json index dc847edc..c07b3b06 100644 --- a/messages/en.json +++ b/messages/en.json @@ -5,34 +5,75 @@ "active_session": "Active Session", "block_height_numbered": "Block #{height}", "block_height_numbered_description": "Block #{height} was produced by {producer} on {timestamp}, which included {transactions} transactions performing {actions} actions.", + "common_about_something": "About {thing}", "common_action": "Action", "common_amount_exceeds_balance": "Amount exceeds available balance.", + "common_amount_to_act": "Amount to {action}", + "common_apr_current": "Current APR", "common_asset": "Asset", "common_back": "Back", + "common_balance": "Balance", + "common_buy": "Buy", + "common_bytes": "Bytes", "common_clear": "Clear", "common_close": "Close", "common_complete": "Complete", "common_confirm": "Confirm", + "common_date_available": "Date Available", "common_debugging": "Debugging", + "common_details": "Details", "common_error": "Error", + "common_expected_receive": "Expected to receive", "common_fill_max": "Fill Max", "common_invalid_number_decimals": "Invalid number, too many decimal places.", + "common_labeled_unit_available": "{unit} Available", + "common_labeled_unit_balance": "{unit} Balance", + "common_labeled_unit_price": "{unit} Price", + "common_labeled_unit_staked": "{unit} Staked", + "common_labeled_unit_value": "{unit} Value", + "common_market_cap": "Market Cap", "common_memo": "Memo", + "common_network_fees": "Network Fees", "common_next": "Next", + "common_not_logged_in": "Not logged in", "common_optional": "Optional", "common_recent_activity": "Recent Activity", "common_recipient": "Recipient", + "common_refund": "Refund", + "common_refund_tokens": "Claim previously delegated {token} tokens", + "common_refunding": "Refunding", "common_restart": "Restart", "common_search": "Search...", - "common_search_unicove": "Search Unicove", "common_search_instructions": "Search for Unicove features or enter an account name, public key, or transaction ID on the network.", "common_search_no_results": "No results found", "common_search_results": "Search Results", + "common_search_unicove": "Search Unicove", + "common_sell": "Sell", + "common_stake": "Stake", + "common_stake_tokens": "Stake {token} Tokens", + "common_staked": "Staked", + "common_staked_currently": "Currently staked", + "common_staking": "Staking", "common_submit": "Submit", + "common_supply": "Supply", + "common_timeframe_daily": "Daily", + "common_timeframe_monthly": "Monthly", + "common_timeframe_yearly": "Yearly", + "common_tokens": "tokens", + "common_total_cost": "Total Cost", "common_transaction_complete": "Transaction Complete", "common_transaction_error": "Transaction Error", "common_transaction_error_subtitle": "There was an error submitting your transaction.", + "common_unit_buy": "Buy {unit}", + "common_unit_sell": "Sell {unit}", + "common_unstake": "Unstake", + "common_unstake_tokens": "Unstake {token} tokens", + "common_unstaked": "Unstaked", + "common_unstaking": "Unstaking", "common_value_with_amount": "Value: {amount}", + "common_withdraw": "Withdraw", + "common_withdraw_tokens": "Withdraw {token} tokens from staking", + "common_withdrawable_currently": "Currently Withdrawable", "contract_abi_page_description": "The ABI defining the {contract} smart contract on the {network} network.", "contract_abi_page_title": "ABI", "contract_action_view_description": "The {action} action for the {contract} smart contract on the {network} network.", @@ -49,13 +90,30 @@ "contract_tables_view_title": "Table: {table}", "contract_view_description": "An overview of the {contract} smart contract on the {network} network. This contract contains {actions} actions, {tables} tables, and {structs} structs.", "contract_view_title": "Contract: {contract} | {network}", + "delegation_metadata_refund_description": "Claim previously delegated {network} tokens.", + "delegation_metadata_refund_title": "Refund Delegated {network} Tokens", "error_loading_accounts": "Error loading accounts: {error}", + "form_validation_insufficient_balance": "Insufficient {unit} balance. Please enter a smaller amount.", + "form_validation_invalid_number_decimals": "Invalid number, too many decimal places.", "key_page_description": "A public key associated with {accounts} account(s) on the {network} network.", "key_page_subtitle": "The {accounts} account(s) associated with this public key", "key_page_title": "Public Key", "legacy_key": "Legacy Key", "loading_accounts": "Loading accounts...", "no_accounts_found": "No accounts found", + "ram_available_balance": "RAM Available", + "ram_form_buy_amount": "Amount of RAM to buy:", + "ram_metadata_buy_description": "Exchange {token} for RAM on the {network} network using an {network} compatible wallet.", + "ram_metadata_buy_title": "{token}/RAM Market | {network} Network", + "ram_metadata_overview_description": "An overview of RAM Market on the {network} network that provides access to buy and sell RAM with {token} using an {network} compatible wallet.", + "ram_metadata_sell_description": "Exchange RAM for {token} on the {network} network using an {network} compatible wallet.", + "ram_page_sell_subtitle": "Exchange RAM for {token} on the {network} network.", + "ram_page_subtitle": "Exchange {token} for RAM on the {network} network.", + "ram_purchase_value": "RAM Purchase Value", + "ram_sale_value": "Amount of RAM to sell:", + "ram_to_purchase": "RAM to be bought", + "ram_to_sell": "RAM to be sold", + "search_view_type": "View {type}", "send_amount_to_send": "Amount to send", "send_enter_amount": "Enter the amount of {token} to send", "send_memo_placeholder": "Specify a public memo for this transfer (optional)", @@ -64,5 +122,31 @@ "send_receiving_placeholder": "Enter the account name of the recipient", "send_start_new": "Start new send", "send_tokens_to_send": "Token to send", - "test_locale_string": "This is a test" + "settings_advanced": "Advanced", + "settings_developer": "Developer", + "settings_enable_advanced": "Enable Advanced Options", + "settings_enable_advanced_desc": "Manage network resources, enhanced asset precision, etc.", + "settings_enable_developer": "Enable Developer Mode", + "settings_enable_developer_desc": "Show raw data used for development and debugging", + "settings_general": "General", + "settings_language_selector": "Language Selector", + "settings_prevent_account_page_switching": "Remain on current page when switching accounts", + "settings_prevent_account_page_switching_desc": "Prevents the automatic navigation to the account overview page", + "settings_search_account_switch": "Allow account switching in search prompt", + "settings_search_account_switch_desc": "Adds logged in accounts to search results for quick switching.", + "settings_search_show_pages": "Allow page navigation in search prompt", + "settings_search_show_pages_desc": "Adds popular Unicove pages to search results.", + "staking_calculator": "Staking Calculator", + "staking_calculator_description": "Enter an amount of {token} to calculate estimated rewards based\t\ton the current APR of {apr}%. This rate will change over time based on the amount of tokens\t\tstaked.", + "staking_estimated_yield_yearly": "Estimated Yield (Yearly)", + "staking_metadata_overview_description": "An overview of staking on the {network} network providing easy access to stake, unstake, and withdraw {token} tokens using an {network} compatible wallet.", + "staking_metadata_stake_description": "Stake {token} tokens and earn rewards using an {network} compatible wallet.", + "staking_metadata_unstake_description": "Unstake {token} tokens and begin claiming the balance of your rewards using an {network} compatible wallet.", + "staking_metadata_withdraw_description": "Withdraw {token} tokens from the staking contract to add them to your available balance using an {network} compatible wallet.", + "staking_minimum_lockup": "Minimum lockup", + "staking_network_subtitle": "Stake {token} to earn rewards.", + "staking_network_title": "{network} Network Staking", + "staking_withdraw_timeframe": "Withdrawable in 21 days", + "test_locale_string": "This is a test", + "total_proceeds": "Total Proceeds" } diff --git a/package.json b/package.json index 6c08b643..e4043456 100644 --- a/package.json +++ b/package.json @@ -53,7 +53,7 @@ "@tailwindcss/container-queries": "^0.1.1", "@wharfkit/account": "^1.2.0", "@wharfkit/account-creation-plugin-greymass": "^1.2.0", - "@wharfkit/account-creation-plugin-metamask": "^1.0.0", + "@wharfkit/account-creation-plugin-metamask": "^1.0.2", "@wharfkit/antelope": "^1.0.11", "@wharfkit/common": "^1.4.0", "@wharfkit/contract": "^1.1.5", diff --git a/src/lib/components/accountswitch.svelte b/src/lib/components/accountswitch.svelte index 27dab272..cee0dc98 100644 --- a/src/lib/components/accountswitch.svelte +++ b/src/lib/components/accountswitch.svelte @@ -4,7 +4,6 @@ import { createDialog, melt } from '@melt-ui/svelte'; import { Session, type SerializedSession } from '@wharfkit/session'; import { chainLogos } from '@wharfkit/common'; - import { getSetting } from '$lib/state/settings.svelte'; import type { UnicoveContext } from '$lib/state/client.svelte'; import type { NetworkState } from '$lib/state/network.svelte'; @@ -21,9 +20,6 @@ const context = getContext('state'); - const { value: preventAccountPageSwitch } = getSetting('prevent-account-page-switching', false); - const advancedMode = $derived(getSetting('advanced-mode', false).value); - interface PageProps { class?: string; network: NetworkState; @@ -45,7 +41,7 @@ function switchSession(session: SerializedSession) { context.wharf.switch(session); - if (!preventAccountPageSwitch) { + if (!context.settings.data.preventAccountPageSwitching) { goto(`/${languageTag()}/${network}/account/${session.actor}`); } closeDrawer(); @@ -142,13 +138,13 @@ }} >
+ + {/if} + + diff --git a/src/lib/components/descriptionlist.svelte b/src/lib/components/descriptionlist.svelte index f0d625b2..d8d06255 100644 --- a/src/lib/components/descriptionlist.svelte +++ b/src/lib/components/descriptionlist.svelte @@ -1,7 +1,9 @@ + +
+ {#if props.items} + {#each props.items as item} + + {item.value} + + {/each} + {:else if props.children} + {@render props.children()} + {/if} +
diff --git a/src/lib/components/descriptionlist/dlrow.svelte b/src/lib/components/descriptionlist/dlrow.svelte new file mode 100644 index 00000000..70128fda --- /dev/null +++ b/src/lib/components/descriptionlist/dlrow.svelte @@ -0,0 +1,16 @@ + + +
+
{title}
+
{@render children()}
+
diff --git a/src/lib/components/descriptionlist/index.ts b/src/lib/components/descriptionlist/index.ts new file mode 100644 index 00000000..8947140a --- /dev/null +++ b/src/lib/components/descriptionlist/index.ts @@ -0,0 +1,2 @@ +export { default as DL } from './dl.svelte'; +export { default as DLRow } from './dlrow.svelte'; diff --git a/src/lib/components/elements/account.svelte b/src/lib/components/elements/account.svelte index 6e8b479c..8eb4fa8a 100644 --- a/src/lib/components/elements/account.svelte +++ b/src/lib/components/elements/account.svelte @@ -11,7 +11,7 @@ import { page } from '$app/stores'; interface Props extends HTMLAnchorAttributes { - name: string; + name: Name | string; contract?: boolean; children?: Snippet; preview?: boolean; @@ -50,7 +50,10 @@ {#if children} diff --git a/src/lib/components/elements/asset.svelte b/src/lib/components/elements/asset.svelte index e58bd088..b17fcd61 100644 --- a/src/lib/components/elements/asset.svelte +++ b/src/lib/components/elements/asset.svelte @@ -4,9 +4,10 @@ import { languageTag } from '$lib/paraglide/runtime.js'; import { cn } from '$lib/utils'; - import { getSetting } from '$lib/state/settings.svelte'; + import type { UnicoveContext } from '$lib/state/client.svelte'; + import { getContext } from 'svelte'; - const advancedMode = getSetting('advanced-mode', false); + const context = getContext('state'); interface AssetProps extends HTMLAttributes { value?: Asset; @@ -28,7 +29,7 @@ const currencyOptions: Intl.NumberFormatOptions = { style: 'currency', currency: asset?.symbol.name, - minimumFractionDigits: advancedMode.value ? asset?.symbol.precision : undefined + minimumFractionDigits: context.settings.data.advancedMode ? asset?.symbol.precision : undefined }; function formatAssetValue() { diff --git a/src/lib/components/elements/block.svelte b/src/lib/components/elements/block.svelte new file mode 100644 index 00000000..c25148e7 --- /dev/null +++ b/src/lib/components/elements/block.svelte @@ -0,0 +1,14 @@ + + +{#if number} + + {String(number)} + +{/if} diff --git a/src/lib/components/navigation/sidemenu.svelte b/src/lib/components/navigation/sidemenu.svelte index deebf0e3..bd32c192 100644 --- a/src/lib/components/navigation/sidemenu.svelte +++ b/src/lib/components/navigation/sidemenu.svelte @@ -5,7 +5,6 @@ import UnicoveLogo from '$lib/assets/unicovelogo.svelte'; import type { UnicoveContext } from '$lib/state/client.svelte'; import type { NetworkState } from '$lib/state/network.svelte'; - import { getSetting } from '$lib/state/settings.svelte'; const context = getContext('state'); @@ -17,14 +16,10 @@ let { callbackFn, network, class: className }: Props = $props(); - const advancedMode = getSetting('advanced-mode', false); - // Example: ['', 'en', 'eos', 'staking', 'withdraw'] let pathname = $derived($page.url.pathname.split('/')); const destinations = $derived.by(() => { - const isAdvancedMode = advancedMode.value; - const items = [ // { // href: `/${network}`, @@ -46,7 +41,7 @@ items.push({ href: `/${network}/ram`, text: 'RAM', active: pathname[3] === 'ram' }); } - if (isAdvancedMode) { + if (context.settings.data.advancedMode) { items.push({ href: `/${network}/resources`, text: 'Resources', @@ -54,6 +49,14 @@ }); } + if (context.settings.data.debugMode) { + items.push({ + href: `/${network}/debug/state`, + text: 'Debug State', + active: pathname[3] === 'debug' + }); + } + if (context.account) { items.splice(0, 0, { href: `/${network}/account/${context.account.name}`, diff --git a/src/lib/components/networkswitch.svelte b/src/lib/components/networkswitch.svelte index 9595ce0a..80b521b0 100644 --- a/src/lib/components/networkswitch.svelte +++ b/src/lib/components/networkswitch.svelte @@ -11,7 +11,6 @@ import { goto } from '$app/navigation'; import { languageTag } from '$lib/paraglide/runtime'; import type { NetworkState } from '$lib/state/network.svelte'; - import { getSetting } from '$lib/state/settings.svelte'; interface Props { currentNetwork: NetworkState; @@ -20,8 +19,6 @@ const context = getContext('state'); - const advancedMode = getSetting('advanced-mode', false).value; - let currentSession = $derived(context.wharf.session); const { class: className, currentNetwork, ...props }: Props = $props(); @@ -61,12 +58,12 @@ id="network-switcher" class={cn( 'flex items-center gap-3 rounded-2xl px-4 py-3.5 focus:bg-mineShaft-950 focus:outline-none', - advancedMode && 'hover:bg-mineShaft-950', + !!context.settings.data.advancedMode && 'hover:bg-mineShaft-950', className )} use:melt={$trigger} {...props} - disabled={!advancedMode} + disabled={!context.settings.data.advancedMode} > {#if logo} @@ -85,7 +82,7 @@ >{currentNetwork.chain.name} - {#if advancedMode} + {#if context.settings.data.advancedMode}
Change network - import { type ComponentProps } from 'svelte'; + import { getContext, type ComponentProps } from 'svelte'; import { createDialog, melt, type CreateDialogProps } from '@melt-ui/svelte'; import type TextInput from '../input/text.svelte'; - import type { NetworkState } from '$lib/state/network.svelte'; import { preventDefault } from '$lib/utils'; import { goto } from '$app/navigation'; import { fade, scale } from 'svelte/transition'; import * as m from '$lib/paraglide/messages'; import { - RecordStorage, SearchRecordType, search, isSearchBlock, @@ -24,26 +22,28 @@ import Result from './result.svelte'; import { browser } from '$app/environment'; import { ArrowRight } from 'lucide-svelte'; + import type { UnicoveContext } from '$lib/state/client.svelte'; + import type { SerializedSession } from '@wharfkit/session'; + import { languageTag } from '$lib/paraglide/runtime'; + + const context = getContext('state'); interface NameInputProps extends ComponentProps { debug?: boolean; - network: NetworkState; } - let { network, ref = $bindable(), debug = false, class: className }: NameInputProps = $props(); + let { ref = $bindable(), debug = false, class: className }: NameInputProps = $props(); let searchValue: string = $state(''); let selectedIndex: number = $state(0); - const searchHistory = new RecordStorage(network); - - let results: SearchRecord[] = $state(searchHistory.get()); + let results: SearchRecord[] = $state(context.history.get()); $effect(() => { if (searchValue) { - results = search(searchValue, network, searchHistory); + results = search(context, searchValue); } else { - results = searchHistory.get(); + results = context.history.get(); } }); @@ -67,15 +67,15 @@ const result = $derived.by(() => { switch (searchType) { case SearchRecordType.ACCOUNT: - return `/${network}/account/${searchValue}`; + return `/${context.network}/account/${searchValue}`; case SearchRecordType.BLOCK: - return `/${network}/block/${searchValue}`; + return `/${context.network}/block/${searchValue}`; case SearchRecordType.KEY: - return `/${network}/key/${searchValue}`; + return `/${context.network}/key/${searchValue}`; case SearchRecordType.TRANSACTION: - return `/${network}/transaction/${searchValue}`; + return `/${context.network}/transaction/${searchValue}`; case SearchRecordType.PAGE: - return `/${network}/${searchValue}`; + return `/${context.network}/${searchValue}`; default: console.log('unknown search type', searchType); return null; @@ -89,7 +89,7 @@ // Build the dialog element const { - elements: { trigger, portalled, overlay, content, close }, + elements: { trigger, portalled, overlay, content }, states: { open } } = createDialog({ forceVisible: true, @@ -121,7 +121,7 @@ selectedIndex = 0; return; } - // Select next searchHistory item + // Select next context.history item selectedIndex = (results.length + selectedIndex + 1) % results.length; event.preventDefault(); return; @@ -132,7 +132,7 @@ selectedIndex = results.length; return; } - // Select previous searchHistory item + // Select previous context.history item selectedIndex = (results.length + selectedIndex - 1) % results.length; event.preventDefault(); return; @@ -140,13 +140,40 @@ } } - function goToResult() { + async function goToResult() { const result = results[selectedIndex]; - if (result) { - searchHistory.add(result); - goto(result.url); + if (!result) { + return; + } + + // Clear the search history and keep search open, resetting + if (result.type === SearchRecordType.CLEAR) { + context.history.clear(); + searchValue = ''; + return; } + closeSearch(); + + // Switch accounts if this is a request to switch + if ([SearchRecordType.SWITCH].includes(result.type)) { + context.wharf.switch(result.data as SerializedSession); + // Navigate if needed + if (!context.settings.data.preventAccountPageSwitching) { + goto(`/${languageTag()}${result.url}`); + } + return; + } + + // Should this result type be saved in history? + if (![SearchRecordType.SWITCH, SearchRecordType.UNKNOWN].includes(result.type)) { + context.history.add(result); + } + + // Should this result type navigate to the URL? + if (![SearchRecordType.SWITCH, SearchRecordType.UNKNOWN].includes(result.type)) { + goto(`/${languageTag()}${result.url}`); + } } function closeSearch() { @@ -256,7 +283,7 @@ {#if !searchValue} @@ -321,7 +348,7 @@ diff --git a/src/lib/components/search/result.svelte b/src/lib/components/search/result.svelte index 4821e97b..ed6a758e 100644 --- a/src/lib/components/search/result.svelte +++ b/src/lib/components/search/result.svelte @@ -1,6 +1,7 @@ + + + {@render children()} + diff --git a/src/routes/[network]/(account)/ram/(forms)/buy/+page.svelte b/src/routes/[network]/(account)/ram/(forms)/buy/+page.svelte new file mode 100644 index 00000000..6fd898ce --- /dev/null +++ b/src/routes/[network]/(account)/ram/(forms)/buy/+page.svelte @@ -0,0 +1,204 @@ + + + + {#if transactionId} + + {:else} +
+
+ +{#if context.settings.data.debugMode} +

{m.common_debugging()}}

+ {JSON.stringify( + { + payer: buyRamState.payer, + receiver: buyRamState.receiver, + bytes: buyRamState.bytes, + balance: buyRamState.balance, + chain: buyRamState.chain, + pricePerKB: buyRamState.pricePerKB, + pricePerByte: buyRamState.pricePerByte, + bytesValue: buyRamState.bytesValue, + valid: buyRamState.valid, + insufficientBalance: buyRamState.insufficientBalance, + balances: context.account?.balances + }, + undefined, + 2 + )} +{/if} diff --git a/src/routes/[network]/(account)/ram/(forms)/buy/+page.ts b/src/routes/[network]/(account)/ram/(forms)/buy/+page.ts new file mode 100644 index 00000000..4c478390 --- /dev/null +++ b/src/routes/[network]/(account)/ram/(forms)/buy/+page.ts @@ -0,0 +1,28 @@ +import { languageTag } from '$lib/paraglide/runtime'; +import type { PageLoad } from './$types'; +import * as m from '$lib/paraglide/messages'; + +export const load: PageLoad = async ({ params, parent }) => { + const { network } = await parent(); + return { + backPath: `/${languageTag()}/${params.network}/ram`, + title: m.common_unit_buy({ unit: 'RAM' }), + subtitle: m.ram_page_subtitle({ + token: network.chain.systemToken?.symbol.name || m.common_tokens(), + network: network.chain.name + }), + pageMetaTags: { + title: [ + m.common_unit_buy({ unit: 'RAM' }), + m.ram_metadata_buy_title({ + token: network.chain.systemToken?.symbol.name || m.common_tokens(), + network: network.chain.name + }) + ].join(' | '), + description: m.ram_metadata_buy_description({ + token: network.chain.systemToken?.symbol.name || m.common_tokens(), + network: network.chain.name + }) + } + }; +}; diff --git a/src/routes/[network]/(account)/ram/buy/state.svelte.ts b/src/routes/[network]/(account)/ram/(forms)/buy/state.svelte.ts similarity index 100% rename from src/routes/[network]/(account)/ram/buy/state.svelte.ts rename to src/routes/[network]/(account)/ram/(forms)/buy/state.svelte.ts diff --git a/src/routes/[network]/(account)/ram/sell/+page.svelte b/src/routes/[network]/(account)/ram/(forms)/sell/+page.svelte similarity index 77% rename from src/routes/[network]/(account)/ram/sell/+page.svelte rename to src/routes/[network]/(account)/ram/(forms)/sell/+page.svelte index 23eea35f..f6d7ab8a 100644 --- a/src/routes/[network]/(account)/ram/sell/+page.svelte +++ b/src/routes/[network]/(account)/ram/(forms)/sell/+page.svelte @@ -2,7 +2,6 @@ import { getContext } from 'svelte'; import { Checksum256 } from '@wharfkit/antelope'; - import { getSetting } from '$lib/state/settings.svelte.js'; import type { UnicoveContext } from '$lib/state/client.svelte'; import SummarySellRAM from '$lib/components/summary/eosio/sellram.svelte'; @@ -14,9 +13,9 @@ import TransactionSummary from '$lib/components/transactionSummary.svelte'; import AssetInput from '$lib/components/input/asset.svelte'; import BytesInput from '$lib/components/input/bytes.svelte'; - import Card from '$lib/components/layout/box/card.svelte'; import AssetText from '$lib/components/elements/asset.svelte'; import RamResource from '$lib/components/elements/ramresource.svelte'; + import * as m from '$lib/paraglide/messages'; import { SellRAMState } from './state.svelte'; import { calAvailableSize, preventDefault } from '$lib/utils'; @@ -26,7 +25,6 @@ const context = getContext('state'); const { data } = $props(); - const debugMode = getSetting('debug-mode', true); const sellRamState: SellRAMState = $state(new SellRAMState(data.network.chain)); const ramAvailableSize = $derived(calAvailableSize(context.account?.ram)); @@ -87,14 +85,12 @@ {#if transactionId} -{/if} - - +{:else}