/
EnableLedgerBlindSigningPopup.svelte
42 lines (38 loc) · 1.45 KB
/
EnableLedgerBlindSigningPopup.svelte
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<script lang="typescript">
import { Text, Icon } from 'shared/components'
import { localize } from '@core/i18n'
import {
checkOrConnectLedger,
ledgerNanoStatus,
ledgerPreparedOutput,
resetLedgerPreparedOutput,
} from '@core/ledger'
import { closePopup } from '@auxiliary/popup'
import { sendOutput } from '@core/wallet'
const STEPS = [1, 2, 3, 4]
$: if ($ledgerNanoStatus.blindSigningEnabled) {
closePopup()
checkOrConnectLedger(async () => {
await sendOutput($ledgerPreparedOutput)
resetLedgerPreparedOutput()
})
}
</script>
<Text type="h3" classes="mb-6">{localize('popups.enableLedgerBlindSigning.title')}</Text>
<div class="w-full h-full space-y-2 flex flex-auto flex-col flex-shrink-0">
<div class="bg-yellow-50 w-full h-full space-y-6 rounded-md px-6 py-4">
<span class="flex flex-row items-center space-x-4">
<Icon boxed height={18} width={18} icon="info-filled" classes="text-yellow-700" />
<Text type="p" fontSize="14" color="gray-700" darkColor="gray-700"
>{localize('popups.enableLedgerBlindSigning.info')}</Text
>
</span>
</div>
<div>
{#each STEPS as step}
<Text type="p" fontSize="15" color="gray-600" classes="my-2">
{step}. {localize(`popups.enableLedgerBlindSigning.step_${step}`)}
</Text>
{/each}
</div>
</div>