Skip to content

Commit

Permalink
Merge pull request #262 from terra-money/st-1047
Browse files Browse the repository at this point in the history
Only allow terra in multisig send flow
  • Loading branch information
terencelimzhengwei authored Jan 9, 2024
2 parents be6ca54 + 2f7be12 commit ff1d62e
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/pages/wallet/SendPage/Chain.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,15 @@ import { getWallet } from "auth/scripts/keystore"

const Chain = () => {
const { form, goToStep } = useSend()
const { setValue } = form
const { setValue, watch } = form
const networks = useAllNetworks()
const { recipient } = form.watch()
const { words } = getWallet(recipient)
const { recipient } = watch()
const wallet = getWallet(recipient)

const chains = Object.values(networks)
.filter(({ coinType }) => !!words[coinType])
.filter((n) => wallet.words?.[n.coinType] && wallet.multisig ? n.prefix === "terra" : true)
.map(({ chainID, prefix, coinType }) => {
const address = addressFromWords(words[coinType], prefix)

const address = addressFromWords(wallet.words?.[coinType] ?? "", prefix)
return {
name: getChainNamefromID(chainID, networks) ?? chainID,
onClick: () => {
Expand Down

0 comments on commit ff1d62e

Please sign in to comment.