Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating getDefaultConfig method #98

Merged
merged 13 commits into from
Oct 1, 2024
Merged

Creating getDefaultConfig method #98

merged 13 commits into from
Oct 1, 2024

Conversation

corbanbrook
Copy link
Collaborator

@corbanbrook corbanbrook commented Jul 11, 2024

This provides a new method getDefaultConfig and a wrapping component that takes this config SequenceKit

getDefaultConfig(walletType: 'waas' | 'universal', config: CombinedWaasConfig | CombinedUniversalConfig)

This method takes 2 params, the first specifies the wallet type (waas or universal) and the second is a combined config object which allows you to specify KitConfig as well as Connector options for the specific wallet type. You can also pass in any additional wagmi options with the wagmiConfig prop

const config = getDefaultConfig('waas', {
  projectAccessKey: '...',
  waasClientId: '...',
  wagmiConfig: {
    ssr: true
  }
  ...
})
const App = () => {
   return (
     <SequenceKit config={config}>
       <MyApp/>
     </SequenceKit>
   )
}

@corbanbrook corbanbrook force-pushed the get-default-config branch 3 times, most recently from 8b44e4a to 9dbf75d Compare July 12, 2024 18:14
SamueleA
SamueleA previously approved these changes Jul 15, 2024
Copy link
Contributor

@SamueleA SamueleA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! But I think we can delete the commented code.

SamueleA
SamueleA previously approved these changes Sep 5, 2024
examples/next/src/config.ts Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@tolgahan-arikan
Copy link
Contributor

maybe we can use embedded instead of waas for the wallet type? because we are using that in docs etc. instead of waas

@SamueleA SamueleA self-requested a review October 1, 2024 14:00
pkieltyka
pkieltyka previously approved these changes Oct 1, 2024
Copy link
Member

@pkieltyka pkieltyka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM :D

@corbanbrook corbanbrook merged commit e8134a5 into master Oct 1, 2024
1 check passed
@corbanbrook corbanbrook deleted the get-default-config branch October 1, 2024 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants