Skip to content

Commit

Permalink
chore: added supported chains for each wallet
Browse files Browse the repository at this point in the history
  • Loading branch information
dafuga committed Oct 25, 2024
1 parent 7d7edb9 commit f7cf8bf
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 12 deletions.
1 change: 0 additions & 1 deletion src/routes/[network]/(account)/signup/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
function isFutureStep(stepIndex: number) {
const currentStep = getCurrentStep();
console.log({ currentStep, stepIndex });
if (!currentStep) return false;
return stepIndex > steps.indexOf(currentStep);
}
Expand Down
2 changes: 1 addition & 1 deletion src/routes/[network]/(account)/signup/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
const currentEnvironment = detectEnvironment();
const currentWalletType = walletTypes[currentEnvironment];
const recommendedWallet = currentWalletType.wallets[0];
const otherWallets = currentWalletType.wallets.slice(1);
const otherWallets = currentWalletType.networkWallets(data.network.shortname).slice(1);
</script>

<Stack class="gap-2">
Expand Down
39 changes: 30 additions & 9 deletions src/routes/[network]/(account)/signup/walletTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,14 @@ export const walletTypes: Record<string, WalletType> = {
'Offline storage of private keys',
'Support for multiple cryptocurrencies'
],
wallets: [{ name: 'Ledger', route: 'signup/wallets/hardware/ledger', logo: LedgerLogo }]
wallets: [
{
name: 'Ledger',
route: 'signup/wallets/hardware/ledger',
logo: LedgerLogo,
supportedNetworks: ['eos', 'jungle4']
}
]
}),
desktop: new WalletType({
type: 'desktop',
Expand All @@ -91,21 +98,24 @@ export const walletTypes: Record<string, WalletType> = {
name: 'MetaMask',
route: 'signup/wallets/extensions/metamask',
logo: MetaMaskLogo,
description: 'Secure and easy-to-use browser extension wallet.'
description: 'Secure and easy-to-use browser extension wallet.',
supportedNetworks: ['eos', 'jungle4']
},
{
name: 'Anchor',
route: 'signup/wallets/desktop/anchor',
logo: AnchorLogo,
description:
'Popular option with a user-friendly interface. Supports multiple EOSIO chains.'
'Popular option with a user-friendly interface. Supports multiple EOSIO chains.',
supportedNetworks: ['eos', 'jungle4']
},
{
name: 'Wombat',
route: 'signup/wallets/desktop/wombat',
logo: WombatLogo,
description:
'Fast and secure with multi-chain support. Offers a smooth onboarding experience.'
'Fast and secure with multi-chain support. Offers a smooth onboarding experience.',
supportedNetworks: ['eos']
}
]
}),
Expand All @@ -125,20 +135,23 @@ export const walletTypes: Record<string, WalletType> = {
route: 'signup/wallets/mobile/anchor',
logo: AnchorLogo,
description:
'Popular mobile option with a user-friendly interface. Supports multiple EOSIO chains.'
'Popular mobile option with a user-friendly interface. Supports multiple EOSIO chains.',
supportedNetworks: ['eos', 'jungle4']
},
{
name: 'Wombat Mobile',
route: 'signup/wallets/mobile/wombat',
logo: WombatLogo,
description:
'Fast and secure with multi-chain support. Offers a smooth onboarding experience.'
'Fast and secure with multi-chain support. Offers a smooth onboarding experience.',
supportedNetworks: ['eos']
},
{
name: 'TokenPocket',
route: 'signup/wallets/mobile/tokenpocket',
logo: TokenPocketLogo,
description: 'A leading crypto wallet that supports multiple chains.'
description: 'A leading crypto wallet that supports multiple chains.',
supportedNetworks: ['eos']
}
]
}),
Expand All @@ -158,9 +171,17 @@ export const walletTypes: Record<string, WalletType> = {
name: 'MetaMask',
route: 'signup/wallets/extensions/metamask',
logo: MetaMaskLogo,
description: 'MetaMask is a secure and easy-to-use browser extension wallet.'
description: 'MetaMask is a secure and easy-to-use browser extension wallet.',
supportedNetworks: ['eos', 'jungle4']
},
{ name: 'Wombat', route: 'signup/wallets/extensions/wombat', logo: WombatLogo }
{
name: 'Wombat',
route: 'signup/wallets/extensions/wombat',
logo: WombatLogo,
description:
'Fast and secure with multi-chain support. Offers a smooth onboarding experience.',
supportedNetworks: ['eos']
}
]
})
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import { page } from '$app/stores';
import Button from '$lib/components/button/button.svelte';
import Stack from '$lib/components/layout/stack.svelte';
import { name } from '@melt-ui/svelte';
import { walletTypes } from '../../walletTypes';
import { ChevronRight } from 'lucide-svelte';
Expand Down Expand Up @@ -49,7 +50,7 @@
<Stack>
<h3 class="h2">Available Wallets</h3>
<Stack>
{#each currentWalletType.networkWallets(data.network.chain.name) as wallet}
{#each currentWalletType.networkWallets(data.network.shortname) as wallet}
<a
href="/{data.network}/{wallet.route}"
class="group grid grid-cols-[auto_1fr_auto] items-center gap-4 rounded-2xl border border-white/20 p-4
Expand Down

0 comments on commit f7cf8bf

Please sign in to comment.