Skip to content

Commit

Permalink
Update external wallet linking demo (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
tolgahan-arikan authored Aug 27, 2024
1 parent cab2570 commit 9aaeb70
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 92 deletions.
20 changes: 14 additions & 6 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useEffect, useState } from 'react'
import { Box, Text, Divider, Button, Spinner, Modal, Collapsible } from '@0xsequence/design-system'
import { Box, Text, Divider, Button, Spinner, Modal, Collapsible, ExternalLinkIcon } from '@0xsequence/design-system'

import { router, sequence } from './main'

Expand All @@ -13,7 +13,6 @@ import { AnimatePresence } from 'framer-motion'
import { PINCodeInput } from './components/PINCodeInput'
import { SendERC20View } from './components/views/SendERC20View'
import { SendERC1155View } from './components/views/SendERC1155View'
import { EOALinkView } from './components/views/EOALinkView'
import { NetworkSwitch } from './components/NetworkSwitch.tsx'
import { accountToName, ListAccountsView } from './components/views/ListAccountsView.tsx'
import { Account, IdentityType, Network } from '@0xsequence/waas'
Expand All @@ -40,7 +39,7 @@ function App() {
setFetchWalletAddressError(e.message)
})

sequence.listAccounts().then((response) => {
sequence.listAccounts().then(response => {
if (response.currentAccountId) {
setCurrentAccount(response.accounts.find(account => account.id === response.currentAccountId))
}
Expand Down Expand Up @@ -189,9 +188,18 @@ function App() {
<Divider background="buttonGlass" />
<CallContractsView network={network} />
</Collapsible>
<Collapsible marginY={'3'} label="EOA Link">
<Divider background="buttonGlass" />
<EOALinkView network={network} walletAddress={walletAddress} />
<Collapsible marginY={'3'} label="External Wallet Linking Demo">
<Text
as="a"
variant="medium"
color="text100"
href="https://demo-waas-wallet-link.pages.dev/"
target="_blank"
rel="noopener noreferrer"
>
Go to demo
<ExternalLinkIcon position="relative" top="1" marginLeft="1" />
</Text>
</Collapsible>
<ListAccountsView />
</Box>
Expand Down
2 changes: 1 addition & 1 deletion src/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { randomName } from './utils/indexer'
import { useEmailAuth } from './utils/useEmailAuth.ts'
import { useEmailAuthV2 } from './utils/useEmailAuthV2.ts'
import { StytchLogin } from './components/StytchLogin.tsx'
import {StytchLegacyLogin} from "./components/StytchLegacyLogin.tsx"
import { StytchLegacyLogin } from './components/StytchLegacyLogin.tsx'
import { EmailConflictInfo } from '@0xsequence/waas'

function Login() {
Expand Down
85 changes: 0 additions & 85 deletions src/components/views/EOALinkView.tsx

This file was deleted.

0 comments on commit 9aaeb70

Please sign in to comment.