problem: warning should be on buymerits not sellmerits

resolve https://github.com/nostrocket/hypergolic/issues/83

solution: since BuyMerits already provides a more effective warning, the warning for SellMerits has been removed
This commit is contained in:
Bob
2024-08-21 17:16:41 +08:00
parent 6fb982da43
commit 97b46c9afd

View File

@@ -4,8 +4,6 @@
import Button from '@/components/ui/button/button.svelte';
import { ndk } from '@/ndk';
import { currentUser } from '@/stores/session';
import ExclamationTriangle from 'svelte-radix/ExclamationTriangle.svelte';
import * as Alert from '$lib/components/ui/alert/index.js';
import validate from 'bitcoin-address-validation';
export let amrAuction: AMRAuction | undefined;
@@ -15,7 +13,6 @@
let bitcoinAddress: string = '';
$: bitcoinAddressInValid = true;
$: bitcoinAddressError = '';
$: isTestRocket = rocket.Name().toLowerCase().includes('test');
$: if (bitcoinAddress) {
if (!validate(bitcoinAddress)) {
@@ -63,15 +60,6 @@
You are selling {amrAuction.Merits} Merits
</div>
<div class="m-2 flex flex-col">
{#if isTestRocket}
<Alert.Root variant="destructive">
<ExclamationTriangle class="h-4 w-4" />
<Alert.Title>Warning</Alert.Title>
<Alert.Description
>Please do not enter a real Bitcoin address, as this is a test rocket.</Alert.Description
>
</Alert.Root>
{/if}
<div class="flex">
<Input
bind:value={bitcoinAddress}