Skip to content

Commit

Permalink
Merge branch 'refs/heads/feat/argent-one-button-connector' into beta
Browse files Browse the repository at this point in the history
  • Loading branch information
Cussone committed Nov 7, 2024
2 parents f57b1e6 + 0245904 commit 5d3c2f1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions src/connectors/argent/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { injectedWalletIcons } from "../injected"
import { InjectedConnectorOptions, injectedWalletIcons } from "../injected"
import { ArgentX } from "../injected/argentX"
import { getInjectedArgentX } from "./helpers/getInjectedArgentX"
import {
Expand All @@ -15,7 +15,10 @@ function hasInjectedArgentX(): boolean {
return Boolean(getInjectedArgentX())
}

type ArgentSettings = ArgentMobileConnectorOptions
interface ArgentSettings {
extension?: Omit<InjectedConnectorOptions, "id">
mobile: ArgentMobileConnectorOptions
}

const ArgentIcon =
"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IkhpdG8gaW4gY29udGFpbmVyIj4KPHBhdGggaWQ9IlZlY3RvciIgZD0iTTE4Ljc5OTkgNS45MkgxMy4yMDAzQzEzLjAxMzIgNS45MiAxMi44NjMyIDYuMDc0MDIgMTIuODU5MiA2LjI2NTQ3QzEyLjc0NiAxMS42NDcgOS45OTQ3NyAxNi43NTQ2IDUuMjU5MyAyMC4zNzI0QzUuMTA4OTUgMjAuNDg3MiA1LjA3NDcgMjAuNzAzIDUuMTg0NjIgMjAuODU4NEw4LjQ2MDg3IDI1LjQ5NDNDOC41NzIzMyAyNS42NTIgOC43ODk1IDI1LjY4NzcgOC45NDIzNyAyNS41NzE4QzExLjkwMzMgMjMuMzI0NCAxNC4yODUgMjAuNjEzNCAxNi4wMDAxIDE3LjYwODVDMTcuNzE1MiAyMC42MTM0IDIwLjA5NyAyMy4zMjQ0IDIzLjA1OCAyNS41NzE4QzIzLjIxMDcgMjUuNjg3NyAyMy40Mjc5IDI1LjY1MiAyMy41Mzk1IDI1LjQ5NDNMMjYuODE1NyAyMC44NTg0QzI2LjkyNTUgMjAuNzAzIDI2Ljg5MTIgMjAuNDg3MiAyNi43NDEgMjAuMzcyNEMyMi4wMDU0IDE2Ljc1NDYgMTkuMjU0MiAxMS42NDcgMTkuMTQxMiA2LjI2NTQ3QzE5LjEzNzEgNi4wNzQwMiAxOC45ODcgNS45MiAxOC43OTk5IDUuOTJaIiBmaWxsPSIjRkY4NzVCIi8+CjwvZz4KPC9zdmc+Cg=="
Expand All @@ -42,9 +45,10 @@ export class Argent

this.argentX = new ArgentX({
icon: injectedWalletIcons.argentX,
...settings?.extension,
})
this.argentMobile = new ArgentMobileBaseConnector({
...settings,
...settings.mobile,
})

if (hasInjectedArgentX() || isInArgentMobileAppBrowser()) {
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/defaultConnectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const defaultConnectors = ({
| StarknetkitCompoundConnector
)[] = []

defaultConnectors.push(new Argent(argentMobileOptions))
defaultConnectors.push(new Argent({ mobile: argentMobileOptions }))

if (!isSafari) {
defaultConnectors.push(new Braavos())
Expand Down

0 comments on commit 5d3c2f1

Please sign in to comment.