From 3e1b9bf6aa425263d17f2a0243705c523a40b0e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Rodr=C3=ADguez=20Caballero?= Date: Fri, 21 Jul 2023 13:10:26 +0200 Subject: [PATCH] chore: rename Gnosis to Safe in most places --- README.md | 2 +- .../[...1]introduction/+page.md | 2 +- .../docs/[...4]wallets/[...8]gnosis/+page.md | 26 +++++++++---------- .../examples/[...1]connect-wallet/+page.md | 12 ++++----- examples/with-nextjs-13/web3-onboard.ts | 6 ++--- examples/with-vite-react/src/web3-onboard.ts | 6 ++--- packages/demo/src/App.svelte | 6 ++--- packages/gnosis/README.md | 24 ++++++++--------- packages/gnosis/package.json | 2 +- 9 files changed, 43 insertions(+), 43 deletions(-) diff --git a/README.md b/README.md index 677acdc62..446dbeb01 100644 --- a/README.md +++ b/README.md @@ -90,7 +90,7 @@ For full documentation, check out the README.md for each package or the [docs pa - [Coinbase](packages/coinbase/README.md) - [Trust](packages/trust/README.md) - [WalletConnect](packages/walletconnect/README.md) -- [Gnosis](packages/gnosis/README.md) +- [Safe](packages/gnosis/README.md) - [Magic](packages/magic/README.md) - [Fortmatic](packages/fortmatic/README.md) - [Portis](packages/portis/README.md) diff --git a/docs/src/routes/docs/[...1]overview/[...1]introduction/+page.md b/docs/src/routes/docs/[...1]overview/[...1]introduction/+page.md index 499d75d21..ba42d1018 100644 --- a/docs/src/routes/docs/[...1]overview/[...1]introduction/+page.md +++ b/docs/src/routes/docs/[...1]overview/[...1]introduction/+page.md @@ -150,7 +150,7 @@ We recommend you add the [Core Repo](../../modules/core.md#install) and consider - [Coinbase](../../wallets/coinbase.md#install) - [WalletConnect](../../wallets/walletconnect.md#install) -- [Gnosis](../../wallets/gnosis.md#install) +- [Safe](../../wallets/gnosis.md#install) - [Magic](../../wallets/magic.md#login-options) - [Fortmatic](../../wallets/fortmatic.md#install) - [MEW](../../wallets/mewwallet.md#install) diff --git a/docs/src/routes/docs/[...4]wallets/[...8]gnosis/+page.md b/docs/src/routes/docs/[...4]wallets/[...8]gnosis/+page.md index 5c0c271be..c6a1cd5ee 100644 --- a/docs/src/routes/docs/[...4]wallets/[...8]gnosis/+page.md +++ b/docs/src/routes/docs/[...4]wallets/[...8]gnosis/+page.md @@ -1,10 +1,10 @@ --- -title: Gnosis +title: Safe --- # {$frontmatter.title} -Wallet module for connecting Gnosis Safe to web3-onboard +Wallet module for connecting Safe to web3-onboard ## Install @@ -37,14 +37,14 @@ type GnosisOptions = { ```typescript import Onboard from '@web3-onboard/core' -import gnosisModule from '@web3-onboard/gnosis' +import safeModule from '@web3-onboard/gnosis' -const gnosis = gnosisModule() +const safe = safeModule() const onboard = Onboard({ // ... other Onboard options wallets: [ - gnosis + safe //... other wallets ] }) @@ -53,13 +53,13 @@ const connectedWallets = await onboard.connectWallet() console.log(connectedWallets) ``` -## Customizing Gnosis Transaction Gas +## Customizing Safe Transaction Gas -If you are looking to set the `gasLimit` of a transaction within Gnosis, the gas properties within the transaction WILL BE IGNORED. -Instead you will need to use the `safeTxGas` prop AND the web3-onboard Gnosis instance that is exposed through the provider to send along the transaction. -The Gnosis sdk instance exposed by the web3-onboard must be used to set the `safeTxGas` prop and send the transaction. -Check [Gnosis docs](https://github.com/safe-global/safe-contracts/blob/a6504a9afdeac186a8cdb29ad68b189523c80eda/docs/safe_tx_gas.md) for full detail as it can be a bit confusing. -An example of accessing the Gnosis SDK instance and sending a transaction can be found below. +If you are looking to set the `gasLimit` of a transaction within Safe, the gas properties within the transaction WILL BE IGNORED. +Instead you will need to use the `safeTxGas` prop AND the web3-onboard Safe instance that is exposed through the provider to send along the transaction. +The Safe sdk instance exposed by the web3-onboard must be used to set the `safeTxGas` prop and send the transaction. +Check [Safe docs](https://github.com/safe-global/safe-contracts/blob/a6504a9afdeac186a8cdb29ad68b189523c80eda/docs/safe_tx_gas.md) for full detail as it can be a bit confusing. +An example of accessing the Safe SDK instance and sending a transaction can be found below. ```typescript const tx = { @@ -71,11 +71,11 @@ const params = { safeTxGas: 5000000 } -// wallet is the provider exposed by web3-onboard after the Gnosis wallet is connected +// wallet is the provider exposed by web3-onboard after the Safe wallet is connected let trans = await wallet.instance.txs.send({ txs: [tx], params }) ``` -Note: With the `safeTxGas` you will see additional value on the `gasLimit` displayed in the Safe. Check [Gnosis docs](https://github.com/safe-global/safe-contracts/blob/a6504a9afdeac186a8cdb29ad68b189523c80eda/docs/safe_tx_gas.md) for full details on that computation. +Note: With the `safeTxGas` you will see additional value on the `gasLimit` displayed in the Safe. Check [Safe docs](https://github.com/safe-global/safe-contracts/blob/a6504a9afdeac186a8cdb29ad68b189523c80eda/docs/safe_tx_gas.md) for full details on that computation. ## Build Environments diff --git a/docs/src/routes/examples/[...1]connect-wallet/+page.md b/docs/src/routes/examples/[...1]connect-wallet/+page.md index 95e168975..b713e7ad6 100644 --- a/docs/src/routes/examples/[...1]connect-wallet/+page.md +++ b/docs/src/routes/examples/[...1]connect-wallet/+page.md @@ -48,7 +48,7 @@ import { Web3OnboardProvider, init } from '@web3-onboard/react' import injectedModule from '@web3-onboard/injected-wallets' import infinityWalletModule from '@web3-onboard/infinity-wallet' import fortmaticModule from '@web3-onboard/fortmatic' -import gnosisModule from '@web3-onboard/gnosis' +import safeModule from '@web3-onboard/gnosis' import keepkeyModule from '@web3-onboard/keepkey' import keystoneModule from '@web3-onboard/keystone' import ledgerModule from '@web3-onboard/ledger' @@ -83,7 +83,7 @@ const infinityWallet = infinityWalletModule() const ledger = ledgerModule() const keystone = keystoneModule() const keepkey = keepkeyModule() -const gnosis = gnosisModule() +const safe = safeModule() const sequence = sequenceModule() const taho = tahoModule() // Previously named Tally Ho wallet const trust = trustModule() @@ -113,7 +113,7 @@ const wallets = [ dcent, trezor, walletConnect, - gnosis, + safe, magic, fortmatic, keystone, @@ -298,7 +298,7 @@ import Onboard from '@web3-onboard/core' import injectedModule from '@web3-onboard/injected-wallets' import infinityWalletModule from '@web3-onboard/infinity-wallet' import fortmaticModule from '@web3-onboard/fortmatic' -import gnosisModule from '@web3-onboard/gnosis' +import safeModule from '@web3-onboard/gnosis' import keepkeyModule from '@web3-onboard/keepkey' import keystoneModule from '@web3-onboard/keystone' import ledgerModule from '@web3-onboard/ledger' @@ -334,7 +334,7 @@ const infinityWallet = infinityWalletModule() const ledger = ledgerModule() const keystone = keystoneModule() const keepkey = keepkeyModule() -const gnosis = gnosisModule() +const safe = safeModule() const sequence = sequenceModule() const taho = tahoModule() // Previously named Tally Ho wallet const trust = trustModule() @@ -369,7 +369,7 @@ const wallets = [ walletConnect, enkrypt, mewWallet, - gnosis, + safe, magic, fortmatic, keystone, diff --git a/examples/with-nextjs-13/web3-onboard.ts b/examples/with-nextjs-13/web3-onboard.ts index 2c2316bd1..a12ee4a14 100644 --- a/examples/with-nextjs-13/web3-onboard.ts +++ b/examples/with-nextjs-13/web3-onboard.ts @@ -1,5 +1,5 @@ import fortmaticModule from '@web3-onboard/fortmatic' -import gnosisModule from '@web3-onboard/gnosis' +import safeModule from '@web3-onboard/gnosis' import injectedModule from '@web3-onboard/injected-wallets' import keepkeyModule from '@web3-onboard/keepkey' import keystoneModule from '@web3-onboard/keystone' @@ -47,7 +47,7 @@ const torus = torusModule() const ledger = ledgerModule() const keepkey = keepkeyModule() const keystone = keystoneModule() -const gnosis = gnosisModule() +const safe = safeModule() const dcent = dcentModule() const mew = mewModule() const tahoWalletSdk = tahoWalletModule() // Previously named Tally Ho wallet @@ -75,7 +75,7 @@ export default init({ // An array of wallet modules that you would like to be presented to the user to select from when connecting a wallet. wallets: [ injected, - gnosis, + safe, fortmatic, portis, walletLink, diff --git a/examples/with-vite-react/src/web3-onboard.ts b/examples/with-vite-react/src/web3-onboard.ts index 84587cb82..6b1867cea 100644 --- a/examples/with-vite-react/src/web3-onboard.ts +++ b/examples/with-vite-react/src/web3-onboard.ts @@ -1,5 +1,5 @@ import fortmaticModule from '@web3-onboard/fortmatic' -import gnosisModule from '@web3-onboard/gnosis' +import safeModule from '@web3-onboard/gnosis' import injectedModule from '@web3-onboard/injected-wallets' import keepkeyModule from '@web3-onboard/keepkey' import keystoneModule from '@web3-onboard/keystone' @@ -55,7 +55,7 @@ const torus = torusModule() const ledger = ledgerModule() const keepkey = keepkeyModule() const keystone = keystoneModule() -const gnosis = gnosisModule() +const safe = safeModule() const dcent = dcentModule() const mew = mewModule() const tahoWalletSdk = tahoWalletModule() @@ -83,7 +83,7 @@ export default init({ // An array of wallet modules that you would like to be presented to the user to select from when connecting a wallet. wallets: [ injected, - gnosis, + safe, fortmatic, portis, walletLink, diff --git a/packages/demo/src/App.svelte b/packages/demo/src/App.svelte index ab804192d..b22116b9a 100644 --- a/packages/demo/src/App.svelte +++ b/packages/demo/src/App.svelte @@ -2,7 +2,7 @@ import Onboard from '@web3-onboard/core' import fortmaticModule from '@web3-onboard/fortmatic' import frameModule from '@web3-onboard/frame' - import gnosisModule from '@web3-onboard/gnosis' + import safeModule from '@web3-onboard/gnosis' import infinityWalletModule from '@web3-onboard/infinity-wallet' import injectedModule, { ProviderLabel } from '@web3-onboard/injected-wallets' import keepkeyModule from '@web3-onboard/keepkey' @@ -136,7 +136,7 @@ const ledger = ledgerModule({ projectId: 'f6bd6e2911b56f5ac3bc8b2d0e2d7ad5' }) const keepkey = keepkeyModule() const keystone = keystoneModule() - const gnosis = gnosisModule() + const safe = safeModule() const tallyho = tallyHoModule() const xdefi = xdefiWalletModule() const zeal = zealModule() @@ -191,7 +191,7 @@ walletConnect, coinbaseWallet, phantom, - gnosis, + safe, trust, tallyho, enkrypt, diff --git a/packages/gnosis/README.md b/packages/gnosis/README.md index 4d9dcaf89..435b7768f 100644 --- a/packages/gnosis/README.md +++ b/packages/gnosis/README.md @@ -1,6 +1,6 @@ # @web3-onboard/gnosis -## Wallet module for connecting Gnosis Safe to web3-onboard +## Wallet module for connecting Safe to web3-onboard ### Install @@ -18,14 +18,14 @@ type GnosisOptions = { ```typescript import Onboard from '@web3-onboard/core' -import gnosisModule from '@web3-onboard/gnosis' +import safeModule from '@web3-onboard/gnosis' -const gnosis = gnosisModule() +const safe = safeModule() const onboard = Onboard({ // ... other Onboard options wallets: [ - gnosis + safe //... other wallets ] }) @@ -34,13 +34,13 @@ const connectedWallets = await onboard.connectWallet() console.log(connectedWallets) ``` -## Customizing Gnosis Transaction Gas +## Customizing Safe Transaction Gas -If you are looking to set the `gasLimit` of a transaction within Gnosis, the gas properties within the transaction WILL BE IGNORED. -Instead you will need to use the `safeTxGas` prop AND the web3-onboard Gnosis instance that is exposed through the provider to send along the transaction. -The Gnosis sdk instance exposed by the web3-onboard must be used to set the `safeTxGas` prop and send the transaction. -Check [Gnosis docs](https://github.com/safe-global/safe-contracts/blob/a6504a9afdeac186a8cdb29ad68b189523c80eda/docs/safe_tx_gas.md) for full detail as it can be a bit confusing. -An example of accessing the Gnosis SDK instance and sending a transaction can be found below. +If you are looking to set the `gasLimit` of a transaction within Safe, the gas properties within the transaction WILL BE IGNORED. +Instead you will need to use the `safeTxGas` prop AND the web3-onboard Safe instance that is exposed through the provider to send along the transaction. +The Safe sdk instance exposed by the web3-onboard must be used to set the `safeTxGas` prop and send the transaction. +Check [Safe docs](https://github.com/safe-global/safe-contracts/blob/a6504a9afdeac186a8cdb29ad68b189523c80eda/docs/safe_tx_gas.md) for full detail as it can be a bit confusing. +An example of accessing the Safe SDK instance and sending a transaction can be found below. ```typescript const tx = { @@ -52,8 +52,8 @@ const params = { safeTxGas: 5000000, }; -// wallet is the provider exposed by web3-onboard after the Gnosis wallet is connected +// wallet is the provider exposed by web3-onboard after the Safe wallet is connected let trans = await wallet.instance.txs.send({txs:[tx], params}) ``` -Note: With the `safeTxGas` you will see additional value on the `gasLimit` displayed in the Safe. Check [Gnosis docs](https://github.com/safe-global/safe-contracts/blob/a6504a9afdeac186a8cdb29ad68b189523c80eda/docs/safe_tx_gas.md) for full details on that computation. +Note: With the `safeTxGas` you will see additional value on the `gasLimit` displayed in the Safe. Check [Safe docs](https://github.com/safe-global/safe-contracts/blob/a6504a9afdeac186a8cdb29ad68b189523c80eda/docs/safe_tx_gas.md) for full details on that computation. diff --git a/packages/gnosis/package.json b/packages/gnosis/package.json index 3806a9efb..45c3a5b7f 100644 --- a/packages/gnosis/package.json +++ b/packages/gnosis/package.json @@ -1,7 +1,7 @@ { "name": "@web3-onboard/gnosis", "version": "2.2.0-alpha.1", - "description": "Gnosis Safe module for connecting 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.", + "description": "Safe module for connecting 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", "Web3",