Skip to content

Commit

Permalink
Show when a wallet is user managed
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelosalloum committed Nov 5, 2024
1 parent 6d38af9 commit 0ae473b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/components/WalletCard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ interface WalletCardProps {
enabled: boolean;
assets: string[];
editable: boolean | null;
userManaged: boolean | undefined;
onChange: () => void;
}

Expand All @@ -19,6 +20,7 @@ export const WalletCard: React.FC<WalletCardProps> = ({
enabled,
assets,
editable = true,
userManaged,
onChange,
}: WalletCardProps) => {
return (
Expand Down Expand Up @@ -56,6 +58,14 @@ export const WalletCard: React.FC<WalletCardProps> = ({
</label>
<div className="WalletCard__item__value">{assets?.join(", ")}</div>
</div>
<div className="WalletCard--flexCols">
<label className="WalletCard__item__label">
<Icon.Assets /> User Managed?
</label>
<div className="WalletCard__item__value">
{userManaged ? "Yes" : "No"}
</div>
</div>
</div>
</div>
</Card>
Expand Down
1 change: 1 addition & 0 deletions src/pages/WalletProviders.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ export const WalletProviders = () => {
enabled={item.enabled}
assets={item.assets?.map((asset) => asset.code)}
editable={canEditWalletProviders}
userManaged={item.user_managed}
onChange={() => {
setSelectedWallet({ id: item.id, enabled: item.enabled });

Expand Down
1 change: 1 addition & 0 deletions src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,7 @@ export type ApiWallet = {
assets: ApiAsset[];
created_at: string;
updated_at: string;
user_managed?: boolean;
};

export type ApiDisbursements = {
Expand Down

0 comments on commit 0ae473b

Please sign in to comment.