Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 2023-11-21 #3109

Merged
merged 6 commits into from
Nov 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,7 @@ const WalletMigration = ({ open, onClose }) => {
setIsLoggingOut(true);
const failedAccounts = [];
for (const accountId of availableAccounts) {
const publicKey = await wallet.getPublicKey(accountId);
try {
const account = await wallet.getAccount(accountId);
await account.deleteKey(publicKey);
await wallet.removeWalletAccount(accountId);
} catch {
failedAccounts.push(accountIdToHash(accountId));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ const Disable2FAModal = ({ handleSetActiveView, onClose, accountWithDetails, set

useEffect(() => {
if (completedWithSuccess) {
handleSetActiveView(WALLET_MIGRATION_VIEWS.ROTATE_KEYS);
handleSetActiveView(WALLET_MIGRATION_VIEWS.MIGRATE_ACCOUNTS);
}
}, [completedWithSuccess]);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React, { useEffect, useState } from 'react';

import { wallet } from '../../../../utils/wallet';
import { WalletSelectorContent } from './WalletSelectorContent';
import { ExportAccountSelectorContextProvider } from './WalletSelectorExportContext';

Expand All @@ -9,11 +10,7 @@ export const WalletSelectorModal = ({ onComplete, migrationAccounts, network, ro
const init = async () => {
const accountsWithKey = await Promise.all(migrationAccounts.map(async (account) => {
const accountId = account.accountId;
const privateKey = rotatedKeys[accountId];
if (!privateKey) {
throw new Error('Unable to find a private key from the rotated keys');
}

const privateKey = await wallet.getLocalSecretKey(accountId);
return {
accountId,
privateKey,
Expand Down
63 changes: 0 additions & 63 deletions packages/frontend/src/components/wallet/GetYourTickets.js

This file was deleted.

29 changes: 0 additions & 29 deletions packages/frontend/src/components/wallet/SidebarNearcon.js

This file was deleted.

11 changes: 8 additions & 3 deletions packages/frontend/src/components/wallet/Wallet.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@ import AllTokensTotalBalanceUSD from './AllTokensTotalBalanceUSD';
import CreateCustomNameModal from './CreateCustomNameModal';
import CreateFromImplicitSuccessModal from './CreateFromImplicitSuccessModal';
import DepositNearBanner from './DepositNearBanner';
import ExploreApps from './ExploreApps';
import LinkDropSuccessModal from './LinkDropSuccessModal';
import NFTs from './NFTs';
import SidebarNearcon from './SidebarNearcon';
import Sidebar from './Sidebar';
import SidebarLight from './SidebarLight';
import Tokens from './Tokens';
import { ZeroBalanceAccountImportedModal } from './ZeroBalanceAccountImportedModal';

Expand Down Expand Up @@ -365,8 +367,11 @@ export function Wallet({
)}
</div>
<div className="right">
{
<SidebarNearcon/ >
{isWhitelabel
? <SidebarLight availableAccounts={accountExists && availableAccounts} />
: accountExists
? <Sidebar availableAccounts={availableAccounts} />
: <ExploreApps />
}
<ActivitiesWrapper />
</div>
Expand Down
Binary file removed packages/frontend/src/images/nearcon-wallet.png
Binary file not shown.