Skip to content

Commit 8aa68c4

Browse files
committed
Merge branch 'feature/react_hook_updates' of blocknative.github.com:blocknative/onboard into feature/react_hook_updates
2 parents f064353 + b9bbc40 commit 8aa68c4

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

packages/react/README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,9 @@ const web3Onboard = init({
143143
console.log({ transaction })
144144
if (transaction.eventCode === 'txPool') {
145145
return {
146-
// autoDismiss set to zero will persist the notification until the user excuses it
146+
// autoDismiss set to `0` will persist the notification until the user excuses it
147147
autoDismiss: 0,
148-
// message: `Your transaction is pending, click <a href="https://rinkeby.etherscan.io/tx/${transaction.hash}" rel="noopener noreferrer" target="_blank">here</a> for more info.`,
148+
// message: `Your transaction is pending, click <a href="https://rinkeby.etherscan.io/tx/${transaction.hash}">here</a> for more info.`,
149149
// or you could use onClick for when someone clicks on the notification itself
150150
onClick: () =>
151151
window.open(`https://rinkeby.etherscan.io/tx/${transaction.hash}`)
@@ -278,9 +278,9 @@ const [
278278
connecting // boolean indicating if connection is in progress
279279
},
280280
connect, // function to call to initiate user to connect wallet
281-
disconnect, // function to call to with wallet<DisconnectOptions> to disconnect wallet
281+
disconnect, // function to call with wallet<DisconnectOptions> to disconnect wallet
282282
updateBalances, // function to be called with an option array of wallet addresses connected through Onboard to update balance or empty/no params to update all connected wallets
283-
setWalletModules // function to be called with an array of wallet modules to conditional allow connection of wallet types i.e. setWalletModules([ledger, trezor, injected])
283+
setWalletModules // function to be called with an array of wallet modules to conditionally allow connection of wallet types i.e. setWalletModules([ledger, trezor, injected])
284284
] = useConnectWallet()
285285
```
286286
@@ -366,10 +366,10 @@ interface UpdateNotification {
366366
}
367367
type NotifyOptions = {
368368
/**
369-
* Defines whether whether to subscribe to transaction events or not
369+
* Defines whether to subscribe to transaction events or not
370370
* default: true
371371
*/
372-
enabled: boolean
372+
enabled?: boolean
373373
/**
374374
* Callback that receives all transaction events
375375
* Return a custom notification based on the event
@@ -381,7 +381,7 @@ type NotifyOptions = {
381381
) => TransactionHandlerReturn
382382

383383
const [
384-
notifications, // the list of all notifications that updates when notifications are added, updated or removed
384+
notifications, // the list of all notifications that update when notifications are added, updated or removed
385385
customNotification, // a function that takes a customNotification object and allows custom notifications to be shown to the user, returns an update and dismiss callback
386386
updateNotify // a function that takes a NotifyOptions object to allow updating of the properties
387387
] = useNotifications()

0 commit comments

Comments
 (0)