Skip to content

Commit aae1248

Browse files
chore: export connector id and icon if defined
1 parent 9342f16 commit aae1248

File tree

5 files changed

+15
-15
lines changed

5 files changed

+15
-15
lines changed

packages/auth-ethers/src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ interface AuthProviderProps {
77

88
export class AuthProvider extends AppKitFrameProvider {
99
readonly id = 'appKitAuth';
10-
readonly name = 'AppKit Auth';
10+
readonly name = 'AppKit Universal Wallet';
1111

1212
constructor(props: AuthProviderProps) {
1313
super(props.projectId, props.metadata);

packages/auth-wagmi/src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export function authConnector(parameters: AuthConnectorOptions) {
3535

3636
return createConnector<Provider, {}, StorageItemMap>(config => ({
3737
id: authConnector.id,
38-
name: 'AppKit Auth',
38+
name: 'AppKit Universal Wallet',
3939
type: authConnector.type,
4040
async setup() {
4141
_provider = new AppKitFrameProvider(parameters.projectId, parameters.metadata);

packages/ethers/src/client.ts

+4-6
Original file line numberDiff line numberDiff line change
@@ -1022,13 +1022,11 @@ export class AppKit extends AppKitScaffold {
10221022
icon: metadata.icons?.[0]
10231023
});
10241024
}
1025-
} else if (provider?.id === ConstantsUtil.COINBASE_CONNECTOR_ID) {
1025+
} else if (provider?.id) {
10261026
this.setConnectedWalletInfo({
1027-
name: 'Coinbase Wallet'
1028-
});
1029-
} else if (provider?.id === ConstantsUtil.AUTH_CONNECTOR_ID) {
1030-
this.setConnectedWalletInfo({
1031-
name: 'AppKit Universal Wallet'
1027+
id: provider.id,
1028+
name: provider?.name ?? PresetsUtil.ConnectorNamesMap[provider.id],
1029+
icon: this.options?.connectorImages?.[provider.id]
10321030
});
10331031
} else {
10341032
this.setConnectedWalletInfo(undefined);

packages/ethers5/src/client.ts

+4-6
Original file line numberDiff line numberDiff line change
@@ -999,13 +999,11 @@ export class AppKit extends AppKitScaffold {
999999
icon: metadata.icons?.[0]
10001000
});
10011001
}
1002-
} else if (provider?.id === ConstantsUtil.COINBASE_CONNECTOR_ID) {
1002+
} else if (provider?.id) {
10031003
this.setConnectedWalletInfo({
1004-
name: 'Coinbase Wallet'
1005-
});
1006-
} else if (provider?.id === ConstantsUtil.AUTH_CONNECTOR_ID) {
1007-
this.setConnectedWalletInfo({
1008-
name: 'AppKit Universal Wallet'
1004+
id: provider.id,
1005+
name: provider?.name ?? PresetsUtil.ConnectorNamesMap[provider.id],
1006+
icon: this.options?.connectorImages?.[provider.id]
10091007
});
10101008
} else {
10111009
this.setConnectedWalletInfo(undefined);

packages/wagmi/src/client.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,11 @@ export class AppKit extends AppKitScaffold {
548548
});
549549
}
550550
} else {
551-
this.setConnectedWalletInfo({ name: connector.name, icon: connector.icon });
551+
this.setConnectedWalletInfo({
552+
id: connector.id,
553+
name: connector.name,
554+
icon: this.options?.connectorImages?.[connector.id] ?? connector.icon
555+
});
552556
}
553557
}
554558

0 commit comments

Comments
 (0)