bridge_ui: update wallet msg to be more accurate

Change-Id: Ia13caf551a616fa0e60732ac4ff5451486d9d3e0
This commit is contained in:
Evan Gray 2021-09-15 13:34:44 -04:00
parent 6ba172bce2
commit f91cccc819
3 changed files with 7 additions and 8 deletions

View File

@ -8,6 +8,7 @@ import {
selectAttestIsSending,
selectAttestTargetChain,
} from "../../store/selectors";
import { WAITING_FOR_WALLET_AND_CONF } from "../Transfer/WaitingForWalletMessage";
const useStyles = makeStyles((theme) => ({
message: {
@ -17,8 +18,6 @@ const useStyles = makeStyles((theme) => ({
},
}));
const WAITING_FOR_WALLET = "Waiting for wallet approval (likely in a popup)...";
export default function WaitingForWalletMessage() {
const classes = useStyles();
const isSending = useSelector(selectAttestIsSending);
@ -29,7 +28,7 @@ export default function WaitingForWalletMessage() {
const showWarning = (isSending && !attestTx) || (isCreating && !createTx);
return showWarning ? (
<Typography className={classes.message} variant="body2">
{WAITING_FOR_WALLET}{" "}
{WAITING_FOR_WALLET_AND_CONF}{" "}
{targetChain === CHAIN_ID_SOLANA && isCreating
? "Note: there will be several transactions"
: null}

View File

@ -9,6 +9,7 @@ import {
selectNFTTargetChain,
selectNFTTransferTx,
} from "../../store/selectors";
import { WAITING_FOR_WALLET_AND_CONF } from "../Transfer/WaitingForWalletMessage";
const useStyles = makeStyles((theme) => ({
message: {
@ -18,8 +19,6 @@ const useStyles = makeStyles((theme) => ({
},
}));
const WAITING_FOR_WALLET = "Waiting for wallet approval (likely in a popup)...";
export default function WaitingForWalletMessage() {
const classes = useStyles();
const sourceChain = useSelector(selectNFTSourceChain);
@ -31,7 +30,7 @@ export default function WaitingForWalletMessage() {
const showWarning = (isSending && !transferTx) || (isRedeeming && !redeemTx);
return showWarning ? (
<Typography className={classes.message} variant="body2">
{WAITING_FOR_WALLET}{" "}
{WAITING_FOR_WALLET_AND_CONF}{" "}
{targetChain === CHAIN_ID_SOLANA && isRedeeming
? "Note: there will be several transactions"
: sourceChain === CHAIN_ID_ETH && isSending

View File

@ -18,7 +18,8 @@ const useStyles = makeStyles((theme) => ({
},
}));
const WAITING_FOR_WALLET = "Waiting for wallet approval (likely in a popup)...";
export const WAITING_FOR_WALLET_AND_CONF =
"Waiting for wallet approval (likely in a popup) and confirmation...";
export default function WaitingForWalletMessage() {
const classes = useStyles();
@ -32,7 +33,7 @@ export default function WaitingForWalletMessage() {
isApproving || (isSending && !transferTx) || (isRedeeming && !redeemTx);
return showWarning ? (
<Typography className={classes.message} variant="body2">
{WAITING_FOR_WALLET}{" "}
{WAITING_FOR_WALLET_AND_CONF}{" "}
{targetChain === CHAIN_ID_SOLANA && isRedeeming
? "Note: there will be several transactions"
: null}