Skip to content

Commit

Permalink
[FIX] Added current account to header (#208)
Browse files Browse the repository at this point in the history
* Added current account to header

* Fixed linting
  • Loading branch information
angarita-dev authored Sep 7, 2021
1 parent cb9c7d7 commit b288c21
Show file tree
Hide file tree
Showing 2 changed files with 161 additions and 194 deletions.
15 changes: 14 additions & 1 deletion source/Pages/Notification/components/BurnXTC/index.jsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
import React from 'react';
import React, { useEffect } from 'react';
import { useTranslation, initReactI18next } from 'react-i18next';
import {
Button, Tabs,
} from '@ui';
import i18n from 'i18next';
import { useTabs } from '@hooks';
import { HANDLER_TYPES, sendMessage } from '@background/Keyring';
import { setAccountInfo } from '@redux/wallet';
import { useDispatch } from 'react-redux';
import PropTypes from 'prop-types';
import { Layout } from '@components';
import initConfig from '../../../../locales';
Expand All @@ -22,6 +25,7 @@ const BurnXTC = ({
}) => {
const { t } = useTranslation();
const classes = useStyles();
const dispatch = useDispatch();
const { url, icons } = metadata;
const { selectedTab, handleChangeTab } = useTabs();

Expand All @@ -37,6 +41,15 @@ const BurnXTC = ({
loading,
} = useRequests([args], callId, portId);

useEffect(() => {
sendMessage({ type: HANDLER_TYPES.GET_STATE, params: {} },
(state) => {
if (state?.wallets?.length) {
dispatch(setAccountInfo(state.wallets[state.currentWalletId]));
}
});
}, []);

const requestCount = requests.length;
const tabs = [
{
Expand Down
Loading

0 comments on commit b288c21

Please sign in to comment.