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

Fixed thirdweb icon in /docs #2339

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/src/kit-docs/tabs/Tabs.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@
.tabs ul {
border-color: var(--kd-color-gray-divider);
}
</style>
</style>
18 changes: 9 additions & 9 deletions docs/src/lib/components/Footer.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@
<TwitterIcon width={iconSize} height={iconSize} />
<span class="sr-only">X (formerly Twitter)</span>
</a>
<a class="icon-link" href="//www.youtube.com/channel/UCdzMx7Zhy5va5End1-XJFbA" target="_blank">
<a
class="icon-link"
href="//www.youtube.com/channel/UCdzMx7Zhy5va5End1-XJFbA"
target="_blank"
>
<YoutubeIcon width={iconSize} height={iconSize} />
<span class="sr-only">Youtube</span>
</a>
Expand All @@ -53,16 +57,12 @@
<div class="text">{text.copyright}</div>
</div>
<div class="flex">
<a
target="_blank"
href="https://thirdweb.com/privacy-policy"
class="text-sm hover:text-white">Privacy Policy</a
<a target="_blank" href="https://thirdweb.com/privacy-policy" class="text-sm hover:text-white"
>Privacy Policy</a
>
<div class="w-px bg-gray-divider mx-2 h-4" />
<a
target="_blank"
href="https://thirdweb.com/terms"
class="text-sm hover:text-white">Terms of Service</a
<a target="_blank" href="https://thirdweb.com/terms" class="text-sm hover:text-white"
>Terms of Service</a
>
</div>
</div>
Expand Down
6 changes: 3 additions & 3 deletions docs/src/lib/components/svg/powered-by-thirdweb.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 8 additions & 8 deletions docs/src/lib/services/onboard.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import thirdwebIcon from '../components/icons/thirdweb-icon'
import blocknativeIcon from '../components/icons/blocknative-icon'

