Skip to content

Commit

Permalink
Create new package for TallyHo name change to Taho (#1542)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
Adamj1232 committed Mar 7, 2023
1 parent 4a28dfc commit 4226d71
Show file tree
Hide file tree
Showing 24 changed files with 309 additions and 30 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
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
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
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
2 changes: 1 addition & 1 deletion docs/src/routes/docs/[...4]wallets/injected.md
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ const injected = injectedModule({
- SafePal - _Desktop & Mobile_
- Zerion - _Desktop & Mobile_
- OKX Wallet - _Desktop_
- Tally - _Desktop_
- Taho (Previously named Tally Ho wallet) - _Desktop_
- Trust - _Mobile_
- Opera - _Desktop & Mobile_
- Status - _Mobile_
Expand Down
44 changes: 44 additions & 0 deletions docs/src/routes/docs/[...4]wallets/taho.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@

# Taho (previously Tally Ho)

## Wallet module for connecting Taho (wallet previously named Tally Ho)
See [Taho Developer Docs](https://docs.tally.cash/tally/developers/integrating-dapps)


## Install

<Tabs values={['yarn', 'npm']}>
<TabPanel value="yarn">

```sh copy
yarn add @web3-onboard/core @web3-onboard/taho
```

</TabPanel>
<TabPanel value="npm">

```sh copy
npm install @web3-onboard/core @web3-onboard/taho
```

</TabPanel>
</Tabs>


## Usage

```typescript
import Onboard from '@web3-onboard/core'
import tahoWalletModule from '@web3-onboard/taho'

const onboard = Onboard({
// ... other Onboard options
wallets: [
tahoWalletModule()
//... other wallets
]
})

const connectedWallets = await onboard.connectWallet()
console.log(connectedWallets)
```
48 changes: 48 additions & 0 deletions docs/src/routes/docs/[...4]wallets/tallyho.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@

# Tally Ho

:::admonition type=warning
_Wallet module for connecting TallyHo to web3-onboard is now deprecated. Please use [@web3-onboard/taho](./taho.md)_
:::

## Wallet module for connecting TallyHo
See [Taho Developer Docs](https://docs.tally.cash/tally/developers/integrating-dapps)


## Install

<Tabs values={['yarn', 'npm']}>
<TabPanel value="yarn">

```sh copy
yarn add @web3-onboard/core @web3-onboard/tallyho
```

</TabPanel>
<TabPanel value="npm">

```sh copy
npm install @web3-onboard/core @web3-onboard/tallyho
```

</TabPanel>
</Tabs>


## Usage

```typescript
import Onboard from '@web3-onboard/core'
import tallyWalletModule from '@web3-onboard/tallyho'

const onboard = Onboard({
// ... other Onboard options
wallets: [
tallyWalletModule()
//... other wallets
]
})

const connectedWallets = await onboard.connectWallet()
console.log(connectedWallets)
```
2 changes: 1 addition & 1 deletion examples/with-nextjs-13/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"@web3-onboard/portis": "^2.1.3",
"@web3-onboard/react": "^2.6.1",
"@web3-onboard/sequence": "^2.0.3",
"@web3-onboard/tallyho": "^2.0.1",
"@web3-onboard/taho": "^2.0.0",
"@web3-onboard/torus": "^2.1.3",
"@web3-onboard/trezor": "^2.3.1",
"@web3-onboard/walletconnect": "^2.1.3",
Expand Down
6 changes: 3 additions & 3 deletions examples/with-nextjs-13/web3-onboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import magicModule from '@web3-onboard/magic'
import dcentModule from '@web3-onboard/dcent'
import mewModule from '@web3-onboard/mew-wallet'
import sequenceModule from '@web3-onboard/sequence'
import tallyHoWalletModule from '@web3-onboard/tallyho'
import tahoWalletModule from '@web3-onboard/taho'
import web3authModule from '@web3-onboard/web3auth'

import { init } from '@web3-onboard/react'
Expand Down Expand Up @@ -50,7 +50,7 @@ const keystone = keystoneModule()
const gnosis = gnosisModule()
const dcent = dcentModule()
const mew = mewModule()
const talltHoWalletSdk = tallyHoWalletModule()
const tahoWalletSdk = tahoWalletModule() // Previously named Tally Ho wallet
const web3auth = web3authModule({
clientId:
'DJuUOKvmNnlzy6ruVgeWYWIMKLRyYtjYa9Y10VCeJzWZcygDlrYLyXsBQjpJ2hxlBO9dnl8t9GmAC2qOP5vnIGo'
Expand Down Expand Up @@ -88,7 +88,7 @@ export default init({
keystone,
dcent,
mew,
talltHoWalletSdk,
tahoWalletSdk,
web3auth,
sequence
],
Expand Down
5 changes: 3 additions & 2 deletions packages/demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,16 @@
"@web3-onboard/keystone": "^2.3.3",
"@web3-onboard/ledger": "^2.4.2",
"@web3-onboard/infinity-wallet": "^2.0.0",
"@web3-onboard/injected-wallets": "^2.8.1",
"@web3-onboard/injected-wallets": "^2.8.2-alpha.1",
"@web3-onboard/magic": "^2.1.3",
"@web3-onboard/phantom": "^2.0.0-alpha.1",
"@web3-onboard/portis": "^2.1.3",
"@web3-onboard/sequence": "^2.0.4",
"@web3-onboard/trezor": "^2.3.3",
"@web3-onboard/trust": "^2.0.0",
"@web3-onboard/torus": "^2.2.1",
"@web3-onboard/tallyho": "^2.0.1",
"@web3-onboard/tallyho": "^2.0.2-alpha.1",
"@web3-onboard/taho": "^2.0.0-alpha.1",
"@web3-onboard/web3auth": "^2.1.4",
"@web3-onboard/walletconnect": "^2.3.1",
"@web3-onboard/enkrypt": "^2.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/injected/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ console.log(connectedWallets)
- SafePal - _Desktop & Mobile_
- Zerion - _Desktop & Mobile_
- OKX Wallet - _Desktop_
- Tally - _Desktop_
- Taho (Previously named Tally Ho wallet) - _Desktop_
- Trust - _Mobile_
- Opera - _Desktop & Mobile_
- Status - _Mobile_
Expand Down
2 changes: 1 addition & 1 deletion packages/injected/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@web3-onboard/injected-wallets",
"version": "2.8.1",
"version": "2.8.2-alpha.1",
"description": "Injected wallet module for connecting browser extension and mobile wallets to Web3-Onboard. Web3-Onboard makes it simple to connect Ethereum hardware and software wallets to your dapp. Features standardised spec compliant web3 providers for all supported wallets, framework agnostic modern javascript UI with code splitting, CSS customization, multi-chain and multi-account support, reactive wallet state subscriptions and real-time transaction state change notifications.",
"keywords": [
"Ethereum",
Expand Down
2 changes: 1 addition & 1 deletion packages/injected/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export enum ProviderLabel {
XDEFI = 'XDEFI Wallet',
OneInch = '1inch Wallet',
Tokenary = 'Tokenary Wallet',
Tally = 'Tally Ho Wallet',
Tally = 'Taho',
Rabby = 'Rabby',
MathWallet = 'MathWallet',
GameStop = 'GameStop Wallet',
Expand Down
30 changes: 30 additions & 0 deletions packages/taho/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# @web3-onboard/taho (Taho previously named Tally Ho wallet)

## Wallet module for connecting Taho (Previously named Tally Ho wallet) Wallet to web3-onboard
See [Taho Developer Docs](https://docs.tally.cash/tally/developers/integrating-dapps)

### Install

`npm i @web3-onboard/taho`


## Usage

```typescript
import Onboard from '@web3-onboard/core'
import tahoWalletModule from '@web3-onboard/taho'

// initialize the module with options
const tahoWalletSdk = tahoWalletModule()

const onboard = Onboard({
// ... other Onboard options
wallets: [
tahoWalletModule()
//... other wallets
]
})

const connectedWallets = await onboard.connectWallet()
console.log(connectedWallets)
```
Loading

0 comments on commit 4226d71

Please sign in to comment.