-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(frontend): BtcSendReview component
- Loading branch information
1 parent
12c3e92
commit 677eb52
Showing
1 changed file
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<script lang="ts"> | ||
import SendReview from '$lib/components/send/SendReview.svelte'; | ||
import type { NetworkId } from '$lib/types/network'; | ||
import { invalidAmount } from '$lib/utils/input.utils'; | ||
import { isInvalidDestinationBtc } from '$lib/utils/send.utils'; | ||
export let destination = ''; | ||
export let amount: number | undefined = undefined; | ||
export let networkId: NetworkId | undefined = undefined; | ||
export let source: string; | ||
// Should never happen given that the same checks are performed on previous wizard step | ||
let invalid = true; | ||
$: invalid = | ||
isInvalidDestinationBtc({ | ||
destination, | ||
networkId | ||
}) || invalidAmount(amount); | ||
</script> | ||
|
||
<SendReview {source} {amount} {destination} disabled={invalid} /> |