let onboard
const getOnboard = async passedTheme => {
const getOnboard = async (passedTheme) => {
const key = 'svelteness::color-scheme'
const scheme = localStorage[key]
let theme = passedTheme || scheme
Expand All @@ -10,8 +10,8 @@ const getOnboard = async passedTheme => {
return onboard
}

const classMutationsCheck = mutationsList => {
mutationsList.forEach(mutation => {
const classMutationsCheck = (mutationsList) => {
mutationsList.forEach((mutation) => {
if (onboard && mutation.attributeName === 'class') {
if (mutation.target.className.includes('dark')) {
onboard.state.actions.updateTheme('dark')
Expand All @@ -28,7 +28,7 @@ const classMutationListener = () => {
mutationObserver.observe(document.querySelector('html'), { attributes: true })
}

const intiOnboard = async theme => {
const intiOnboard = async (theme) => {
const { default: Onboard } = await import('@web3-onboard/core')
const { default: injectedModule } = await import('@web3-onboard/injected-wallets')
const { default: trezorModule } = await import('@web3-onboard/trezor')
Expand Down Expand Up @@ -118,8 +118,8 @@ const intiOnboard = async theme => {
const finoaconnect = finoaConnectModule(finoaConnectOptions)

const uauthOptions = {
clientID: "a7371c4a-a61e-4fac-af48-4471c2e69e93",
redirectUri: "https://onboard.blocknative.com",
clientID: 'a7371c4a-a61e-4fac-af48-4471c2e69e93',
redirectUri: 'https://onboard.blocknative.com',
scope: 'openid wallet email:optional humanity_check:optional profile:optional social:optional',
walletConnectProjectId: 'f6bd6e2911b56f5ac3bc8b2d0e2d7ad5'
}
Expand Down Expand Up @@ -263,7 +263,7 @@ const intiOnboard = async theme => {
],
appMetadata: {
name: 'Web3 Onboard Documentation',
icon: thirdwebIcon,
icon: blocknativeIcon,
description: 'Example showcasing how to connect a wallet.',
recommendedInjectedWallets: [
{ name: 'MetaMask', url: 'https://metamask.io' },
Expand Down
1 change: 1 addition & 0 deletions docs/src/routes/docs/[...3]modules/[...1]core/+page.md
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,7 @@ type ConnectModalOptions = {

An object that defines the display text for different locales. Can also be used to override the default text. To override the default text, pass in an object for the `en` locale.
Currently there is built-in support for:

- English (`en`) - Default
- Simplified Chinese (`zh`)

Expand Down
2 changes: 1 addition & 1 deletion docs/src/routes/docs/[...3]modules/[...3]react/+page.md
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ type Notify = {
/**
* Position of notifications that defaults to the same position as the
* Account Center (if enabled) of the top right if AC is disabled
* and notifications are enabled
* and notifications are enabled
*/
position?: NotificationPosition
}
Expand Down
32 changes: 7 additions & 25 deletions docs/src/routes/docs/[...3]modules/[...4]solid/+page.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ npm install @web3-onboard/solid @web3-onboard/injected-wallets
</TabPanel>
</Tabs>


## Quickstart

```typescript
Expand All @@ -39,8 +38,7 @@ const injected = injectedModule()
// Only one RPC endpoint required per chain
const rpcAPIKey = '<INFURA_KEY>' || '<ALCHEMY_KEY>'
const rpcUrl =
`https://eth-mainnet.g.alchemy.com/v2/${rpcAPIKey}` ||
`https://mainnet.infura.io/v3/${rpcAPIKey}`
`https://eth-mainnet.g.alchemy.com/v2/${rpcAPIKey}` || `https://mainnet.infura.io/v3/${rpcAPIKey}`

const web3Onboard = init({
wallets: [injected],
Expand All @@ -60,16 +58,12 @@ const web3Onboard = init({
]
})

const { wallets, connectWallet, disconnectConnectedWallet, connectedWallet } =
useOnboard()
const { wallets, connectWallet, disconnectConnectedWallet, connectedWallet } = useOnboard()

if (connectedWallet) {
// if using ethers v6 this is:
// ethersProvider = new ethers.BrowserProvider(wallet.provider, 'any')
const ethersProvider = new ethers.providers.Web3Provider(
connectedWallet.provider,
'any'
)
const ethersProvider = new ethers.providers.Web3Provider(connectedWallet.provider, 'any')
// ..... do stuff with the provider
}
```
Expand Down Expand Up @@ -114,13 +108,8 @@ import { useOnboard } from '@web3-onboard/solid'
// Use the composable
const onboard = useOnboard()
// Or destructure it
const {
wallets,
connectedWallet,
connectedChain,
connectWallet,
disconnectConnectedWallet
} = useOnboard()
const { wallets, connectedWallet, connectedChain, connectWallet, disconnectConnectedWallet } =
useOnboard()
// do stuff
```

Expand Down Expand Up @@ -174,12 +163,7 @@ Function to disconnect the `connectedWallet`
import { useOnboard } from '@web3-onboard/solid'
function SampleConnect() {
const { disconnectConnectedWallet } = useOnboard()
return (
<button onClick={() => disconnectConnectedWallet()}>
{' '}
disconnect wallet
</button>
)
return <button onClick={() => disconnectConnectedWallet()}> disconnect wallet</button>
}
```

Expand Down Expand Up @@ -264,8 +248,6 @@ Readonly ref that contains the last time that the user connected a wallet in mil
import { useOnboard } from '@web3-onboard/solid'
function SampleConnect() {
const { lastConnectedTimestamp } = useOnboard()
return (
<span>Your last connection timestamp was: {lastConnectedTimestamp}</span>
)
return <span>Your last connection timestamp was: {lastConnectedTimestamp}</span>
}
```
3 changes: 2 additions & 1 deletion docs/src/routes/docs/[...3]modules/[...8]wagmi/+page.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,10 @@ Full documentation for `wagmi/core` API functions can be found [here](https://wa

### wagmiConfig

After initialization an up-to-date WAGMI config will will be available from the onboard state object `onboard.state.get().wagmiConfig` which will need to be passed as the first prop of most [@wagmi/core](https://wagmi.sh/core/getting-started) methods.
After initialization an up-to-date WAGMI config will will be available from the onboard state object `onboard.state.get().wagmiConfig` which will need to be passed as the first prop of most [@wagmi/core](https://wagmi.sh/core/getting-started) methods.

### wagmiConnector and Connectors

Wallets will also have a `wagmiConnector` prop within the onboard state object which will allow you to target specific wallets for interactions. This can also be bi-passed if the primary or most recently connected wallet is the wallet meant for the transactions.
The config and connectors can be used with the WAGMI API returned from this module or an external WAGMI instance.

Expand Down
2 changes: 1 addition & 1 deletion docs/src/routes/docs/[...4]wallets/[...10]frame/+page.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,4 @@ type Platform =
| 'desktop'
| 'mobile'
| 'tablet'
```
```
3 changes: 1 addition & 2 deletions docs/src/routes/docs/[...4]wallets/[...12]gnosis/+page.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ Note: With the `safeTxGas` you will see additional value on the `gasLimit` displ

For build env configurations and setups please see the Build Env section [here](/docs/modules/core#build-environments).


## Local testing within the Safe app

Ensure the application is building and working properly within the browser and then add or enable your cors blocker extension or script of choice. An example is the `Allow CORS` browser extension.
Expand All @@ -102,4 +101,4 @@ export default defineConfig({
include: ['@safe-global/safe-apps-sdk', '@safe-global/safe-apps-provider']
}
})
```
```
2 changes: 1 addition & 1 deletion docs/src/routes/docs/[...4]wallets/[...1]arcana/+page.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const arcanaAuth = arcanaAuthModule({
const onboard = Onboard({
// ... other Onboard options
wallets: [
arcanaAuth,
arcanaAuth
//... other wallets
]
})
Expand Down
31 changes: 21 additions & 10 deletions docs/src/routes/docs/[...4]wallets/[...22]particlenetwork/+page.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,27 @@ console.log(connectedWallets)
/**
* Enumerates the supported authentication types.
*/
type AuthTypes = 'email' | 'phone' | 'google' | 'apple' | 'twitter' | 'facebook' | 'microsoft' | 'linkedin' | 'github' | 'twitch' | 'discord';
type AuthTypes =
| 'email'
| 'phone'
| 'google'
| 'apple'
| 'twitter'
| 'facebook'
| 'microsoft'
| 'linkedin'
| 'github'
| 'twitch'
| 'discord'

/**
* Interface that describes the preferred authentication type.
* @property {AuthTypes} type - The preferred type of authentication.
* @property {boolean} setAsDisplay - Indicates whether the type should be displayed within the UI.
*/
interface PreferredAuthType {
type: AuthTypes;
setAsDisplay: boolean;
type: AuthTypes
setAsDisplay: boolean
}

/**
Expand All @@ -83,12 +94,12 @@ interface PreferredAuthType {
* @property {AuthTypes | PreferredAuthType} [preferredAuthType] - (Optional) Specifies the preferred type of authentication.
*/
interface ParticleAuthModuleOptions {
projectId: string;
clientKey: string;
appId: string;
chainName?: string;
chainId?: number;
wallet?: object;
preferredAuthType?: AuthTypes | PreferredAuthType;
projectId: string
clientKey: string
appId: string
chainName?: string
chainId?: number
wallet?: object
preferredAuthType?: AuthTypes | PreferredAuthType
}
```
2 changes: 1 addition & 1 deletion docs/src/routes/docs/[...4]wallets/[...23]phantom/+page.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@ console.log(connectedWallets)

## Build Environments

For build env configurations and setups please see the Build Env section [here](/docs/modules/core#build-environments)
For build env configurations and setups please see the Build Env section [here](/docs/modules/core#build-environments)
2 changes: 1 addition & 1 deletion docs/src/routes/docs/[...4]wallets/[...25]taho/+page.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ console.log(connectedWallets)

## Build Environments

For build env configurations and setups please see the Build Env section [here](/docs/modules/core#build-environments)
For build env configurations and setups please see the Build Env section [here](/docs/modules/core#build-environments)
2 changes: 1 addition & 1 deletion docs/src/routes/docs/[...4]wallets/[...26]tallyho/+page.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@ console.log(connectedWallets)

## Build Environments

For build env configurations and setups please see the Build Env section [here](/docs/modules/core#build-environments)
For build env configurations and setups please see the Build Env section [here](/docs/modules/core#build-environments)
2 changes: 1 addition & 1 deletion docs/src/routes/docs/[...4]wallets/[...27]torus/+page.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,4 @@ config.module.rules = [

## Build Environments

For build env configurations and setups please see the Build Env section [here](/docs/modules/core#build-environments)
For build env configurations and setups please see the Build Env section [here](/docs/modules/core#build-environments)
3 changes: 1 addition & 2 deletions docs/src/routes/docs/[...4]wallets/[...29]uauth/+page.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,7 @@ const uauth = uauthModule({
clientID: 'a25c3a65-a1f2-46cc-a515-a46fe7acb78c',
walletConnectProjectId: 'f6bd6e2911b56f5ac3bc8b2d0e2d7ad5',
redirectUri: 'http://localhost:8080/',
scope:
'openid wallet email:optional humanity_check:optional profile:optional social:optional'
scope: 'openid wallet email:optional humanity_check:optional profile:optional social:optional'
})

// can also initialize with basic options...
Expand Down
6 changes: 4 additions & 2 deletions docs/src/routes/docs/[...4]wallets/[...30]venly/+page.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Venly

Wallet module for connecting Venly Wallet SDK to Web3 Onboard. Check out the [Venly Docs](https://docs.venly.io/) for more information.

## Install

<Tabs values={['yarn', 'npm']}>
Expand Down Expand Up @@ -41,8 +42,8 @@ import Onboard from '@web3-onboard/core'
import venlyModule from '@web3-onboard/venly'

// initialize the module with options
const venly = venlyModule({
clientId: 'YOUR_CLIENT_ID',
const venly = venlyModule({
clientId: 'YOUR_CLIENT_ID'
})

const onboard = Onboard({
Expand All @@ -58,4 +59,5 @@ console.log(connectedWallets)
```

## Build Environments

For build env configurations and setups please see the Build Env section [here](/docs/modules/core#build-environments)
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ npm install @web3-onboard/walletconnect
</TabPanel>
</Tabs>


```typescript
type WalletConnectOptions = {
/**
Expand Down
2 changes: 1 addition & 1 deletion docs/src/routes/docs/[...4]wallets/[...34]xdefi/+page.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,4 @@ console.log(connectedWallets)

## Build Environments

For build env configurations and setups please see the Build Env section [here](/docs/modules/core#build-environments)
For build env configurations and setups please see the Build Env section [here](/docs/modules/core#build-environments)
2 changes: 1 addition & 1 deletion docs/src/routes/docs/[...4]wallets/[...35]zeal/+page.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@ console.log(connectedWallets)

## Build Environments

For build env configurations and setups please see the Build Env section [here](/docs/modules/core#build-environments)
For build env configurations and setups please see the Build Env section [here](/docs/modules/core#build-environments)
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ npm install @web3-onboard/core @web3-onboard/finoaconnect
## Usage

Optional initialization object

```typescript
/** Optional object provided to the initiation of the wallet connector.
/** Optional object provided to the initiation of the wallet connector.
* When not included, the wallet connector service connects to FinoaConnect production systems.
* @field {url} URL of the FinoaConnect backend systems to be used
* @field {labelSuffix} arbitrary string label to denote the context of the URL field */
Expand Down
1 change: 0 additions & 1 deletion docs/src/routes/docs/[...4]wallets/[...37]bloom/+page.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ npm install @web3-onboard/bloom
</TabPanel>
</Tabs>


```typescript
type WalletConnectOptions = {
/**
Expand Down
Loading