Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -227,3 +227,7 @@
.walletOptionBitcoin > div {
background: var(--data-orange);
}

.walletOptionMidnight > div {
background: var(--data-bright-blue);
}
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ export const UserInfo = ({
);

const renderLmpWallet = useCallback(
({ walletIcon, walletId, walletName }: LmpBundleWallet, isLast: boolean) => (
({ walletId, walletName }: LmpBundleWallet, isLast: boolean) => (
<div key={walletId}>
<ProfileDropdown.WalletOption
style={{ textAlign: 'left' }}
Expand All @@ -206,8 +206,11 @@ export const UserInfo = ({
onClick={switchToLMP}
type={'hot'}
profile={{
fallbackText: walletName,
imageSrc: walletIcon
customProfileComponent: (
<span className={styles.walletOptionMidnight}>
<ProfileDropdown.WalletIcon type="hot" testId={'wallet-option-icon'} />
</span>
)
}}
/>
{isLast ? undefined : <Separator />}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,12 @@ const api: BundleAppApi = {
map((wallets) =>
wallets.map(
(wallet): LmpBundleWallet => ({
// TODO: icon should be different based on wallet type (same as in v1 dropdown menu)
walletIcon: isBitcoinWallet(wallet) ? bitcoinLogo : cardanoLogo,
walletId: wallet.walletId,
walletName: wallet.metadata.name,
encryptedRecoveryPhrase: isInMemoryWallet(wallet) ? wallet.encryptedSecrets.keyMaterial : undefined
encryptedRecoveryPhrase: isInMemoryWallet(wallet) ? wallet.encryptedSecrets.keyMaterial : undefined,
blockchain: isBitcoinWallet(wallet) ? 'Bitcoin' : 'Cardano',
walletType: wallet.type
})
)
)
Expand Down
6 changes: 5 additions & 1 deletion v1/apps/browser-extension-wallet/src/utils/lmp.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
// mostly duplicated in v1 and lmp module, could be a shared library
import { RemoteApiProperties, RemoteApiPropertyType } from '@cardano-sdk/web-extension';
import { RemoteApiProperties, RemoteApiPropertyType, WalletType } from '@cardano-sdk/web-extension';
import { Observable } from 'rxjs';
import { storage } from 'webextension-polyfill';
import { Language } from '@lace/translation';

export type BlockchainName = 'Bitcoin' | 'Cardano' | 'Midnight';

export type LmpBundleWallet = {
walletId: string;
walletName: string;
walletIcon: string;
encryptedRecoveryPhrase?: string;
blockchain: BlockchainName;
walletType: WalletType;
};

export type BundleAppApi = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ $data: (
'pink-10': rgba(255, 84, 112, 0.1),
'orange': #ff8e3c,
'green': #2cb67d,
'blue': #3489f7
'blue': #3489f7,
'bright-blue': #0000FE
);
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ $data: (
'pink-10': rgba(255, 84, 112, 0.1),
'orange': #ff8e3c,
'green': #2cb67d,
'blue': #3489f7
'blue': #3489f7,
'bright-blue': #0000FE
);
Loading