Skip to content

Commit

Permalink
don't allow selecting any recepient
Browse files Browse the repository at this point in the history
  • Loading branch information
Szegoo committed Sep 12, 2023
1 parent 736f9c1 commit 46cfc37
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/consts/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export type RELAY_CHAIN_OPTION = 'polkadot' | 'kusama';
const RELAY_CHAIN_ENDPOINTS = {
polkadot: "wss://polkadot.api.onfinality.io/public-ws",
kusama: "wss://kusama.api.onfinality.io/public-ws"
polkadot: "wss://rpc.polkadot.io",
kusama: "wss://kusama-rpc.polkadot.io"
};
export const RELAY_CHAIN = (process.env.RELAY_CHAIN || 'polkadot') as RELAY_CHAIN_OPTION;
export const RELAY_CHAIN_ENDPOINT = RELAY_CHAIN_ENDPOINTS[RELAY_CHAIN];
Expand Down
17 changes: 11 additions & 6 deletions src/pages/transfer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,8 @@ const TransferPage = () => {
return true;
}

const isSourceParachain = sourceChainId > 0;
// Even if it is we want to get the perspective from the relay chain.
const isSourceParachain = false;

if (
sourceChainId !== destChainId &&
Expand Down Expand Up @@ -430,11 +431,15 @@ const TransferPage = () => {
value={recipientId === undefined ? '' : recipientId}
onChange={(e) => setRecipientId(Number(e.target.value))}
>
{identities.map((identity, index) => (
<MenuItem value={index} key={index}>
{identity.nickName}
</MenuItem>
))}
{identities.filter(
(identity) =>
IdentityKey.containsChainId(
KeyStore.readIdentityKey(identity.identityNo) || '', destChainId
)).map((identity, index) => (
<MenuItem value={index} key={index}>
{identity.nickName}
</MenuItem>
))}
</Select>
</FormControl>
)}
Expand Down

0 comments on commit 46cfc37

Please sign in to comment.