Skip to content

Commit

Permalink
Merge pull request #1227 from multiversx/development
Browse files Browse the repository at this point in the history
v2.37.0
  • Loading branch information
CiprianDraghici authored Aug 7, 2024
2 parents 0e432a0 + 6e35085 commit f0ea954
Show file tree
Hide file tree
Showing 10 changed files with 1,234 additions and 1,314 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [[v2.37.0]](https://github.com/multiversx/mx-sdk-dapp/pull/1227)] - 2024-08-07
- [Use IFrameProvider from its own package](https://github.com/multiversx/mx-sdk-dapp/pull/1226)

## [[v2.36.4]](https://github.com/multiversx/mx-sdk-dapp/pull/1224)] - 2024-08-07
- [Added ability to skip updating transaction nonces](https://github.com/multiversx/mx-sdk-dapp/pull/1223)

Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@multiversx/sdk-dapp",
"version": "2.36.4",
"version": "2.37.0",
"description": "A library to hold the main logic for a dapp on the MultiversX blockchain",
"author": "MultiversX",
"license": "GPL-3.0-or-later",
Expand Down Expand Up @@ -160,12 +160,13 @@
"@multiversx/sdk-dapp-utils": "^0.0.1",
"@multiversx/sdk-extension-provider": "3.0.0",
"@multiversx/sdk-hw-provider": "6.4.0",
"@multiversx/sdk-iframe-provider": "0.1.0",
"@multiversx/sdk-metamask-provider": "0.0.5",
"@multiversx/sdk-native-auth-client": "1.0.7",
"@multiversx/sdk-opera-provider": "1.0.0-alpha.1",
"@multiversx/sdk-wallet": "4.2.0",
"@multiversx/sdk-wallet-connect-provider": "4.1.3",
"@multiversx/sdk-web-wallet-cross-window-provider": "0.3.1",
"@multiversx/sdk-web-wallet-cross-window-provider": "0.4.0",
"@multiversx/sdk-web-wallet-provider": "3.2.1",
"@multiversx/sdk-webview-provider": "0.0.11",
"@reduxjs/toolkit": "1.8.2",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IframeProvider } from 'lib/sdkWebWalletCrossWindowProvider';
import { IFrameProvider } from 'lib/sdkWebWalletCrossWindowProvider';

export async function getIFrameProvider({
address,
Expand All @@ -8,7 +8,7 @@ export async function getIFrameProvider({
walletUrl: string;
}) {
try {
const provider = IframeProvider.getInstance();
const provider = IFrameProvider.getInstance();

if (provider.isInitialized()) {
return provider;
Expand Down
4 changes: 2 additions & 2 deletions src/hooks/login/useIFrameLogin.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useState } from 'react';
import { processModifiedAccount } from 'components/ProviderInitializer/helpers/processModifiedAccount';
import { SECOND_LOGIN_ATTEMPT_ERROR } from 'constants/errorsMessages';
import { IframeProvider } from 'lib/sdkWebWalletCrossWindowProvider';
import { IFrameProvider } from 'lib/sdkWebWalletCrossWindowProvider';
import { setAccountProvider } from 'providers/accountProvider';
import { loginAction } from 'reduxStore/commonActions';
import { useDispatch, useSelector } from 'reduxStore/DappProviderContext';
Expand Down Expand Up @@ -47,7 +47,7 @@ export const useIFrameLogin = ({
}

setIsLoading(true);
const provider = IframeProvider.getInstance();
const provider = IFrameProvider.getInstance();
provider.setWalletUrl(walletAddress ?? network.walletAddress);

const isSuccessfullyInitialized: boolean = await provider.init();
Expand Down
6 changes: 3 additions & 3 deletions src/hooks/transactions/useSignTransactions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import { useGetAccountProvider } from 'hooks/account/useGetAccountProvider';
import { useParseSignedTransactions } from 'hooks/transactions/useParseSignedTransactions';
import {
CrossWindowProvider,
IframeProvider
IFrameProvider
} from 'lib/sdkWebWalletCrossWindowProvider';
import { ExperimentalWebviewProvider } from 'providers/experimentalWebViewProvider';
import { getProviderType } from 'providers/utils';
Expand Down Expand Up @@ -99,7 +99,7 @@ export const useSignTransactions = () => {
const clearSignInfo = (sessionId?: string) => {
const isExtensionProvider = provider instanceof ExtensionProvider;
const isCrossWindowProvider = provider instanceof CrossWindowProvider;
const isIFrameProvider = provider instanceof IframeProvider;
const isIFrameProvider = provider instanceof IFrameProvider;
const isMetamaskProvider = provider instanceof MetamaskProvider;
const isExperiementalWebviewProvider =
provider instanceof ExperimentalWebviewProvider;
Expand Down Expand Up @@ -130,7 +130,7 @@ export const useSignTransactions = () => {
CrossWindowProvider.getInstance()?.cancelAction?.();
}
if (isIFrameProvider) {
IframeProvider.getInstance()?.cancelAction?.();
IFrameProvider.getInstance()?.cancelAction?.();
}
if (isExperiementalWebviewProvider) {
ExperimentalWebviewProvider.getInstance()?.cancelAction?.();
Expand Down
6 changes: 3 additions & 3 deletions src/hooks/transactions/useSignTransactionsCommonData.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { useGetAccountProvider } from 'hooks/account/useGetAccountProvider';
import { useParseSignedTransactions } from 'hooks/transactions/useParseSignedTransactions';
import {
CrossWindowProvider,
IframeProvider
IFrameProvider
} from 'lib/sdkWebWalletCrossWindowProvider';

import { ExperimentalWebviewProvider } from 'providers/experimentalWebViewProvider';
Expand Down Expand Up @@ -72,7 +72,7 @@ export const useSignTransactionsCommonData = () => {
function clearSignInfo(sessionId?: string) {
const isExtensionProvider = provider instanceof ExtensionProvider;
const isCrossWindowProvider = provider instanceof CrossWindowProvider;
const isIFrameProvider = provider instanceof IframeProvider;
const isIFrameProvider = provider instanceof IFrameProvider;
const isMetamaskProvider = provider instanceof MetamaskProvider;
const isExperimentalWebviewProvider =
provider instanceof ExperimentalWebviewProvider;
Expand Down Expand Up @@ -104,7 +104,7 @@ export const useSignTransactionsCommonData = () => {
}

if (isIFrameProvider) {
IframeProvider.getInstance()?.cancelAction?.();
IFrameProvider.getInstance()?.cancelAction?.();
}

if (isExperimentalWebviewProvider) {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/sdkWebWalletCrossWindowProvider.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export { CrossWindowProvider } from '@multiversx/sdk-web-wallet-cross-window-provider/out/CrossWindowProvider/CrossWindowProvider';
export { IframeProvider } from '@multiversx/sdk-web-wallet-cross-window-provider/out/IFrameProvider/IframeProvider';
export { IFrameProvider } from '@multiversx/sdk-iframe-provider/out/IFrameProvider/IFrameProvider';
4 changes: 2 additions & 2 deletions src/providers/accountProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { OperaProvider } from '@multiversx/sdk-opera-provider';
import { WalletProvider } from '@multiversx/sdk-web-wallet-provider';
import {
CrossWindowProvider,
IframeProvider
IFrameProvider
} from 'lib/sdkWebWalletCrossWindowProvider';
import { IDappProvider } from 'types';
import { WalletConnectV2Provider } from 'utils/walletconnect/__sdkWalletconnectProvider';
Expand All @@ -17,7 +17,7 @@ export type ProvidersType =
| MetamaskProvider
| WalletProvider
| CrossWindowProvider
| IframeProvider
| IFrameProvider
| HWProvider
| OperaProvider
| WalletConnectV2Provider;
Expand Down
4 changes: 2 additions & 2 deletions src/providers/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { WalletProvider } from '@multiversx/sdk-web-wallet-provider';
import { LEDGER_CONTRACT_DATA_ENABLED_VALUE } from 'constants/index';
import {
CrossWindowProvider,
IframeProvider
IFrameProvider
} from 'lib/sdkWebWalletCrossWindowProvider';
import { IDappProvider } from 'types';
import { LoginMethodsEnum } from 'types/enums.types';
Expand Down Expand Up @@ -37,7 +37,7 @@ export const getProviderType = <TProvider extends object>(
return LoginMethodsEnum.opera;
case CrossWindowProvider:
return LoginMethodsEnum.crossWindow;
case IframeProvider:
case IFrameProvider:
return LoginMethodsEnum.iframe;
case EmptyProvider:
return LoginMethodsEnum.none;
Expand Down
Loading

0 comments on commit f0ea954

Please sign in to comment.