-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: added account migration and staking Dapps,Updated portal order (#…
…364) * fix: added account migration and staking Dapps,Updated portal order * Update node version * Use nodejs 16 * fix: reverted EVM Address and EVM withdraw tabs --------- Co-authored-by: fewensa <[email protected]>
- Loading branch information
1 parent
79449aa
commit b2ec3e4
Showing
15 changed files
with
219 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
import Identicon from '@polkadot/react-identicon'; | ||
import { Button, Card, List } from 'antd'; | ||
import AntdLink from 'antd/lib/typography/Link'; | ||
import FileSaver from 'file-saver'; | ||
import { Trans, useTranslation } from 'react-i18next'; | ||
import { EllipsisMiddle } from '../widget/EllipsisMiddle'; | ||
import { useWallet } from '../../hooks'; | ||
import { LOCAL_SOURCE } from '../../config'; | ||
|
||
const SubkeyMigration = () => { | ||
const { t } = useTranslation(); | ||
const { accounts } = useWallet(); | ||
const localAccounts = accounts.filter((item) => item.meta.source === LOCAL_SOURCE); | ||
|
||
return ( | ||
<div> | ||
<Card className="mx-0 shadow-xxl"> | ||
<Trans className="m-8"> | ||
{`Here are the accounts you generated on the Darwinia Apps of the old version. You can restore them in the Polkadot{.js} by importing the JSON files. `} | ||
<AntdLink | ||
href="https://darwinianetwork.medium.com/using-darwinia-tools-3-8-darwinia-apps-lite-guide-part-%E2%85%B0-account-ae9b3347b3c7" | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
> | ||
Tutorial refers here. | ||
</AntdLink> | ||
</Trans> | ||
</Card> | ||
|
||
<Card | ||
style={{ marginTop: '20px' }} | ||
title={<span className="font-bold">{t('Local Accounts')}</span>} | ||
className="shadow-xxl" | ||
> | ||
<List | ||
dataSource={localAccounts} | ||
renderItem={(item) => ( | ||
<List.Item key={item.address}> | ||
<List.Item.Meta | ||
avatar={<Identicon value={item.displayAddress} size={40} className="border rounded-full p-1" />} | ||
title={<span className="font-bold text-lg">{item.meta.name}</span>} | ||
description={<EllipsisMiddle value={item.displayAddress} />} | ||
className="flex item-center" | ||
/> | ||
|
||
<Button | ||
onClick={() => { | ||
const blob = new Blob([JSON.stringify(item.json)], { type: 'application/json; charset=utf-8' }); | ||
|
||
FileSaver.saveAs(blob, `${item.address}.json`); | ||
}} | ||
> | ||
{t('Export JSON')} | ||
</Button> | ||
</List.Item> | ||
)} | ||
/> | ||
</Card> | ||
</div> | ||
); | ||
}; | ||
|
||
export default SubkeyMigration; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,3 @@ | ||
import { crabConfig } from './crab'; | ||
import { darwiniaConfig } from './darwinia'; | ||
import { pangolinConfig } from './pangolin'; | ||
import { pangoroConfig } from './pangoro'; | ||
import { crabParachainConfig } from './crab-parachain'; | ||
import { pangolinParachainConfig } from './pangolin-parachain'; | ||
|
||
export const SYSTEM_NETWORK_CONFIGURATIONS = [ | ||
crabConfig, | ||
darwiniaConfig, | ||
pangolinConfig, | ||
pangoroConfig, | ||
crabParachainConfig, | ||
pangolinParachainConfig, | ||
]; | ||
export const SYSTEM_NETWORK_CONFIGURATIONS = [darwiniaConfig]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.