diff --git a/packages/dapp/src/App.tsx b/packages/dapp/src/App.tsx
index e530706..2985f45 100644
--- a/packages/dapp/src/App.tsx
+++ b/packages/dapp/src/App.tsx
@@ -94,6 +94,7 @@ export default function App() {
useEffect(() => {
/** To format account address based on the dApp chain */
const chain = getChain(chainName);
+
const maybeChainLatestGenesisHash = chain?.genesisHash?.[0];
if (maybeChainLatestGenesisHash && account?.address) {
const formatted = getFormatted(String(maybeChainLatestGenesisHash), account.address)
@@ -192,7 +193,7 @@ export default function App() {
aria-label="Vertical tabs example"
sx={{ borderRight: 1, borderColor: 'divider' }}
>
-
+
diff --git a/packages/dapp/src/TransferFund.tsx b/packages/dapp/src/TransferFund.tsx
index ee83643..0083ff5 100644
--- a/packages/dapp/src/TransferFund.tsx
+++ b/packages/dapp/src/TransferFund.tsx
@@ -91,7 +91,7 @@ function TransferFund({ api, account, balances, currentChainName, formatted, isP
&& <>
- A Simple Fund Transfer
+ Transfer Fund and View the Result
@@ -105,19 +105,31 @@ function TransferFund({ api, account, balances, currentChainName, formatted, isP
: }
-
-
- Transferable Balance:
-
-
- {balances
- ? balances.availableBalance.toHuman()
- : }
-
+
+
+
+ Transferable Balance:
+
+
+ {balances
+ ? balances.availableBalance.toHuman()
+ : }
+
+
+
+
+ Chain:
+
+
+ {currentChainName
+ ? currentChainName
+ : }
+
+
{balances?.availableBalance?.isZero() && currentChainName as string === 'westend' && (
-
+
{` You can top up your address by sending `}
{`!drip ${formatted}`}
{` to the `}
@@ -168,7 +180,7 @@ function TransferFund({ api, account, balances, currentChainName, formatted, isP
}
+ startIcon={}
variant="contained"
onClick={handleSendClick}
disabled={
@@ -182,7 +194,7 @@ function TransferFund({ api, account, balances, currentChainName, formatted, isP
>
{waitingForUserApproval
? 'Approve transaction in Metamask'
- : 'Transfer Fund'}
+ : 'Transfer'}
@@ -248,7 +260,7 @@ function TransferFund({ api, account, balances, currentChainName, formatted, isP
)}
-
+
);
}
diff --git a/packages/dapp/src/util/getChain.ts b/packages/dapp/src/util/getChain.ts
index 92d4612..04c1727 100644
--- a/packages/dapp/src/util/getChain.ts
+++ b/packages/dapp/src/util/getChain.ts
@@ -29,7 +29,7 @@ export const getChain = (genesisOrChainName: string): Network => {
);
if (chain) {
- console.info(`The chain for ${genesisOrChainName} is: `,chain )
+ // console.info(`The chain for ${genesisOrChainName} is: `,chain )
return chain;
}
throw new Error(`Chain '${genesisOrChainName}' is not recognized.`);
diff --git a/packages/dapp/src/util/installPolkaMask.ts b/packages/dapp/src/util/installPolkaMask.ts
index d7ff682..ee9d428 100644
--- a/packages/dapp/src/util/installPolkaMask.ts
+++ b/packages/dapp/src/util/installPolkaMask.ts
@@ -21,8 +21,6 @@ export const installPolkaMask = async (): Promise