Skip to content

Commit

Permalink
fix: close ledger modal after transfer
Browse files Browse the repository at this point in the history
  • Loading branch information
andy-haynes committed Mar 8, 2022
1 parent 8d704c2 commit b74de42
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/frontend/src/components/nft/NFTTransferModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { EXPLORER_URL } from '../../config';
import { checkAccountAvailable } from '../../redux/actions/account';
import { clearLocalAlert, showCustomAlert } from '../../redux/actions/status';
import { selectBalance } from '../../redux/slices/account';
import { actions as ledgerActions } from '../../redux/slices/ledger';
import { actions as nftActions } from '../../redux/slices/nft';
import { selectStatusLocalAlert } from '../../redux/slices/status';
import NonFungibleTokens, { NFT_TRANSFER_GAS } from '../../services/NonFungibleTokens';
Expand Down Expand Up @@ -200,6 +201,7 @@ export default function NFTTransferModal({ open, onClose, nft, accountId }) {
const [ accountIdIsValid, setAccountIdIsValid] = useState(false);
const { balanceAvailable: nearBalance } = useSelector(selectBalance);
const dispatch = useDispatch();
const { checkAndHideLedgerModal } = ledgerActions;
const { transferToken } = nftActions;

const localAlert = useSelector(selectStatusLocalAlert);
Expand Down Expand Up @@ -231,6 +233,7 @@ export default function NFTTransferModal({ open, onClose, nft, accountId }) {
}));
} finally {
setSending(false);
dispatch(checkAndHideLedgerModal());
}
}

Expand Down

0 comments on commit b74de42

Please sign in to comment.