@skip-go/widget v3.9.0
Prop 名称变更
变更前:@skip-go/widget v3.0.0
1. 更新依赖(^3.0.0)
如果你使用的是
yarn(或其他默认不会安装 peer dependencies 的包管理器),
你可能还需要安装以下 peer dependencies:2. theme Prop 变更
提供更多自定义选项
你可以传入light、dark,或一个自定义主题对象,以更细粒度地控制 Widget 的外观。
变更前:
3. Prop 拼写变更
chainID 重命名为 chainId
apiURL 重命名为 apiUrl
将所有 chainID 更新为 chainId,尤其是 defaultRoute prop 中的用法。
变更前:
4. 暂时禁用的功能
以下 props 将在未来版本的Widget 中重新引入。
a. connectedWallet Prop
connectedWallet prop 允许传入自定义钱包提供方,但当前暂不支持。
b. CallbackStore 回调 Props
onWalletConnected、onWalletDisconnected、onTransactionBroadcasted、onTransactionComplete 和 onTransactionFailed 这些回调 props 当前暂不支持。
5. 已移除的功能
a. persistWidgetState
该 prop 已不再支持,因为 Widget 默认会持久化状态。
b. toasterProps
toasterProps prop 已被移除,因为 Widget 不再生成通知。
c. makeDestinationWallets
makeDestinationWallets prop 已被移除。Widget 现在会根据已连接钱包或用户手动输入自动生成目标钱包。
完成这些变更后,你就可以将应用从 Widget V1 成功迁移到 Widget V2。如需进一步帮助,请参阅官方文档或联系支持团队。
@skip-go/widget v3.9.0
Prop name changes
Before:@skip-go/widget v3.0.0
1. Update Dependency (^3.0.0)
If you’re using
yarn (or another package manager that doesn’t install peer dependencies by default)
you may need to install these peer dependencies as well:2. theme Prop Changes
More Customization Options
You can pass eitherlight, dark, or a custom theme object with granular
control over the widget’s appearance.
Before:
3. Prop Spelling Changes
chainID Renamed to chainId
apiURL Renamed to apiUrl
Update all instances of chainID to chainId, notably in the defaultRoute prop.
Before:
4. Temporarily Disabled Features
The following props will be reintroduced in future versions ofWidget.
a. connectedWallet Prop
The connectedWallet prop, which allowed passing a custom wallet provider, isn’t currently supported.
b. CallbackStore Callback Props
The onWalletConnected, onWalletDisconnected, onTransactionBroadcasted, onTransactionComplete, and onTransactionFailed callback props aren’t currently supported.
5. Removed Features
a. persistWidgetState
This prop is no longer supported, as the Widget persists state by default.
b. toasterProps
The toasterProps prop has been removed because the Widget no longer generates notifications.
c. makeDestinationWallets
The makeDestinationWallets prop has been removed. The Widget now automatically generates destination wallets from connected wallets or manual user entry.
By implementing these changes, you can successfully migrate your application from Widget V1 to Widget V2. For further assistance, refer to the official documentation or reach out to the support team.