Skip to content

Commit 0e37eed

Browse files
feat(frontend): IC send review accepts NFTs (#10629)
# Motivation Copying what was done in `EthSendReview`, we add the possibility to have NFT in component `IcSendReview`, to prepare for EXT tokens.
1 parent d246009 commit 0e37eed

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/frontend/src/icp/components/send/IcSendReview.svelte

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,20 @@
77
import SendReview from '$lib/components/send/SendReview.svelte';
88
import { SEND_CONTEXT_KEY, type SendContext } from '$lib/stores/send.store';
99
import type { ContactUi } from '$lib/types/contact';
10+
import type { Nft } from '$lib/types/nft';
1011
import type { OptionAmount } from '$lib/types/send';
1112
import { invalidAmount } from '$lib/utils/input.utils';
1213
1314
interface Props {
1415
destination?: string;
1516
amount?: OptionAmount;
1617
selectedContact?: ContactUi;
18+
nft?: Nft;
1719
onBack: () => void;
1820
onSend: () => void;
1921
}
2022
21-
let { destination = '', amount, selectedContact, onBack, onSend }: Props = $props();
23+
let { destination = '', amount, selectedContact, nft, onBack, onSend }: Props = $props();
2224
2325
const { sendTokenStandard } = getContext<SendContext>(SEND_CONTEXT_KEY);
2426
@@ -29,11 +31,11 @@
2931
destination,
3032
tokenStandard: $sendTokenStandard
3133
}) ||
32-
invalidAmount(amount)
34+
(isNullish(nft) && invalidAmount(amount))
3335
);
3436
</script>
3537

36-
<SendReview {amount} {destination} disabled={invalid} {onBack} {onSend} {selectedContact}>
38+
<SendReview {amount} {destination} disabled={invalid} {nft} {onBack} {onSend} {selectedContact}>
3739
{#snippet fee()}
3840
<IcTokenFee />
3941
{/snippet}

0 commit comments

Comments
 (0)