Skip to content

Commit

Permalink
fix: minor price protect issues
Browse files Browse the repository at this point in the history
  • Loading branch information
DaveVodrazka committed Aug 22, 2024
1 parent 8be4fb3 commit 9fcddac
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions src/components/PriceGuard/PriceGuard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ export const PriceGuard = () => {
setCurrency(newCurrency);
if (options.length) {
setCurrentStrike(options[0].strike);
setExpiry(options[0].maturity);
}
};

Expand Down Expand Up @@ -184,7 +183,7 @@ export const PriceGuard = () => {
.filter(uniquePrimitiveValues)
.sort();

if (options.length > 0 && !expiry) {
if (options.length > 0 && (!expiry || !expiries.includes(expiry))) {
setExpiry(expiries[0]);
}

Expand Down Expand Up @@ -399,7 +398,9 @@ export const PriceGuard = () => {
<span className={styles.title}>Final coverage price</span>
<span className={styles.finalprice}>
{priceLoading || price === undefined ? (
<LoadingAnimation size={20} />
<div style={{ height: "46.78px" }}>
<LoadingAnimation size={20} />
</div>
) : (
<div>
<span>${price.toFixed(3)}</span>
Expand Down
2 changes: 1 addition & 1 deletion src/components/PriceGuard/UserPriceGuard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ export const UserPriceGuard = () => {
return (
<div className={styles.wrapper}>
<h3>My Price Protect</h3>
<p>Connect your wallet to voew active & claimable Price Protections</p>
<p>Connect your wallet to view active & claimable Price Protections</p>
<button onClick={openWalletConnectDialog}>Connect Wallet</button>
</div>
);
Expand Down

0 comments on commit 9fcddac

Please sign in to comment.