Migration guide for upgrading LI.FI Widget v2 to v3
default
is now compact
expandable
is now wide
See Select Widget Variants for more details.
toAddress
option had a type string
. To extend the feature in v3 we added a specific type for this field.
subvariantOptions
required type update. Previously, subvariantOptions
supported only split
subvariant and had SplitSubvariantOptions
type and now we added support for custom
subvariant with possibly more subvariant options coming in the future.
SDKConfig
type is now WidgetSDKConfig
.
defaultRouteOptions
renamed to routeOptions
.
hiddenUI
option and controlling the drawer by attaches the ref. Since the title and positioning often required some adjustments we decided to remove pre-built drawer button in favor of controlling the drawer with external button.
Here is the example of controlling the drawer with ref and you can customize the button as you like.
HiddenUI.DrawerButton
option since there is no default button anymore. However, we added a new option HiddenUI.DrawerCloseButton
to hide the close button inside the drawer.
containerStyle
option is moved under the umbrella of the theme
option and was renamed to container
.
theme
option type was renamed from ThemeConfig
to WidgetTheme
.
Please check out more in Customize Widget section.
disableLanguageDetector
configuration option was removed. Language detection should now be inherited from the integration dApp.
WagmiProvider
and you are set. If you already have one in your dApp, just make sure to keep the Wagmi chains configuration in sync with the Widget chain list, so all functionality like switching chains can keep working.
See Wallet Management for more details.
walletManagement
option was renamed to walletConfig
and now has the following interface:
ethers.js
to Wagmi
we added it to our peer dependencies.