UNPKG

@reservoir0x/relay-kit-ui

Version:

Relay is the Fastest and Cheapest Way to Bridge and Transact Across Chains.

21 lines 2.6 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.DepositAddressValidatingStep = void 0; const jsx_runtime_1 = require("react/jsx-runtime"); const index_js_1 = require("../../../primitives/index.js"); const LoadingSpinner_js_1 = require("../../LoadingSpinner.js"); const index_js_2 = require("../../../../hooks/index.js"); const DepositAddressValidatingStep = ({ txHashes, status }) => { const relayClient = (0, index_js_2.useRelayClient)(); const transactionBaseUrl = relayClient?.baseApiUrl && relayClient.baseApiUrl.includes('testnet') ? 'https://testnets.relay.link' : 'https://relay.link'; const txHash = txHashes && txHashes[0] ? txHashes[0] : undefined; return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(index_js_1.Flex, { direction: "column", align: "center", justify: "between", children: [(0, jsx_runtime_1.jsx)(LoadingSpinner_js_1.LoadingSpinner, { css: { height: 40, width: 40, fill: 'primary-color' } }), (0, jsx_runtime_1.jsx)(index_js_1.Text, { style: "subtitle2", css: { mt: '4', mb: '2', textAlign: 'center' }, children: "Funds received. Your transaction is now in progress." }), status === 'delayed' ? ((0, jsx_runtime_1.jsx)(index_js_1.Flex, { css: { px: '4', py: '3', background: 'amber2', borderRadius: 12 }, children: (0, jsx_runtime_1.jsx)(index_js_1.Text, { style: "subtitle2", css: { textAlign: 'center' }, children: "Your transaction is currently delayed. We apologize for the inconvenience and appreciate your patience. After 5 minutes, your transaction will either be processed or refunded. If this is urgent, please contact support." }) })) : null, (0, jsx_runtime_1.jsxs)(index_js_1.Text, { color: "subtle", style: "body2", css: { mt: 12, textAlign: 'center' }, children: ["Feel free to leave at any time, you can track your progress within the", ' ', (0, jsx_runtime_1.jsxs)(index_js_1.Anchor, { href: `${transactionBaseUrl}/transaction/${txHash}`, target: "_blank", rel: "noreffer", children: [' ', "transaction page"] }), "."] })] }), (0, jsx_runtime_1.jsxs)(index_js_1.Button, { disabled: true, css: { color: 'button-disabled-color !important', mt: 8, justifyContent: 'center' }, children: [(0, jsx_runtime_1.jsx)(LoadingSpinner_js_1.LoadingSpinner, { css: { height: 16, width: 16, fill: 'button-disabled-color' } }), "Validating Transaction"] })] })); }; exports.DepositAddressValidatingStep = DepositAddressValidatingStep; //# sourceMappingURL=DepositAddressValidatingStep.js.map