-
Notifications
You must be signed in to change notification settings - Fork 82
Closed
Description
I have a method that supposedly allow me to create Smart Wallet for an existing personal account. chain id is a custom chain.
public async UniTask CreateAccountAbstraction()
{
Debug.Log("Create AA");
IThirdwebWallet currentWallet = ThirdwebManager.Instance.GetActiveWallet();
var smartWallet = await ThirdwebManager.Instance.UpgradeToSmartWallet(personalWallet: currentWallet, chainId: ActiveChainId, smartWalletOptions: new SmartWalletOptions(sponsorGas: false));
Debug.Log("Smart Wallet Address: " + await smartWallet.GetAddress());
}
However, when I am calling this, it results to this error.
JsonSerializationException: Cannot deserialize the current JSON object (e.g. {"name":"value"}) into type 'System.Collections.Generic.List`1[Thirdweb.RpcResponse`1[System.Object]]' because the type requires a JSON array (e.g. [1,2,3]) to deserialize correctly.
To fix this error either change the JSON to a JSON array (e.g. [1,2,3]) or change the deserialized type so that it is a normal .NET type (e.g. not a primitive type like integer, not a collection type like an array or List<T>) that can be deserialized from a JSON object. JsonObjectAttribute can also be added to the type to force it to deserialize from a JSON object.
Path 'jsonrpc', line 1, position 11.
Just wanna understand what could be causing the issue here?