```\n  function upgradeWalletType() external {\n    if (!isWallet(msg.sender)) \n    revert WalletDoesntExist(msg.sender); uint8 fromWalletType = _walletDataMap[msg.sender].walletType;\n      _setWalletType(msg.sender, _upgradablePaths[fromWalletType]);\n      emit WalletUpgraded(msg.sender, fromWalletType,\n  _upgradablePaths[fromWalletType]);\n  }\n```\n