Skip to content

Commit 5980b0e

Browse files
committed
add ID to wallet button
1 parent 20aa837 commit 5980b0e

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

packages/walletkit/src/components/WalletSelectorModal/WalletStepSelect/WalletProviderOption.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,20 @@
11
import styled from "@emotion/styled";
2-
import type { WalletProviderInfo } from "@saberhq/use-solana";
2+
import type {
3+
DefaultWalletType,
4+
WalletProviderInfo,
5+
} from "@saberhq/use-solana";
36
import React, { useMemo } from "react";
47

58
interface Props {
9+
type: DefaultWalletType;
610
info: WalletProviderInfo;
711

812
onInstall?: (info: WalletProviderInfo) => void;
913
onSelect?: () => void;
1014
}
1115

1216
export const WalletProviderOption: React.FC<Props> = ({
17+
type,
1318
info,
1419
onInstall,
1520
onSelect,
@@ -37,6 +42,7 @@ export const WalletProviderOption: React.FC<Props> = ({
3742

3843
return (
3944
<Wrapper
45+
id={`gokiWalletKitProviderOption-${type}`}
4046
role="button"
4147
onClick={(e) => {
4248
e.stopPropagation();

packages/walletkit/src/components/WalletSelectorModal/WalletStepSelect/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,11 @@ export const WalletStepSelect: React.FC<Props> = ({
100100
: prov.mustInstall || !prov.info.isInstalled
101101
)
102102
.map((fullInfo) => {
103-
const { info: provider } = fullInfo;
103+
const { info: provider, type } = fullInfo;
104104
return (
105105
<WalletProviderOption
106106
key={provider.url}
107+
type={type}
107108
info={provider}
108109
onSelect={() => {
109110
onSelect?.(fullInfo);

0 commit comments

Comments
 (0)