Skip to content

Commit

Permalink
Minor improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
AurevoirXavier committed Oct 9, 2024
1 parent 052ff18 commit 0190b4a
Show file tree
Hide file tree
Showing 5 changed files with 609 additions and 430 deletions.
26 changes: 13 additions & 13 deletions packages/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,20 @@
"start": "next start"
},
"dependencies": {
"@polkadot/api": "^13.2.1",
"@rainbow-me/rainbowkit": "^2.1.7",
"@tanstack/react-query": "^5.51.11",
"ethers": "^6.13.2",
"next": "^14.2.9",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"viem": "2.21.15",
"wagmi": "^2.12.9"
"@polkadot/api": "^14.0",
"@rainbow-me/rainbowkit": "^2.1",
"@tanstack/react-query": "^5.59",
"ethers": "^6.13",
"next": "^14.2",
"react": "^18.3",
"react-dom": "^18.3",
"viem": "2.21",
"wagmi": "^2.12"
},
"devDependencies": {
"@types/node": "^22.7.3",
"@types/react": "^18.3.5",
"eslint": "^9.11.1",
"typescript": "5.6.2"
"@types/node": "^22.7",
"@types/react": "^18.3",
"eslint": "^9.12",
"typescript": "5.6"
}
}
10 changes: 10 additions & 0 deletions packages/web/public/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 7 additions & 2 deletions packages/web/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ const Home: NextPage = () => {
const [migrating, setMigrating] = useState<boolean>(false);
const [migrationMsg, setMigrationMsg] = useState<string>('');
const [migrationErr, setMigrationErr] = useState<string | null>(null);
const token: { [key: number]: string } = {
46: 'RING',
44: 'CRAB',
701: 'KRING',
};

useEffect(() => {
const fetch = async () => {
Expand Down Expand Up @@ -139,7 +144,7 @@ const Home: NextPage = () => {
content="Darwinia Migration Helper"
name="Darwinia Migration Helper"
/>
<link href="/favicon.ico" rel="icon" />
<link rel="icon" href="/favicon.svg" type="image/svg+xml" />
</Head>

<main className={styles.main}>
Expand All @@ -159,7 +164,7 @@ const Home: NextPage = () => {
<>
{ring !== 0n || deposits.some(deposit => deposit.inUse) ? (
<>
There are "{formatValue(ring)}" RING(s) and "{deposits.filter(deposit => deposit.inUse).length}" deposit(s) in staking; you need to unstake them first.
There are "{formatValue(ring)}" {chain?.id ? token[chain.id] : 'token'}(s) and "{deposits.filter(deposit => deposit.inUse).length}" deposit(s) in staking; you need to unstake them first.

<button
className={styles.actButton}
Expand Down
3 changes: 2 additions & 1 deletion packages/web/src/wagmi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ const koi: Chain = {
export const config = getDefaultConfig({
appName: 'Darwinia Migration Helper',
projectId: '2f094d8039dafb4f3fd537931f739604',
chains: [darwinia, crab, koi],
chains: [crab, koi],
// chains: [darwinia, crab, koi],
ssr: true,
});
Loading

0 comments on commit 0190b4a

Please sign in to comment.