Migration Guide
This guide will cover how to migrate your existing codebase to use Wallet Kit instead of the now deprecated Wallet Provider.
Prerequisites
- The latest version of the Station Chrome extension (Station Wallet 7.4.2 and above)
- NPM
- NVM
- Node.js version 16
💡Node version 16
Most users will need to specify Node version 16 before continuing. You can manage node versions with NVM.
1. Set up dependencies
- To get started, uninstall the deprecated Station wallet packages.
- Install the
@terra-money/wallet-kit
package.
2. Change the WalletProvider
setup
Navigate to index.js
in a code editor and change the following in the WalletProvider
component.
Instead of calling getChainOptions
, use getInitalConfig
and pass in the defaultNetworks
as a prop. It is recommended to also add Station Mobile, as shown in the code sample below.
3. Comply with the Wallet Kit API
- Fix the package imports. Import the Station Wallet utility from
@terra-money/wallet-kit
instead of prior packages.
- Fix minor code changes. The
WalletStatus
enum now has theCONNECTED
property instead ofWALLET_CONNECTED
.availableConnections
andavailableInstallations
have been consolidated intoavailableWallets
.
📖API
You can refer to the WalletKit README for more information on the WalletKit API.
📱Station mobile app
To add support for Station mobile, follow the mobile section in the Get Started guide.
Congratulations, your migration to Wallet Kit is now complete!