Skip to content

Commit

Permalink
Merge pull request #1346 from blocknative/release/2.14.1
Browse files Browse the repository at this point in the history
Release 2.14.1 (main)
  • Loading branch information
Adamj1232 authored Oct 28, 2022
2 parents 433a9d6 + bafd4ec commit efcb1a4
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "web3-onboard-monorepo",
"version": "2.14.0",
"version": "2.14.1",
"private": true,
"workspaces": {
"packages": [
Expand Down
4 changes: 3 additions & 1 deletion packages/gas/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@web3-onboard/gas",
"version": "2.1.3",
"version": "2.1.4",
"description": "Estimate the gas prices needed to get a transaction in to the next block for Ethereum Mainnet and Polygon Matic Mainnet.",
"keywords": [
"gas",
Expand All @@ -16,6 +16,8 @@
"bugs": "https://github.com/blocknative/web3-onboard/issues",
"module": "dist/index.js",
"typings": "dist/index.d.ts",
"browser": "dist/index.js",
"main": "dist/index.js",
"files": [
"dist"
],
Expand Down
24 changes: 24 additions & 0 deletions packages/gnosis/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,27 @@ const onboard = Onboard({
const connectedWallets = await onboard.connectWallet()
console.log(connectedWallets)
```

## Customizing Gnosis 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.

```typescript
const tx = {
to: toAddress,
value: 1000000000000000,
data: '0x',
}
const params = {
safeTxGas: 5000000,
};

// wallet is the provider exposed by web3-onboard after the Gnosis 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.
2 changes: 1 addition & 1 deletion packages/gnosis/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@web3-onboard/gnosis",
"version": "2.1.3",
"version": "2.1.4",
"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.",
"keywords": [
"Ethereum",
Expand Down
2 changes: 1 addition & 1 deletion packages/react/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ function App() {
<div>
<button
disabled={connecting}
onClick={() => (wallet ? disconnect() : connect())}
onClick={() => (wallet ? disconnect(wallet) : connect())}
>
{connecting ? 'connecting' : wallet ? 'disconnect' : 'connect'}
</button>
Expand Down

0 comments on commit efcb1a4

Please sign in to comment.