);
})}
}
kind="neutral"
/>
) : undefined}
{pendingRefund !== undefined && Amounts.isNonZero(pendingRefund) && (
{transaction.refundQueryActive ? (
Refund is in progress.
) : (
Merchant created a refund for this order but was not
automatically picked up.
)}
}
kind="positive"
/>
{transaction.refundQueryActive ? undefined : (
;
}
}
}
return {stringifyPaytoUri(payto)};
}
function ShowQrWithCopy({ text }: { text: string }): VNode {
const [showing, setShowing] = useState(false);
const { i18n } = useTranslationContext();
async function copy(): Promise {
navigator.clipboard.writeText(text);
}
async function toggle(): Promise {
setShowing((s) => !s);
}
if (showing) {
return (
);
}
return (
{text.substring(0, 64)}...
);
}
function getShowButtonStates(transaction: Transaction) {
let abort = false;
let fail = false;
let resume = false;
let remove = false;
let suspend = false;
transaction.txActions.forEach((a) => {
switch (a) {
case TransactionAction.Delete:
remove = true;
break;
case TransactionAction.Suspend:
suspend = true;
break;
case TransactionAction.Resume:
resume = true;
break;
case TransactionAction.Abort:
abort = true;
break;
case TransactionAction.Fail:
fail = true;
break;
case TransactionAction.Retry:
break;
default:
assertUnreachable(a);
break;
}
});
return { abort, fail, resume, remove, suspend };
}
function ShowWithdrawalDetailForBankIntegrated({
transaction,
}: {
transaction: TransactionWithdrawal | TransactionInternalWithdrawal;
}): VNode {
const { i18n } = useTranslationContext();
const [showDetails, setShowDetails] = useState(false);
if (
transaction.txState.major !== TransactionMajorState.Pending ||
transaction.withdrawalDetails.type === WithdrawalType.ManualTransfer
)
return ;
const raw = Amounts.parseOrThrow(transaction.amountRaw);
return (
{
e.preventDefault();
setShowDetails(!showDetails);
}}
>
show details
{showDetails && (
)}
{!transaction.withdrawalDetails.confirmed &&
transaction.withdrawalDetails.bankConfirmationUrl ? (
Wire transfer need a confirmation. Go to the{" "}
bank site{" "}
and check wire transfer operation to exchange account is complete.
) : undefined}
{transaction.withdrawalDetails.confirmed &&
!transaction.withdrawalDetails.reserveIsReady && (
Bank has confirmed the wire transfer. Waiting for the exchange to
send the coins
)}
{transaction.withdrawalDetails.confirmed &&
transaction.withdrawalDetails.reserveIsReady && (
Exchange is ready to send the coins, withdrawal in progress.
)}
);
}