Skip to content

Commit

Permalink
fix: lose wallet icons on web profile
Browse files Browse the repository at this point in the history
  • Loading branch information
halv1s committed Nov 21, 2023
1 parent 5e4552a commit fd223f1
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
Binary file modified apps/mobile/assets/img/setting/icon-aptos.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/web/assets/img/send-token/icon-aptos.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion apps/web/assets/img/send-token/icon-aptos.svg

This file was deleted.

11 changes: 10 additions & 1 deletion packages/app/features/Setting/components/MyWallets/Wallet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { copy, getNetworkInfo } from '@walless/app/utils';
import { shortenAddress } from '@walless/core';
import { Hoverable, Text, View } from '@walless/gui';
import { Copy } from '@walless/icons';
import { modules } from '@walless/ioc';
import type { PublicKeyDocument } from '@walless/store';

interface Props {
Expand All @@ -13,14 +14,22 @@ interface Props {

export const Wallet: FC<Props> = ({ item, index }) => {
const network = getNetworkInfo(item.network);

const onCopy = async () => {
await copy(item._id, () => <Copy size={18} color="#FFFFFF" />);
};

if (!network) {
return null;
}

return (
<Hoverable horizontal style={styles.container} onPress={onCopy}>
<View horizontal style={{ gap: 10 }}>
<Image source={network?.icon as never} style={styles.icon} />
<Image
source={network.icon || modules.asset.setting[network.network].icon}
style={styles.icon}
/>

<View>
<Text>
Expand Down

0 comments on commit fd223f1

Please sign in to comment.