Skip to content

Commit

Permalink
Merge pull request #1583 from blocknative/release/2.20.5
Browse files Browse the repository at this point in the history
* yarn latest packages

* Temporarily remove infinity wallet

* Fix/sitemap (#1565)

* update root path
* Update the sitemap generation

* Create new package for TallyHo name change to Taho (#1542)

* Rename TallyHo wallet name to Taho

* Remove commented out code

* Remove unneeded file

* Refine deploy script

* Revert docs changes

* Update more docs

* Add Taho docs and fix connect wallet button issue

* [core, react, vue]: Fix - Remove wallet from localStorage when disconnect is called with the primary wallet label (#1566)

* Add removal of localstorage wallet string on disconnect

* Add check to confirm the disconnected wallet is also the primary/current wallet

* Revert demo change

* Fix sitemap (#1573)

* SvelteKit+Vite - Fix config issue with sveltekit and vite config - Add docs (#1569)

* Fix config issue with sveltekit and vite config

* Update package.json

* Add examples to docs

* Fix funk formatting

* Add more notes around sveltekit+vite config and pnpm usage

* [walletconnect-v2.3.1-alpha.1]: Update - walletConnect params to include `requiredChains` and updated WC deps (#1574)

* Update wc package to the latest and parameterize required chains

* Update WC module to allow req chains as parameter

* Update docs

* Update docs

* Update package versions

* Fix wc package versioning (#1581)

---------

Co-authored-by: Aaron <[email protected]>
Co-authored-by: Taylor Dawson <[email protected]>
  • Loading branch information
3 people authored Mar 14, 2023
2 parents e901512 + 81fde22 commit 109e46c
Show file tree
Hide file tree
Showing 56 changed files with 3,956 additions and 828 deletions.
18 changes: 18 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,12 @@ jobs:
working_directory: ~/web3-onboard-monorepo/packages/infinity-wallet
steps:
- node-build-steps
build-taho:
docker:
- image: cimg/node:16.13.1
working_directory: ~/web3-onboard-monorepo/packages/taho
steps:
- node-build-steps

# Build staging/Alpha releases
build-staging-core:
Expand Down Expand Up @@ -575,6 +581,12 @@ jobs:
working_directory: ~/web3-onboard-monorepo/packages/infinity-wallet
steps:
- node-staging-build-steps
build-staging-taho:
docker:
- image: cimg/node:16.13.1
working_directory: ~/web3-onboard-monorepo/packages/taho
steps:
- node-staging-build-steps

workflows:
version: 2
Expand Down Expand Up @@ -783,3 +795,9 @@ workflows:
<<: *deploy_production_filters
- build-staging-infinity-wallet:
<<: *deploy_staging_filters
taho:
jobs:
- build-taho:
<<: *deploy_production_filters
- build-staging-taho:
<<: *deploy_staging_filters
3 changes: 2 additions & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ jobs:
uses: cicirello/generate-sitemap@v1
with:
path-to-root: './docs/build'
base-url-path: https://www.onboard.blocknative.com/
drop-html-extension: true
base-url-path: https://onboard.blocknative.com

- name: Peak at folder contents
run: ls -al
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ For full documentation, check out the README.md for each package or the [docs pa
- [MEW-Wallet](packages/mew-wallet/README.md)
- [Web3Auth](packages/web3auth/README.md)
- [Sequence](packages/sequence/README.md)
- [TallyHo](packages/tallyho/README.md)
- [Taho (previously Tally Ho)](packages/tallyho/README.md)
- [Enkrypt](packages/enkrypt/README.md)
- [Unstoppable Domains](packages/uauth/README.md)
- [Frontier](packages/frontier/README.md)
Expand Down
6 changes: 3 additions & 3 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"dependencies": {
"bnc-sdk": "^4.6.6",
"@web3-onboard/coinbase": "^2.1.4",
"@web3-onboard/core": "^2.15.4",
"@web3-onboard/core": "^2.15.5",
"@web3-onboard/dcent": "^2.2.3",
"@web3-onboard/enkrypt": "^2.0.0",
"@web3-onboard/fortmatic": "^2.0.14",
Expand All @@ -71,13 +71,13 @@
"@web3-onboard/mew-wallet": "^2.0.0",
"@web3-onboard/portis": "^2.1.3",
"@web3-onboard/sequence": "^2.0.4",
"@web3-onboard/tallyho": "^2.0.1",
"@web3-onboard/taho": "^2.0.0",
"@web3-onboard/torus": "^2.2.0",
"@web3-onboard/transaction-preview": "^2.0.4",
"@web3-onboard/trezor": "^2.3.3",
"@web3-onboard/trust": "^2.0.0",
"@web3-onboard/uauth": "^2.0.1",
"@web3-onboard/walletconnect": "^2.2.1",
"@web3-onboard/walletconnect": "^2.3.2",
"@web3-onboard/web3auth": "^2.1.4",
"@web3-onboard/xdefi": "^2.0.0",
"animejs": "^3.2.1",
Expand Down
11 changes: 8 additions & 3 deletions docs/src/lib/components/ConnectWalletButton.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
let buttonText = 'Connect'
async function connectWallet() {
if (!onboard) await initOnboard()
if (onboard && onboard.state.get().wallets.length) {
onboard.disconnectWallet({ label: onboard.state.get().wallets[0].label })
buttonText = 'Connect'
Expand All @@ -17,13 +18,17 @@
}
}
onMount(async () => {
if (!onboard) {
if (document.location.href.includes('theming-tool')) {
const initOnboard = async () => {
if (document.location.href.includes('theming-tool')) {
onboard = await getOnboard('default')
} else {
onboard = await getOnboard()
}
}
onMount(async () => {
if (!onboard) {
await initOnboard()
}
onboard.state.select('wallets').subscribe((wallets) => {
connectedWallets = wallets
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import magicModule from '@web3-onboard/magic'
import web3authModule from '@web3-onboard/web3auth'
import dcentModule from '@web3-onboard/dcent'
import sequenceModule from '@web3-onboard/sequence'
import tallyHoModule from '@web3-onboard/tallyho'
import tahoModule from '@web3-onboard/taho'
import trustModule from '@web3-onboard/trust'
import frontierModule from '@web3-onboard/frontier'

Expand All @@ -45,7 +45,7 @@ const keystone = keystoneModule()
const keepkey = keepkeyModule()
const gnosis = gnosisModule()
const sequence = sequenceModule()
const tally = tallyModule()
const taho = tahoModule() // Previously named Tally Ho wallet
const trust = trustModule()
const frontier = frontierModule()

Expand All @@ -70,7 +70,7 @@ const wallets = [
injected,
trust,
frontier,
tally,
taho,
ledger,
coinbase,
dcent,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import magicModule from '@web3-onboard/magic'
import web3authModule from '@web3-onboard/web3auth'
import dcentModule from '@web3-onboard/dcent'
import sequenceModule from '@web3-onboard/sequence'
import tallyHoModule from '@web3-onboard/tallyho'
import tahoModule from '@web3-onboard/taho'
import trustModule from '@web3-onboard/trust'
import frontierModule from '@web3-onboard/frontier'

Expand All @@ -45,7 +45,7 @@ const keystone = keystoneModule()
const keepkey = keepkeyModule()
const gnosis = gnosisModule()
const sequence = sequenceModule()
const tally = tallyModule()
const taho = tahoModule() // Previously named Tally Ho wallet
const trust = trustModule()
const frontier = frontierModule()

Expand All @@ -68,7 +68,7 @@ const wallets = [
keepkey,
sequence,
injected,
tally,
taho,
ledger,
coinbase,
dcent,
Expand Down
27 changes: 20 additions & 7 deletions docs/src/lib/services/onboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const intiOnboard = async (theme) => {
const { default: trezorModule } = await import('@web3-onboard/trezor')
const { default: ledgerModule } = await import('@web3-onboard/ledger')
const { default: walletConnectModule } = await import('@web3-onboard/walletconnect')
const { default: infinityWalletModule } = await import('@web3-onboard/infinity-wallet')
// const { default: infinityWalletModule } = await import('@web3-onboard/infinity-wallet')
const { default: coinbaseModule } = await import('@web3-onboard/coinbase')
const { default: dcentModule } = await import('@web3-onboard/dcent')
const { default: portisModule } = await import('@web3-onboard/portis')
Expand All @@ -42,7 +42,7 @@ const intiOnboard = async (theme) => {
const { default: keepkeyModule } = await import('@web3-onboard/keepkey')
const { default: gnosisModule } = await import('@web3-onboard/gnosis')
const { default: sequenceModule } = await import('@web3-onboard/sequence')
const { default: tallyModule } = await import('@web3-onboard/tallyho')
const { default: tahoModule } = await import('@web3-onboard/taho')
const { default: enkryptModule } = await import('@web3-onboard/enkrypt')
const { default: mewWalletModule } = await import('@web3-onboard/mew-wallet')
const { default: torusModule } = await import('@web3-onboard/torus')
Expand All @@ -53,18 +53,25 @@ const intiOnboard = async (theme) => {
const INFURA_ID = '8b60d52405694345a99bcb82e722e0af'

const injected = injectedModule()
const infinityWallet = infinityWalletModule()
// const infinityWallet = infinityWalletModule()
const coinbase = coinbaseModule()
const dcent = dcentModule()
const walletConnect = walletConnectModule()
const walletConnect = walletConnectModule({
connectFirstChainId: true,
version: 2,
projectId: 'f6bd6e2911b56f5ac3bc8b2d0e2d7ad5',
qrcodeModalOptions: {
mobileLinks: ['rainbow', 'metamask', 'argent', 'trust', 'imtoken', 'pillar']
}
})
const ledger = ledgerModule()
const keystone = keystoneModule()
const keepkey = keepkeyModule()
const gnosis = gnosisModule()
const sequence = sequenceModule()
const enkrypt = enkryptModule()
const mewWallet = mewWalletModule()
const tally = tallyModule()
const taho = tahoModule()
const torus = torusModule()
const trust = trustModule()
const xdefi = xdefiModule()
Expand Down Expand Up @@ -109,12 +116,12 @@ const intiOnboard = async (theme) => {
trust,
gnosis,
uauth,
tally,
taho,
xdefi,
torus,
sequence,
web3auth,
infinityWallet,
// infinityWallet,
dcent,
enkrypt,
mewWallet,
Expand Down Expand Up @@ -172,6 +179,12 @@ const intiOnboard = async (theme) => {
token: 'ARB-ETH',
label: 'Arbitrum',
rpcUrl: 'https://rpc.ankr.com/arbitrum'
},
{
id: 84531,
token: 'ETH',
label: 'Base Goerli',
rpcUrl: 'https://goerli.base.org'
}
],
appMetadata: {
Expand Down
2 changes: 1 addition & 1 deletion docs/src/routes/docs/[...1]overview/[...1]introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ if (wallets[0]) {

Add other wallet modules such as Wallet Connect or Ledger to increase the support and functionality of your web3-onboard implementation. All modules are listed below and can be accessed through the subpages of web3-onboard docs on the left.

We recommend you add the [Core Repo](https://onboard.blocknative.com/docs/modules/core#install) and consider adding the [Injected Wallets](https://onboard.blocknative.com/docs/packages/injected#install) module to get connected with wallets like Metamask, Tally, Coinbase Wallet & more right away.
We recommend you add the [Core Repo](https://onboard.blocknative.com/docs/modules/core#install) and consider adding the [Injected Wallets](https://onboard.blocknative.com/docs/packages/injected#install) module to get connected with wallets like Metamask, Trust, Coinbase Wallet & more right away.

[**Core Repo**](https://onboard.blocknative.com/docs/modules/core#install)

Expand Down
68 changes: 46 additions & 22 deletions docs/src/routes/docs/[...1]overview/[...2]contribution-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,54 +2,78 @@
sidebar_title: "Contribution Guide"
---

## How can I contribute to web3-onboard?
# How can I contribute to web3-onboard?

### Reporting Bugs
[Report a Bug](#bug-reports-🐛)<br />
[Submit a Pull Request](#pull-requests-🗂️)<br />
[Add a Wallet](#how-can-i-add-a-new-wallet-💳)<br />
[Contribute to the Docs](#documentation-contributions-📄)<br />
[Share Feedback](#feedback-💬)<br />
[Get Support](#support-🤓)<br />

Before creating an issue for a bug, please do a search through the Web3 Onboard issues to make sure that one has not already been created. You may find that someone else has run in to that issue and there may be a fix that has been released in a newer update.
## Bug Reports 🐛

If an issue does not exist for the bug that you want to report, go ahead and create an issue, making sure to add as much detail as possible and following the issue template instructions.
Before creating an issue for a bug, please search through the existing [Web3 Onboard issues](https://github.com/blocknative/web3-onboard/issues). You may find that someone else ran into the same bug or a fix has been released in a newer update.

Once an issue has been created, one of the Web3 Onboard maintainers will take a look and will respond typically within a few days. The initial response will usually just acknowledge the issue and will indicate what will happen next.
If an issue does not already exist, follow the template instructions to create a new issue, adding as much detail as possible.

### Pull Requests
Once an issue is created, a Web3 Onboard maintainer will review and respond typically within a few days to share next steps.

If there is a feature or change that you would like to see in Web3 Onboard, you can fork the repo and make a pull request to have the changes merged in to the main repo and released as part of the official packages.
## [Pull Requests 🗂️](#pr)

Once a PR is created, one of the Web3 Onboard maintainers will acknowledge the PR and add it to our sprint planning to be reviewed as soon as possible.
To create a new feature or change in Web3 Onboard, fork the repo and make a pull request on the [develop branch](https://github.com/blocknative/web3-onboard/tree/develop) to have your changes merged in and released as part of the official packages.

Once a PR is created, a Web3 Onboard maintainer will acknowledge it and add to sprint planning for review as soon as possible.

### Package Versioning
**Important Note: The PR template checklist must be complete before review can take place.**

After making changes within a web3-onboard package you will want to bump the version of the specific package. For example if you were to add a new injected wallet to the injected package you will need to bump the version of the injected package within that module's [package.json](https://github.com/blocknative/web3-onboard/blob/8531a73d69365f7d584320f1c4b97a5d90f1c34e/packages/injected/package.json#L3).
### Package Versioning 📦

We use both semantic and `alpha` versioning for publishing and testing packages prior to official release. This means if you do not see an `-alpha.x` tag on the version of the package you made changes in you will need to not only bump the version but also add an alpha flag followed by an alpha version number starting at 1 (ex. `-alpha.1`).
We use both semantic and `alpha` versioning for publishing and testing packages prior to official release. If you do not see an `-alpha.x` tag on the version of the package you made changes in, you will need to bump the version AND add an alpha flag followed by an alpha version number starting at 1 (ex. `-alpha.1`).

After making changes within a web3-onboard package, bump the version of the specific package:

Example : Adding a new injected wallet to the `injected` package -
[Injected Package.json](https://github.com/blocknative/web3-onboard/blob/develop/packages/injected/package.json#L3) changes : `"version": "2.2.4",` --> `"version": "2.3.0-alpha.1",`

Example 2 : Bug fix within the `core` package -
[Core package.json](https://github.com/blocknative/web3-onboard/blob/8531a73d69365f7d584320f1c4b97a5d90f1c34e/packages/core/package.json#L3) changes: `"version": "2.9.1-alpha.1",` --> `"version": "2.9.1-alpha.2",`

## [How can I add a new wallet? 💳](#new-wallet)

To add a new wallet to the official Web3 Onboard packages and repo, create a [pull request](#pull-requests-🗂️). Web3 Onboard does not require a wallet to be a part of the main code, so a separate wallet module can be created without any changes to the Web3Onboard codebase. Your PR must include a detailed README for the package, keeping in mind that this README is the the first point of contact for dapp devs looking to implement your wallet.

Please also include updates to documentation in your PR. Refer to the [docs contributions section](#documentation-contributions-📄) and the PR template docs checklist.

### Adding Injected Wallets
If the wallet you are adding is an “injected” wallet (browser extension, mobile dapp browser wallet), add a wallet to the injected wallets module. [See here for an example of an injected wallets pull request.](https://github.com/blocknative/web3-onboard/pull/1177/files) You should also add the wallet to the [natively supported injected wallets list](http://localhost:3000/docs/wallets/injected#injected-wallets-supported-natively).

### Adding Wallet Modules
Otherwise, if the wallet you are adding requires dependencies and initialization (SDK), then you will need to create a new package in the Web3 Onboard monorepo. [See here for an example of a pull request.](https://github.com/blocknative/web3-onboard/pull/1238/files)
<br />
<br />

If you cannot write the code yourself to add a new wallet, create a new feature request issue to be considered by the maintainers and other contributors in the community.

### How can I get a new wallet added?
## [Documentation Contributions 📄](#docs)

Web3 Onboard does not require a wallet to be a part of the main codebase to work, so a wallet module can be created and used for your project without needing anything to happen within the Web3Onboard codebase. If you would like the wallet to be part of the official Web3 Onboard packages and repo, then create a pull request, and make sure to add any documentation updates by creating a docs pull request.
If you contribute to the code, you should definitely document appropriately.

If the wallet you are adding is an “injected” wallet (browser extension, mobile dapp browser wallet), you can add a wallet to the injected wallets module. [See here for an example of an injected wallets pull request.](https://github.com/blocknative/web3-onboard/pull/1177/files) You should also add the wallet to the [natively supported injected wallets list](https://onboard.blocknative.com/docs/packages/injected#injected-wallets-supported-natively).
In order to contribute to the docs, create a PR on the [develop branch](https://github.com/blocknative/web3-onboard/tree/develop). The PR description should include a screenshot of any changes.

Otherwise if the wallet you are adding requires adding dependencies and initialization (SDK), then you will need to create a new package in the Web3 Onboard monorepo. [See here for an example of a pull request.](https://github.com/blocknative/web3-onboard/pull/1238/files)
**Important note: The PR template docs checklist must be complete before review can take place.**

If you cannot write the code yourself to add a new wallet, then go ahead and create a feature request issue which may be considered by the maintainers or someone else in the community.
PRs for adding/updating a wallet should include a README (new or updated) for the package (located in `docs/src/routes/docs/[...4]wallets`), and adding/updating the module in [docs demo](https://github.com/blocknative/web3-onboard/blob/develop/docs/src/lib/services/onboard.js) and docs package (`docs/package.json`). New injected wallets should also add the wallet to the [natively supported injected wallets list](https://github.com/blocknative/web3-onboard/blob/develop/docs/src/routes/docs/%5B...4%5Dwallets/injected.md).

### Documentation contributions
[See here for an example of a docs pull request.](https://github.com/blocknative/web3-onboard/pull/1544/files)

In order to contribute to the docs, you'll have to create a PR on the [develop branch](https://github.com/blocknative/web3-onboard/tree/develop). If you contribute code, you should definitely document it appropriately. We highly encourage the community to improve web3-onboard docs, if you have any questions don't hesitate to reach out.
We highly encourage the community to help us improve the web3-onboard docs! If you have any questions don't hesitate to reach out.

## Feedback
## [Feedback 💬](#feedback)

Jump in to our discord server to provide any feedback you feel is worth sharing. Could the docs be improved? Did you have trouble integrating? Feature requests etc.
Did you have trouble integrating? Could the docs be improved? Have a new Feature request?
Jump in our [Discord](https://discord.com/invite/KZaBVME) and share your feedback.

## Support
## [Support 🤓](#support)

For general questions about how to use Web3 Onboard you can first check out our [docs](https://onboard.blocknative.com/docs/overview/introduction#features) to see if there is an answer there, or you can head to our [Discord](https://discord.com/invite/KZaBVME) for support from the Blocknative team
For general questions about how to use Web3 Onboard please first check out our [docs](https://onboard.blocknative.com/docs/overview/introduction#features), then head to our [Discord](https://discord.com/invite/KZaBVME) for support from the Blocknative team.
Loading

0 comments on commit 109e46c

Please sign in to comment.