Skip to content

Commit

Permalink
chore: export connector id and icon if defined
Browse files Browse the repository at this point in the history
  • Loading branch information
ignaciosantise committed Feb 10, 2025
1 parent 9342f16 commit aae1248
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion packages/auth-ethers/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ interface AuthProviderProps {

export class AuthProvider extends AppKitFrameProvider {
readonly id = 'appKitAuth';
readonly name = 'AppKit Auth';
readonly name = 'AppKit Universal Wallet';

constructor(props: AuthProviderProps) {
super(props.projectId, props.metadata);
Expand Down
2 changes: 1 addition & 1 deletion packages/auth-wagmi/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export function authConnector(parameters: AuthConnectorOptions) {

return createConnector<Provider, {}, StorageItemMap>(config => ({
id: authConnector.id,
name: 'AppKit Auth',
name: 'AppKit Universal Wallet',
type: authConnector.type,
async setup() {
_provider = new AppKitFrameProvider(parameters.projectId, parameters.metadata);
Expand Down
10 changes: 4 additions & 6 deletions packages/ethers/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1022,13 +1022,11 @@ export class AppKit extends AppKitScaffold {
icon: metadata.icons?.[0]
});
}
} else if (provider?.id === ConstantsUtil.COINBASE_CONNECTOR_ID) {
} else if (provider?.id) {
this.setConnectedWalletInfo({
name: 'Coinbase Wallet'
});
} else if (provider?.id === ConstantsUtil.AUTH_CONNECTOR_ID) {
this.setConnectedWalletInfo({
name: 'AppKit Universal Wallet'
id: provider.id,
name: provider?.name ?? PresetsUtil.ConnectorNamesMap[provider.id],
icon: this.options?.connectorImages?.[provider.id]
});
} else {
this.setConnectedWalletInfo(undefined);
Expand Down
10 changes: 4 additions & 6 deletions packages/ethers5/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -999,13 +999,11 @@ export class AppKit extends AppKitScaffold {
icon: metadata.icons?.[0]
});
}
} else if (provider?.id === ConstantsUtil.COINBASE_CONNECTOR_ID) {
} else if (provider?.id) {
this.setConnectedWalletInfo({
name: 'Coinbase Wallet'
});
} else if (provider?.id === ConstantsUtil.AUTH_CONNECTOR_ID) {
this.setConnectedWalletInfo({
name: 'AppKit Universal Wallet'
id: provider.id,
name: provider?.name ?? PresetsUtil.ConnectorNamesMap[provider.id],
icon: this.options?.connectorImages?.[provider.id]
});
} else {
this.setConnectedWalletInfo(undefined);
Expand Down
6 changes: 5 additions & 1 deletion packages/wagmi/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,11 @@ export class AppKit extends AppKitScaffold {
});
}
} else {
this.setConnectedWalletInfo({ name: connector.name, icon: connector.icon });
this.setConnectedWalletInfo({
id: connector.id,
name: connector.name,
icon: this.options?.connectorImages?.[connector.id] ?? connector.icon
});
}
}

Expand Down

0 comments on commit aae1248

Please sign in to comment.