Skip to content

Commit

Permalink
fix: remove pending transfer toast (#92)
Browse files Browse the repository at this point in the history
* remove the display of a 'pendingTransferToast', yet keep the settings for it written

* lint fix

Co-authored-by: Carmit Kleinik <carmit@starkware.co>
  • Loading branch information
CarmitKl and Carmit Kleinik authored Mar 22, 2022
1 parent 8e80c25 commit 20f51f3
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions src/components/Features/ToastProvider/ToastProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,7 @@ import React, {useEffect, useRef} from 'react';
import {toast, Toaster} from 'react-hot-toast';
import useDeepCompareEffect from 'use-deep-compare-effect';

import {
ActionType,
isConsumed,
isOnChain,
isPending,
isRejected,
NetworkType
} from '../../../enums';
import {ActionType, isConsumed, isOnChain, isRejected, NetworkType} from '../../../enums';
import {useCompleteTransferToL1, usePrevious} from '../../../hooks';
import {useTransfers} from '../../../providers/TransfersProvider';
import utils from '../../../utils';
Expand Down Expand Up @@ -44,9 +37,6 @@ export const ToastProvider = () => {
const handleToast = (transfer, prevTransfer) => {
const {status, type} = transfer;
const isChanged = prevTransfer && status !== prevTransfer.status;
if (isPending(status)) {
return showPendingTransferToast(transfer);
}
if (isChanged && isConsumed(status)) {
return showConsumedTransferToast(transfer);
}
Expand All @@ -58,6 +48,7 @@ export const ToastProvider = () => {
}
};

/* eslint-disable-next-line */
const showPendingTransferToast = transfer => {
let toastId = getToastId(transfer);
if (!toastId) {
Expand Down

0 comments on commit 20f51f3

Please sign in to comment.