Migration Guide from v8.1 to v8.2 for Web3Auth PnP iOS SDK
Overview
This migration guide provides steps for upgrading from version 8.1(v8.1) to version 8.2(v8.2) of the Web3Auth PnP iOS SDK. The guide outlines significant breaking change with the removal of loginParams from launchWalletServices.
Changes in Detail
launchWalletServices method updates
From v8.2, loginParams is removed from the launchWalletServices method. Developers now only need to pass the chainConfig as the required argument.
Before (v8.1)
Usage
do {
var chainConfig = ChainConfig(
chainNamespace: ChainNamespace.eip155,
chainId: "0x1",
rpcTarget: "https://mainnet.infura.io/v3/${key}",
ticker: "ETH"
)
try await web3Auth?.launchWalletServices(
W3ALoginParams(loginProvider: .GOOGLE),
chainConfig: chainConfig
)
} catch {
// Handle error
}
After (v8.2)
Usage
do {
var chainConfig = ChainConfig(
chainNamespace: ChainNamespace.eip155,
chainId: "0x1",
rpcTarget: "https://mainnet.infura.io/v3/${key}",
ticker: "ETH"
)
try await web3Auth?.launchWalletServices(
chainConfig: chainConfig
)
} catch {
// Handle error
}