diff --git a/src/core/managers/PendingTransactionsStateManager/PendingTransactionsStateManagement.ts b/src/core/managers/PendingTransactionsStateManager/PendingTransactionsStateManagement.ts index 3658d47..3d24845 100644 --- a/src/core/managers/PendingTransactionsStateManager/PendingTransactionsStateManagement.ts +++ b/src/core/managers/PendingTransactionsStateManager/PendingTransactionsStateManagement.ts @@ -1,4 +1,3 @@ -import { ProviderTypeEnum } from 'core/providers/types/providerFactory.types'; import { IPendingTransactionsModalData, PendingTransactionsEventsEnum @@ -17,8 +16,7 @@ export class PendingTransactionsStateManager { isPending: false, title: '', subtitle: '', - shouldClose: false, - type: ProviderTypeEnum.none + shouldClose: false }; private data: IPendingTransactionsModalData = { ...this.initialData }; diff --git a/src/core/managers/PendingTransactionsStateManager/types/pendingTransactions.types.ts b/src/core/managers/PendingTransactionsStateManager/types/pendingTransactions.types.ts index 607172f..8133161 100644 --- a/src/core/managers/PendingTransactionsStateManager/types/pendingTransactions.types.ts +++ b/src/core/managers/PendingTransactionsStateManager/types/pendingTransactions.types.ts @@ -1,5 +1,3 @@ -import { ProviderTypeEnum } from 'core/providers/types/providerFactory.types'; - // types here need to be synced with the types in sdk-dapp-core-ui export enum PendingTransactionsEventsEnum { 'CLOSE' = 'CLOSE', @@ -8,7 +6,6 @@ export enum PendingTransactionsEventsEnum { export interface IPendingTransactionsModalData { isPending: boolean; - type: ProviderTypeEnum; title: string; subtitle?: string; shouldClose?: boolean; diff --git a/src/core/providers/strategies/CrossWindowProviderStrategy/CrossWindowProviderStrategy.ts b/src/core/providers/strategies/CrossWindowProviderStrategy/CrossWindowProviderStrategy.ts index 51ebab0..be24fdc 100644 --- a/src/core/providers/strategies/CrossWindowProviderStrategy/CrossWindowProviderStrategy.ts +++ b/src/core/providers/strategies/CrossWindowProviderStrategy/CrossWindowProviderStrategy.ts @@ -6,10 +6,7 @@ import { } from 'core/managers'; import { getAccount } from 'core/methods/account/getAccount'; import { getAddress } from 'core/methods/account/getAddress'; -import { - IProvider, - ProviderTypeEnum -} from 'core/providers/types/providerFactory.types'; +import { IProvider } from 'core/providers/types/providerFactory.types'; import { PendingTransactionsModal } from 'lib/sdkDappCoreUi'; import { CrossWindowProvider } from 'lib/sdkWebWalletCrossWindowProvider'; import { crossWindowConfigSelector } from 'store/selectors'; @@ -116,8 +113,7 @@ export class CrossWindowProviderStrategy { manager.updateData({ isPending: true, title: 'Confirm on MultiversX Web Wallet', - subtitle: 'Check your MultiversX Web Wallet to sign the transaction', - type: ProviderTypeEnum.extension + subtitle: 'Check your MultiversX Web Wallet to sign the transaction' }); this.setPopupConsent(); @@ -170,8 +166,7 @@ export class CrossWindowProviderStrategy { manager.updateData({ isPending: true, title: 'Message Signing', - subtitle: 'Check your MultiversX Web Wallet to sign the message', - type: ProviderTypeEnum.crossWindow + subtitle: 'Check your MultiversX Web Wallet to sign the message' }); this.setPopupConsent(); diff --git a/src/core/providers/strategies/ExtensionProviderStrategy/ExtensionProviderStrategy.ts b/src/core/providers/strategies/ExtensionProviderStrategy/ExtensionProviderStrategy.ts index 23950af..ae2a5a0 100644 --- a/src/core/providers/strategies/ExtensionProviderStrategy/ExtensionProviderStrategy.ts +++ b/src/core/providers/strategies/ExtensionProviderStrategy/ExtensionProviderStrategy.ts @@ -6,10 +6,7 @@ import { } from 'core/managers'; import { getAccount } from 'core/methods/account/getAccount'; import { getAddress } from 'core/methods/account/getAddress'; -import { - IProvider, - ProviderTypeEnum -} from 'core/providers/types/providerFactory.types'; +import { IProvider } from 'core/providers/types/providerFactory.types'; import { PendingTransactionsModal } from 'lib/sdkDappCoreUi'; import { ProviderErrorsEnum } from 'types'; @@ -35,7 +32,6 @@ export class ExtensionProviderStrategy { await this.provider.init(); } - // Bind in order to break reference this._signTransactions = this.provider.signTransactions.bind(this.provider); this._signMessage = this.provider.signMessage.bind(this.provider); @@ -100,9 +96,7 @@ export class ExtensionProviderStrategy { manager.updateData({ isPending: true, title: 'Confirm on MultiversX DeFi Wallet', - subtitle: - 'Check your MultiversX Wallet Extension to sign the transaction', - type: ProviderTypeEnum.extension + subtitle: 'Check your MultiversX Wallet Extension to sign the transaction' }); try { const signedTransactions: Transaction[] = @@ -151,8 +145,7 @@ export class ExtensionProviderStrategy { manager.updateData({ isPending: true, title: 'Message Signing', - subtitle: 'Check your MultiversX Wallet Extension to sign the message', - type: ProviderTypeEnum.extension + subtitle: 'Check your MultiversX Wallet Extension to sign the message' }); try { diff --git a/src/core/providers/strategies/IFrameProviderStrategy/IFrameProviderStrategy.ts b/src/core/providers/strategies/IFrameProviderStrategy/IFrameProviderStrategy.ts index d4eadf6..b812462 100644 --- a/src/core/providers/strategies/IFrameProviderStrategy/IFrameProviderStrategy.ts +++ b/src/core/providers/strategies/IFrameProviderStrategy/IFrameProviderStrategy.ts @@ -7,10 +7,7 @@ import { } from 'core/managers'; import { getAccount } from 'core/methods/account/getAccount'; import { getAddress } from 'core/methods/account/getAddress'; -import { - IProvider, - ProviderTypeEnum -} from 'core/providers/types/providerFactory.types'; +import { IProvider } from 'core/providers/types/providerFactory.types'; import { PendingTransactionsModal } from 'lib/sdkDappCoreUi'; import { networkSelector } from 'store/selectors/networkSelectors'; import { getState } from 'store/store'; @@ -111,8 +108,7 @@ export class IFrameProviderStrategy { manager.updateData({ isPending: true, title: `Confirm on MultiversX ${this.type}`, - subtitle: `Check your MultiversX ${this.type} to sign the transaction`, - type: this.type as unknown as ProviderTypeEnum + subtitle: `Check your MultiversX ${this.type} to sign the transaction` }); try { const signedTransactions: Transaction[] = @@ -161,8 +157,7 @@ export class IFrameProviderStrategy { manager.updateData({ isPending: true, title: 'Message Signing', - subtitle: `Check your MultiversX ${this.type} to sign the message`, - type: this.type as unknown as ProviderTypeEnum + subtitle: `Check your MultiversX ${this.type} to sign the message` }); try { diff --git a/src/core/providers/strategies/WalletConnectProviderStrategy/WalletConnectProviderStrategy.ts b/src/core/providers/strategies/WalletConnectProviderStrategy/WalletConnectProviderStrategy.ts index 6983620..dbb1588 100644 --- a/src/core/providers/strategies/WalletConnectProviderStrategy/WalletConnectProviderStrategy.ts +++ b/src/core/providers/strategies/WalletConnectProviderStrategy/WalletConnectProviderStrategy.ts @@ -15,8 +15,7 @@ import { getIsLoggedIn } from 'core/methods/account/getIsLoggedIn'; import { getAccountProvider } from 'core/providers/helpers/accountProvider'; import { IEventBus, - IProvider, - ProviderTypeEnum + IProvider } from 'core/providers/types/providerFactory.types'; import { defineCustomElements, @@ -333,8 +332,7 @@ export class WalletConnectProviderStrategy { manager.updateData({ isPending: true, title: 'Confirm on the xPortal App', - subtitle: 'Check your phone to sign the transaction', - type: ProviderTypeEnum.walletConnect + subtitle: 'Check your phone to sign the transaction' }); try { const signedTransactions: Transaction[] = @@ -389,8 +387,7 @@ export class WalletConnectProviderStrategy { manager.updateData({ isPending: true, title: 'Message Signing', - subtitle: 'Check your MultiversX xPortal App to sign the message', - type: ProviderTypeEnum.walletConnect + subtitle: 'Check your MultiversX xPortal App to sign the message' }); try {