Skip to content

Commit efcb1a4

Browse files
authored
Merge pull request #1346 from blocknative/release/2.14.1
Release 2.14.1 (main)
2 parents 433a9d6 + bafd4ec commit efcb1a4

File tree

5 files changed

+30
-4
lines changed

5 files changed

+30
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "web3-onboard-monorepo",
3-
"version": "2.14.0",
3+
"version": "2.14.1",
44
"private": true,
55
"workspaces": {
66
"packages": [

packages/gas/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@web3-onboard/gas",
3-
"version": "2.1.3",
3+
"version": "2.1.4",
44
"description": "Estimate the gas prices needed to get a transaction in to the next block for Ethereum Mainnet and Polygon Matic Mainnet.",
55
"keywords": [
66
"gas",
@@ -16,6 +16,8 @@
1616
"bugs": "https://github.com/blocknative/web3-onboard/issues",
1717
"module": "dist/index.js",
1818
"typings": "dist/index.d.ts",
19+
"browser": "dist/index.js",
20+
"main": "dist/index.js",
1921
"files": [
2022
"dist"
2123
],

packages/gnosis/README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,27 @@ const onboard = Onboard({
3333
const connectedWallets = await onboard.connectWallet()
3434
console.log(connectedWallets)
3535
```
36+
37+
## Customizing Gnosis Transaction Gas
38+
39+
If you are looking to set the `gasLimit` of a transaction within Gnosis, the gas properties within the transaction WILL BE IGNORED.
40+
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.
41+
The Gnosis sdk instance exposed by the web3-onboard must be used to set the `safeTxGas` prop and send the transaction.
42+
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.
43+
An example of accessing the Gnosis SDK instance and sending a transaction can be found below.
44+
45+
```typescript
46+
const tx = {
47+
to: toAddress,
48+
value: 1000000000000000,
49+
data: '0x',
50+
}
51+
const params = {
52+
safeTxGas: 5000000,
53+
};
54+
55+
// wallet is the provider exposed by web3-onboard after the Gnosis wallet is connected
56+
let trans = await wallet.instance.txs.send({txs:[tx], params})
57+
```
58+
59+
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.

packages/gnosis/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@web3-onboard/gnosis",
3-
"version": "2.1.3",
3+
"version": "2.1.4",
44
"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.",
55
"keywords": [
66
"Ethereum",

packages/react/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ function App() {
5656
<div>
5757
<button
5858
disabled={connecting}
59-
onClick={() => (wallet ? disconnect() : connect())}
59+
onClick={() => (wallet ? disconnect(wallet) : connect())}
6060
>
6161
{connecting ? 'connecting' : wallet ? 'disconnect' : 'connect'}
6262
</button>

0 commit comments

Comments
 (0)