Skip to content

Commit

Permalink
Custom tip fix (#4881)
Browse files Browse the repository at this point in the history
  • Loading branch information
julianjelfs authored Nov 29, 2023
1 parent 98f43a8 commit 796c929
Showing 1 changed file with 23 additions and 23 deletions.
46 changes: 23 additions & 23 deletions frontend/app/src/components/home/TipBuilder.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
$: valid =
exchangeRate > 0 &&
draftAmount > 0n &&
remainingBalance > 0n &&
remainingBalance >= 0n &&
error === undefined &&
!tokenChanging;
$: zero = cryptoBalance <= tokenDetails.transferFee && !tokenChanging;
Expand Down Expand Up @@ -291,29 +291,29 @@
<ErrorMessage>{$_(error)}</ErrorMessage>
{/if}
</div>
{/if}
</div>
<div class="custom-tip">
{#if !showCustomTip}
<a
role="button"
tabindex="0"
on:click={() => (showCustomTip = true)}
class="options"
in:fade|local={{ duration: 500 }}
class:expanded={showCustomTip}>
{$_("tip.showCustom")}
</a>
{/if}
<div class="custom-tip">
{#if !showCustomTip}
<a
role="button"
tabindex="0"
on:click={() => (showCustomTip = true)}
class="options"
in:fade|local={{ duration: 500 }}
class:expanded={showCustomTip}>
{$_("tip.showCustom")}
</a>
{/if}

{#if showCustomTip}
<div in:fade|local={{ duration: 500 }} class="custom-tip-amount">
<TokenInput
{ledger}
{transferFees}
bind:valid={validAmount}
maxAmount={maxAmount(cryptoBalance)}
bind:amount={draftAmount} />
{#if showCustomTip}
<div in:fade|local={{ duration: 500 }} class="custom-tip-amount">
<TokenInput
{ledger}
{transferFees}
bind:valid={validAmount}
maxAmount={maxAmount(cryptoBalance)}
bind:amount={draftAmount} />
</div>
{/if}
</div>
{/if}
</div>
Expand Down

0 comments on commit 796c929

Please sign in to comment.