Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Update disclaimer text for bridge #341

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/pages/bridge/Issue/Disclaimer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import { useCallback, useState } from 'preact/compat';
import BellIcon from '../../../assets/bell';

type Props = {
text: string;
content: JSX.Element;
};

export default function Disclaimer({ text }: Props) {
export default function Disclaimer({ content }: Props) {
const [collapseVisibility, setCollapseVisibility] = useState('');

const toggle = useCallback(() => {
Expand All @@ -30,7 +30,7 @@ export default function Disclaimer({ text }: Props) {
<BellIcon />
<strong className="ml-2">Disclaimer</strong>
</div>
<p className="text-sm collapse-content whitespace-pre-line">{text}</p>
<p className="text-sm collapse-content whitespace-pre-line">{content}</p>
</div>
);
}
27 changes: 19 additions & 8 deletions src/pages/bridge/Issue/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,24 @@ function Issue(props: IssueProps): JSX.Element {
return amount ? decimalToStellarNative(amount) : Big(0);
}, [amount]);

const disclaimerText = useMemo(
() =>
`• Issue Fee: ${issueFee.mul(100)}% of the transaction amount.
• Redeem Fee: ${redeemFee.mul(100)}% of the transaction amount.
• Security deposit: ${issueGriefingCollateral.mul(100)}% of the transaction amount.
• Total issuable amount (in USD): 20,000 USD.
• Estimated time for issuing: 2 mins to 3 hrs (after submitting the Stellar payment to the vault).`,
const disclaimerContent = useMemo(
() => (
<ul>
<li>• Bridge Fee: Currently free, transitioning to 0.1% per transaction soon.</li>
<li>• Security deposit: 0.5% of the transaction amount locked, returned after successful issue/redeem </li>
<li>
• Total issuable amount (in USD): 20000 USD. Join our vault operator program, more
<a
target="_blank"
className="text-accent ml-1"
href="https://pendulum.gitbook.io/pendulum-docs/build/spacewalk-stellar-bridge/operating-a-vault"
>
here
</a>
</li>
<li>• Estimated time for issuing: 2 mins to 3 hrs (after submitting the Stellar payment to the vault).`</li>
</ul>
),
[issueFee, redeemFee, issueGriefingCollateral],
);

Expand Down Expand Up @@ -175,7 +186,7 @@ function Issue(props: IssueProps): JSX.Element {
) : (
<OpenWallet dAppName={dAppName} />
)}
<Disclaimer text={disclaimerText} />
<Disclaimer content={disclaimerContent} />
</form>
</div>
</div>
Expand Down
Loading