Skip to content

Commit

Permalink
getDefaultConnect includes projectAccesssKEy
Browse files Browse the repository at this point in the history
  • Loading branch information
SamueleA committed Jan 23, 2024
1 parent b256177 commit 322a454
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 12 deletions.
4 changes: 3 additions & 1 deletion examples/react/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ function App() {
...getDefaultConnectors({
chains,
walletConnectProjectId: 'c65a6cb1aa83c4e24500130f23a437d8',
defaultChainId: 137
defaultChainId: 137,
appName: 'demo app',
projectAccessKey: 'iK0DPkHRt0IFo8o4M3fZIIOAAAAAAAAAA'
}),
...(
isDebugMode
Expand Down
2 changes: 1 addition & 1 deletion packages/checkout/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@0xsequence/kit-checkout",
"version": "1.0.11",
"version": "1.0.12",
"description": "Checkout UI for Sequence Kit",
"repository": "https://github.com/0xsequence/kit/tree/master/packages/checkout",
"main": "dist/0xsequence-kit-checkout.cjs.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/connectors/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@0xsequence/kit-connectors",
"version": "1.0.11",
"version": "1.0.12",
"description": "Wallets for Sequence Kit",
"repository": "https://github.com/0xsequence/kit/tree/master/packages/connectors",
"main": "dist/0xsequence-kit-connectors.cjs.js",
Expand Down
42 changes: 35 additions & 7 deletions packages/connectors/src/defaultConnectors.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,17 @@ import {
interface GetDefaultConnectors {
chains: Chain[],
walletConnectProjectId: string,
projectAccessKey: string,
appName: string,
defaultChainId?: number
}

export const getDefaultConnectors = ({
chains,
walletConnectProjectId,
defaultChainId,
projectAccessKey,
appName,
}: GetDefaultConnectors): Connector<any, any>[] => {
let defaultChain = chains[0].id

Expand All @@ -38,37 +42,57 @@ export const getDefaultConnectors = ({
coinbaseWallet({
chains,
options: {
appName: 'app'
appName
}
}),
email({
chains,
options: {
defaultNetwork: defaultChain
defaultNetwork: defaultChain,
connect: {
app: appName,
projectAccessKey
}
}
}),
google({
chains,
options: {
defaultNetwork: defaultChain
defaultNetwork: defaultChain,
connect: {
app: appName,
projectAccessKey
}
}
}),
facebook({
chains,
options: {
defaultNetwork: defaultChain
defaultNetwork: defaultChain,
connect: {
app: appName,
projectAccessKey
}
}
}),
twitch({
chains,
options: {
defaultNetwork: defaultChain
defaultNetwork: defaultChain,
connect: {
app: appName,
projectAccessKey
}
}
}),
apple({
chains,
options: {
defaultNetwork: defaultChain
defaultNetwork: defaultChain,
connect: {
app: appName,
projectAccessKey
}
}
}),
metamask({
Expand All @@ -83,7 +107,11 @@ export const getDefaultConnectors = ({
sequence({
chains,
options: {
defaultNetwork: defaultChain
defaultNetwork: defaultChain,
connect: {
app: appName,
projectAccessKey
}
}
})
])
Expand Down
2 changes: 1 addition & 1 deletion packages/kit/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@0xsequence/kit",
"version": "1.0.11",
"version": "1.0.12",
"description": "Core package for Sequence Kit",
"keywords": [
"sequence",
Expand Down
2 changes: 1 addition & 1 deletion packages/wallet/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@0xsequence/kit-wallet",
"version": "1.0.11",
"version": "1.0.12",
"description": "Wallet UI for Sequence Kit",
"repository": "https://github.com/0xsequence/kit/tree/master/packages/wallet",
"main": "dist/0xsequence-kit-wallet.cjs.js",
Expand Down

0 comments on commit 322a454

Please sign in to comment.