Skip to content

Commit

Permalink
Merge pull request #46 from argentlabs/BLO-1894
Browse files Browse the repository at this point in the history
fix: argent mobile connector icon url parameter
  • Loading branch information
bluecco authored Dec 13, 2023
2 parents 292292c + 5b2717b commit f600baa
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/connectors/argentMobile/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export interface ArgentMobileConnectorOptions {
chainId?: constants.NetworkName
description?: string
url?: string
icons?: string[]
}

export class ArgentMobileConnector extends Connector {
Expand Down Expand Up @@ -143,13 +144,15 @@ export class ArgentMobileConnector extends Connector {

private async ensureWallet(): Promise<void> {
const { getStarknetWindowObject } = await import("./modal")
const { chainId, projectId, dappName, description, url } = this._options
const { chainId, projectId, dappName, description, url, icons } =
this._options
const options = {
chainId: chainId ?? constants.NetworkName.SN_MAIN,
name: dappName,
projectId: projectId ?? DEFAULT_PROJECT_ID,
description,
url,
icons,
}

if (projectId === DEFAULT_PROJECT_ID) {
Expand Down
4 changes: 3 additions & 1 deletion src/connectors/argentMobile/modal/login.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export interface IArgentLoginOptions {
name?: string
description?: string
url?: string
icons?: string[]
chainId?: string | number
rpcUrl?: string
bridgeUrl?: string
Expand All @@ -34,6 +35,7 @@ export const login = async <TAdapter extends NamespaceAdapter>(
mobileUrl = getMobileUrl(chainId),
modalType = "overlay",
url,
icons,
walletConnect,
}: IArgentLoginOptions,
Adapter: new (options: NamespaceAdapterOptions) => TAdapter,
Expand All @@ -55,7 +57,7 @@ export const login = async <TAdapter extends NamespaceAdapter>(
name: name ?? "Unknown dapp",
description: description ?? "Unknown dapp description",
url: url ?? "#",
icons: ["https://walletconnect.com/walletconnect-logo.png"],
icons: icons ?? [],
...walletConnect?.metadata,
},
}
Expand Down

0 comments on commit f600baa

Please sign in to comment.