[Transaction List v2] Prevent "Send Again" for ERC721 transfers (#1889)

This commit is contained in:
Fernando 2021-02-11 18:24:05 -03:00 committed by GitHub
parent dbf34c759a
commit ded5e14257
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 1 deletions

View File

@ -30,7 +30,15 @@ export const TxInfoDetails = ({ title, address, isTransferType, txInfo }: TxInfo
const knownAddress = recipientName !== 'UNKNOWN'
const { txLocation } = useContext<TxLocationProps>(TxLocationContext)
const canRepeatTransaction = isTransferType && txLocation === 'history' && txInfo?.direction === 'OUTGOING'
const canRepeatTransaction =
// is transfer type by context
isTransferType &&
// not a Collectible
txInfo?.transferInfo.type !== 'ERC721' &&
// in history list
txLocation === 'history' &&
// it's outgoing
txInfo?.direction === 'OUTGOING'
const [sendModalOpen, setSendModalOpen] = useState(false)
const sendModalOpenHandler = () => {