From 52fdd14a041a8c6e168174570244df57b1093577 Mon Sep 17 00:00:00 2001 From: JaiBo <65864145+iafhurtado@users.noreply.github.com> Date: Sun, 18 Aug 2024 21:50:59 +0200 Subject: [PATCH 1/2] optimizing for smaller devices --- .../app/cdp/components/CDPInfo/index.tsx | 38 +++++++++++-------- packages/nextjs/app/components/hero.tsx | 2 +- 2 files changed, 24 insertions(+), 16 deletions(-) diff --git a/packages/nextjs/app/cdp/components/CDPInfo/index.tsx b/packages/nextjs/app/cdp/components/CDPInfo/index.tsx index fb89b9b..f649df5 100644 --- a/packages/nextjs/app/cdp/components/CDPInfo/index.tsx +++ b/packages/nextjs/app/cdp/components/CDPInfo/index.tsx @@ -4,14 +4,14 @@ import Image from "next/image"; const CDPInfo: React.FC = () => { return (
-
-

+
+

Understanding the CDP Mechanism

-
-

How the Contracts Work

-

+

+

How the Contracts Work

+

Our platform leverages a set of smart contracts to manage the deposit, minting, and withdrawal processes. When you deposit assets into our smart contract, these assets are securely held and serve as collateral for minting new stablecoins. The smart contracts ensure the safety and integrity of your assets by enforcing @@ -19,16 +19,18 @@ const CDPInfo: React.FC = () => {

-
-

The Mechanism of Depositing and Minting

-

+

+

+ The Mechanism of Depositing and Minting +

+

When you deposit assets into the smart contract, you are essentially locking up collateral. Based on the value of this collateral, you can mint a corresponding amount of stablecoins. For example, if you deposit 1 ETH worth $2000, and the collateralization ratio is 150%, you can mint up to $1333 worth of stablecoins. The system constantly monitors the value of the collateral to ensure it remains sufficient to back the minted stablecoins.

-
+
Here’s how it works step-by-step:
  1. You deposit your assets into the smart contract.
  2. @@ -42,24 +44,30 @@ const CDPInfo: React.FC = () => {
-

Using Your Stablecoins

-

+

Using Your Stablecoins

+

Once you have minted your stablecoins, you can use them in various ways:

-
    +
    • Trade them on supported exchanges to buy other cryptocurrencies or assets.
    • Use them in DeFi protocols for lending, borrowing, or earning interest.
    • Spend them directly if they are accepted as a payment method.
    -

    +

    The flexibility of stablecoins allows you to manage your assets more effectively, providing liquidity and stability in volatile markets.

-
- about image +
+ about image
); diff --git a/packages/nextjs/app/components/hero.tsx b/packages/nextjs/app/components/hero.tsx index fbb94b7..750986c 100644 --- a/packages/nextjs/app/components/hero.tsx +++ b/packages/nextjs/app/components/hero.tsx @@ -21,7 +21,7 @@ const Hero = () => { loading="eager" placeholder="blur" /> -

+

Mexico’s MXN
Stablecoin: XOC

From 7d056afdca7f5da949f6fcc30697cdf083544d46 Mon Sep 17 00:00:00 2001 From: DCota <32775237+DaigaroCota@users.noreply.github.com> Date: Thu, 22 Aug 2024 19:11:39 -0700 Subject: [PATCH 2/2] chore: format and lint --- packages/nextjs/app/components/Blog/SingleBlog.tsx | 2 +- packages/nextjs/app/components/cta.js | 6 ++---- packages/nextjs/app/components/data.js | 2 +- packages/nextjs/app/components/testimonials.js | 6 ++++-- packages/nextjs/data/yourBorrows.json | 2 +- packages/nextjs/hooks/useMint.ts | 7 ++++++- packages/nextjs/hooks/useRepay.ts | 2 +- packages/nextjs/hooks/useWithdraw.ts | 2 +- 8 files changed, 17 insertions(+), 12 deletions(-) diff --git a/packages/nextjs/app/components/Blog/SingleBlog.tsx b/packages/nextjs/app/components/Blog/SingleBlog.tsx index 931ecaf..309795a 100644 --- a/packages/nextjs/app/components/Blog/SingleBlog.tsx +++ b/packages/nextjs/app/components/Blog/SingleBlog.tsx @@ -11,7 +11,7 @@ const SingleBlog = ({ blog }: { blog: Blog }) => {
image { const [showCard, setShowCard] = useState(false); @@ -50,7 +49,6 @@ const Cta = () => { } }, [tokenID]); - return (
diff --git a/packages/nextjs/app/components/data.js b/packages/nextjs/app/components/data.js index 1cc8d40..69f0938 100644 --- a/packages/nextjs/app/components/data.js +++ b/packages/nextjs/app/components/data.js @@ -6,7 +6,7 @@ import { EyeDropperIcon, FaceFrownIcon, HandThumbUpIcon, - LinkIcon + LinkIcon, } from "@heroicons/react/24/solid"; const benefitOne = { diff --git a/packages/nextjs/app/components/testimonials.js b/packages/nextjs/app/components/testimonials.js index a555c3a..0733d1d 100644 --- a/packages/nextjs/app/components/testimonials.js +++ b/packages/nextjs/app/components/testimonials.js @@ -12,7 +12,8 @@ const Testimonials = () => {

- $XOC is one of the first proposals to revolutionize DeFi in Mexico. Integrating a stable Mexican peso currency into the web3 ecosystem. + $XOC is one of the first proposals to revolutionize DeFi in Mexico. Integrating a stable + Mexican peso currency into the web3 ecosystem.

@@ -31,7 +32,8 @@ const Testimonials = () => {

- $XOC is Mexico’s best tool to build a decentralized financial system. Financial empowerment is the key to a better future for all Mexicans. + $XOC is Mexico’s best tool to build a decentralized financial system. Financial + empowerment is the key to a better future for all Mexicans.

diff --git a/packages/nextjs/data/yourBorrows.json b/packages/nextjs/data/yourBorrows.json index 0637a08..fe51488 100644 --- a/packages/nextjs/data/yourBorrows.json +++ b/packages/nextjs/data/yourBorrows.json @@ -1 +1 @@ -[] \ No newline at end of file +[] diff --git a/packages/nextjs/hooks/useMint.ts b/packages/nextjs/hooks/useMint.ts index 461713d..bc94c79 100644 --- a/packages/nextjs/hooks/useMint.ts +++ b/packages/nextjs/hooks/useMint.ts @@ -16,7 +16,12 @@ const useMint = () => { * @param {Address} houseOfReserveContract - The address of the house of reserve contract. * @param {string} amount - The amount to mint in ether. */ - const handleMint = (houseOfCoinContract: Address, assetContract: Address, houseOfReserveContract: Address, amount: string) => { + const handleMint = ( + houseOfCoinContract: Address, + assetContract: Address, + houseOfReserveContract: Address, + amount: string, + ) => { if (!houseOfCoinABI || !assetContract || !houseOfReserveContract || !amount) { console.error("Required parameters are not properly defined."); return; diff --git a/packages/nextjs/hooks/useRepay.ts b/packages/nextjs/hooks/useRepay.ts index 538b4dd..31c0cf9 100644 --- a/packages/nextjs/hooks/useRepay.ts +++ b/packages/nextjs/hooks/useRepay.ts @@ -39,4 +39,4 @@ const useRepay = () => { return { handleRepay, isError: !!error, error, data }; }; -export default useRepay; \ No newline at end of file +export default useRepay; diff --git a/packages/nextjs/hooks/useWithdraw.ts b/packages/nextjs/hooks/useWithdraw.ts index e55af6e..796bb76 100644 --- a/packages/nextjs/hooks/useWithdraw.ts +++ b/packages/nextjs/hooks/useWithdraw.ts @@ -38,4 +38,4 @@ const useWithdraw = () => { return { handleWithdraw, isError: !!error, error, data }; }; -export default useWithdraw; \ No newline at end of file +export default useWithdraw;