Skip to content

Commit

Permalink
Merge pull request #1273 from multiversx/development
Browse files Browse the repository at this point in the history
2.40.9
  • Loading branch information
razvantomegea authored Sep 25, 2024
2 parents 4b0612a + f70cb68 commit 61d733a
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ on:
types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled]

jobs:
# Enforces the update of a changelog file on every pull request
# Enforces the update of a changelog file on every pull request
changelog:
runs-on: ubuntu-latest
steps:
- uses: dangoslen/changelog-enforcer@v3
- uses: dangoslen/changelog-enforcer@v3
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [[v2.40.9]](https://github.com/multiversx/mx-sdk-dapp/pull/1273)] - 2024-09-25
- [Fixed multisig login](https://github.com/multiversx/mx-sdk-dapp/pull/1272)

## [[v2.40.8]](https://github.com/multiversx/mx-sdk-dapp/pull/1270)] - 2024-09-24
- [Update passkey provider to use "auto" strategy when creating a new passkey](https://github.com/multiversx/mx-sdk-dapp/pull/1270)

- [Added cross-window 2FA wallet guardian signing](https://github.com/multiversx/mx-sdk-dapp/pull/1271)

## [[v2.40.7]](https://github.com/multiversx/mx-sdk-dapp/pull/1267)] - 2024-09-23
- [Remove hardcoded "erd" check when validating an address](https://github.com/multiversx/mx-sdk-dapp/pull/1267)


## [[v2.40.6]](https://github.com/multiversx/mx-sdk-dapp/pull/1266)] - 2024-09-20
- [Update passkey provider in order to fix passkey login](https://github.com/multiversx/mx-sdk-dapp/pull/1266)

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@multiversx/sdk-dapp",
"version": "2.40.8",
"version": "2.40.9",
"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
12 changes: 10 additions & 2 deletions src/components/ProviderInitializer/ProviderInitializer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ import {
} from 'utils/account';
import { parseNavigationParams } from 'utils/parseNavigationParams';

import { isContract } from 'utils/smartContracts';
import {
getOperaProvider,
getCrossWindowProvider,
Expand Down Expand Up @@ -150,10 +151,17 @@ export function ProviderInitializer() {

async function checkAddress() {
const {
remainingParams: { impersonate }
remainingParams: { impersonate, multisig }
} = parseNavigationParams(['impersonate']);

if (!tokenLogin?.nativeAuthToken || impersonate) {
const addressIsContract = isContract(address);

if (
!tokenLogin?.nativeAuthToken ||
impersonate ||
multisig ||
addressIsContract
) {
return;
}

Expand Down
3 changes: 2 additions & 1 deletion src/hooks/account/useGetLoginInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ export const useGetLoginInfo = () => {
// if AxiosInterceptor is mounted, prioritize information comming from AxiosContext
try {
const { loginInfo, isLoggedIn } = useAxiosInterceptorContext();

return { ...loginInfo, isLoggedIn };
// if not mounted, proceed to returning informaiton from store
// if not mounted, proceed to returning information from store
} catch {
const loginInfo = useSelector(loginInfoSelector);
const isLoggedIn = useSelector(isLoggedInSelector);
Expand Down
4 changes: 3 additions & 1 deletion src/hooks/login/useCrossWindowLogin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { setAccountProvider } from 'providers/accountProvider';
import { loginAction } from 'reduxStore/commonActions';
import { useDispatch, useSelector } from 'reduxStore/DappProviderContext';
import { networkSelector } from 'reduxStore/selectors/networkConfigSelectors';
import { setAccount } from 'reduxStore/slices';
import { setAccount, setAddress } from 'reduxStore/slices';
import {
InitiateLoginFunctionType,
LoginHookGenericStateType,
Expand Down Expand Up @@ -132,6 +132,8 @@ export const useCrossWindowLogin = ({
})
);

dispatch(setAddress(account.address));

dispatch(
setAccount({
...account,
Expand Down
2 changes: 2 additions & 0 deletions src/reduxStore/slices/accountInfoSlice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,11 @@ export const accountInfoSlice = createSlice({
) => {
// account fetching always comes after address is populated
const isSameAddress = state.address === action.payload.address;

state.accounts = {
[state.address]: isSameAddress ? action.payload : emptyAccount
};

state.shard = action.payload.shard;
state.isAccountLoading = false;
state.accountLoadingError = null;
Expand Down

0 comments on commit 61d733a

Please sign in to comment.