Skip to content

Commit

Permalink
Merge pull request #907 from novasamatech/rc/1.0.0-106
Browse files Browse the repository at this point in the history
Release candidate - 1.0.0
  • Loading branch information
stepanLav authored Jun 28, 2023
2 parents 3b39f41 + b2763cc commit e3f594a
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "nova-spektr",
"description": "Polkadot Enterprise application",
"version": "0.9.0",
"version": "1.0.0",
"main": "./release/build/main.js",
"license": "MIT",
"author": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ type Props = {

export const CreateMultisigAccount = ({ isOpen, onClose }: Props) => {
const { t } = useI18n();
const navigate = useNavigate();
const { matrix, isLoggedIn } = useMatrix();
const navigate = useNavigate();
const { getLiveAccounts, addAccount, setActiveAccount } = useAccount();
const accounts = getLiveAccounts();

Expand Down
6 changes: 4 additions & 2 deletions src/renderer/context/NetworkContext/NetworkContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,9 @@ export const NetworkProvider = ({ children }: PropsWithChildren) => {
return;
}

if (previousAccounts?.length !== activeAccounts.length) {
const firstPrevAcc = previousAccounts?.length && previousAccounts[0];
const firstNewAcc = activeAccounts.length && activeAccounts[0];
if (previousAccounts?.length !== activeAccounts.length || firstPrevAcc !== firstNewAcc) {
connectedConnections.forEach((chain) => {
const accountIds = getAccountIds(chain.chainId);
subscribeBalanceChanges(chain, accountIds);
Expand All @@ -139,7 +141,7 @@ export const NetworkProvider = ({ children }: PropsWithChildren) => {
unsubscribe(chain.chainId);
});
})();
}, [connectedConnections.length, activeAccounts.length]);
}, [connectedConnections.length, activeAccounts.length, activeAccounts.length && activeAccounts[0]]);

return (
<NetworkContext.Provider value={{ connections, connectToNetwork, connectWithAutoBalance, ...rest }}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ export const ChangeValidators = () => {
};

const getNominateTxs = (validators: Address[]): Transaction[] => {
return accounts.map(({ accountId }) => {
return txAccounts.map(({ accountId }) => {
return {
chainId,
address: toAddress(accountId, { prefix: addressPrefix }),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,12 @@ export const NetworkInfo = ({
// without key dropdown doesn't show changes (thought functionally everything works fine)
// TODO look into it
const element = (
<ChainComponent key={chain.chainId} className="overflow-hidden" fontClass="truncate" chain={chain} />
<ChainComponent
key={chain.chainId}
className="overflow-hidden"
fontClass="text-text-primary truncate"
chain={chain}
/>
);

acc.push({ id: chainId, value: chain, element });
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/services/staking/eraService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export const useEra = (): IEraService => {
const sessionStartSlot = currentSessionIndex * sessionLength + genesisSlot;
const sessionProgress = currentSlot - sessionStartSlot;
const eraProgress = (currentSessionIndex - eraStartSessionIndex) * sessionLength + sessionProgress;
const eraRemained = eraLength * sessionLength - eraProgress;
const eraRemained = eraLength * sessionLength - eraProgress / 1000;
const leftEras = destinationEra - activeEra.toNumber() - 1;
const timeForLeftEras = leftEras * eraLength * sessionLength * blockCreationTime;

Expand Down

0 comments on commit e3f594a

Please sign in to comment.