Releases: blocknative/web3-onboard
Dashboard Function
The wallet
object that the wallet subscription callback is called with now has a dashboard
parameter instead of the url
parameter. The url
parameter was a String
that is used to open a new window that would load the dashboard for SDK wallets. To make this more flexible we have changed this to dashboard
and to a Function
type so that if a SDK wallet has a function on the instance that will load the dashboard in the same window, then that can be called.
So if you are utilizing the url
parameter in you code currently, you will need to make the following changes:
// you might have a button that when clicked runs this onclick function...
// current code using url parameter
function onclick() {
if (wallet.type === 'sdk') {
wallet.url && window.open(wallet.url)
}
}
// new code using dashboard parameter
function onclick() {
if (wallet.type === 'sdk') {
wallet.dashboard && wallet.dashboard()
}
}
Also included in this release are a couple of small bug fixes via updates to both the Authereum and Unilogin dependencies.
Changelog:
UniLogin Wallet
This release adds UniLogin wallet as a supported wallet. To add it to your project simply add an additional wallet initialization object:
const config = {
//... other config options
walletSelect: {
wallets: [
//... other wallets
{ walletName: 'unilogin' }
]
}
}
Also included in this release is a small change to the copy included in the "What is a Wallet" section and an option to customize that text. To customize the text, you can use the new optional explanation
parameter in the walletSelect
object:
const config = {
//... other config options
walletSelect: {
//... other wallet select options
explanation: "Explain what an Ethereum wallet is here..."
}
}
Changelog:
Upgrade SDK to version 2
Custom Derivation Paths and Improved UI for Hardware Wallets
This release adds a new wallet check module for hardware wallets that allow user's to select a derivation path from a list of common paths or input a custom path to access accounts on their hardware wallets:
To add this extra check to your app:
const config = {
//... other config options
walletCheck: [
{ checkName: "derivationPath" },
{ checkName: "accounts" },
{ checkName: "connect" },
{ checkName: "network" }
]
}
const onboard = Onboard(config)
Changelog:
Ledger Support for Electron Apps
This release adds support for Ledger wallets in Electron apps via an additional LedgerTransport
property on the Ledger initialization object. For Ledger to work on Electron apps it needs to use the node transport module.
So to get this working in your Electron app you will need to install the node transport module, require it and then pass it in when initializing Onboard:
const TransportNodeHid = require("@ledgerhq/hw-transport-node-hid").default;
const onboardConfig = {
// other config options...
wallets: [
// other wallets...
{
walletName: "ledger",
rpcUrl: `https://rinkeby.infura.io/v3/${infuraKey}`,
LedgerTransport: TransportNodeHid
}
]
}
A small UI enhancement is also included in this release which makes all modals disable window scrolling so that a user can't scroll below the modal.
Changelog:
Bug Fix
Enhancements and Small Bug Fixes
This release has a collection of small enhancements and bug fixes. The design has been refined in the wallet select modal so that it is more clear when a wallet is currently selected. A bug with connecting to the Opera wallet has been fixed.
Changelog:
Fix Derivation Paths
A small release to change the hardware wallet derivation paths to match common implementations.
Changelog:
- Make derivation paths match common implementations (#228)
Update Blocknative SDK
A small release to update to the latest Blocknative SDK version which adds adds the ability to unsubscribe from a watched address.
Code has been updated in the balance
store where the current address is watched for confirmed transactions so that the previous address will be unwatched when the current address changes to avoid unnecessary messages from the server.
The lodash.debounce
dependency has also been removed as it is no longer needed due to backend improvements.
Changelog:
- Update sdk and unsubscribe from address (#224)
Trust Deep Link
Just a small release that fixes a few minor issues. The Trust deep link has been updated to the new format, the Torus SDK is now imported dynamically which matches the other SDK wallets and a small bug where the account balance wouldn't show correctly in the hardware wallet account select modal has been fixed.
Changelog: