From e7dc09b8cf3c4b7e2c35273e2490b69b5a6bac4c Mon Sep 17 00:00:00 2001 From: Dylan Jeffers Date: Tue, 28 May 2024 15:22:24 -0700 Subject: [PATCH] Replace structuredClone with cloneDeep for native compat (#8633) --- .../libs/src/services/discoveryProvider/DiscoveryProvider.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/libs/src/services/discoveryProvider/DiscoveryProvider.ts b/packages/libs/src/services/discoveryProvider/DiscoveryProvider.ts index 0608ba8427c..867e55a76fd 100644 --- a/packages/libs/src/services/discoveryProvider/DiscoveryProvider.ts +++ b/packages/libs/src/services/discoveryProvider/DiscoveryProvider.ts @@ -6,6 +6,7 @@ import axios, { ResponseType } from 'axios' import fetch from 'cross-fetch' +import { cloneDeep } from 'lodash' // @ts-ignore import urlJoin, { PathArg } from 'proper-url-join/es/index.js' import type { TransactionReceipt } from 'web3-core' @@ -272,7 +273,7 @@ export class DiscoveryProvider { const currentUser = await web3AccountPromise if (currentUser) { if (this.enableUserWalletOverride) { - this.userStateManager.setWeb3User(structuredClone(currentUser)) + this.userStateManager.setWeb3User(cloneDeep(currentUser)) } await this.userStateManager.setCurrentUser(currentUser) }