Skip to content

Commit

Permalink
Showing 5 changed files with 22 additions and 15 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
import { useWallet } from "@aptos-labs/wallet-adapter-react";
import { ExplorerLink } from "components/link/component";
import { APTOS_NETWORK } from "lib/env";
import { toDisplayCoinDecimals } from "lib/utils/decimals";

export const CongratulationsToast = ({ transactionHash }: { transactionHash: string }) => {
export const CongratulationsToast = ({
transactionHash,
amount,
}: {
transactionHash: string;
amount: number | bigint | string;
}) => {
const { network } = useWallet();
const amountString = toDisplayCoinDecimals({ num: amount, decimals: 2 });
return (
<div className="flex flex-col text-center">
<span className="text-7xl p-[20px]">🎉</span>
@@ -12,7 +20,7 @@ export const CongratulationsToast = ({ transactionHash }: { transactionHash: str
Congratulations!
</span>
<span className="font-forma text-2xl uppercase text-ec-blue">
{"You won 1 APT!"}
<span>{`You won ${amountString} APT.`}</span>
</span>
<div className="w-[100%] flex flex-row justify-center mb-[15px]">
<span className="text-dark-gray text-l uppercase">
Original file line number Diff line number Diff line change
@@ -57,7 +57,7 @@ export const SwapButton = ({
toast.dark(
<>
<RewardsAnimation controls={controls} />
<CongratulationsToast transactionHash={res.response.hash} />
<CongratulationsToast transactionHash={res.response.hash} amount={rewardsEvent.data.octas_reward_amount} />
</>,
{
pauseOnFocusLoss: false,
Original file line number Diff line number Diff line change
@@ -5,7 +5,6 @@ import ButtonWithConnectWalletFallback from "components/header/wallet-button/Con
import { useAptos } from "context/wallet-context/AptosContextProvider";
import { useCallback, useEffect, useState } from "react";
import { createSession } from "./session";
import { EXTERNAL_LINK_PROPS } from "components/link";
import { useScramble } from "use-scramble";
import { motion } from "framer-motion";
import { Flex } from "@containers";
20 changes: 10 additions & 10 deletions src/typescript/sdk/src/const.ts
Original file line number Diff line number Diff line change
@@ -46,18 +46,18 @@ export const DEFAULT_REGISTER_MARKET_GAS_OPTIONS = {
maxGasAmount: ONE_APT / 100,
gasUnitPrice: 100,
};
export const MARKET_CAP = 4_500_000_000_000n;
export const EMOJICOIN_REMAINDER = 10_000_000_000_000_000n;
export const EMOJICOIN_SUPPLY = 45_000_000_000_000_000n;
export const LP_TOKENS_INITIAL = 100_000_000_000_000n;
export const MARKET_CAP = 450_000_000_000n;
export const EMOJICOIN_REMAINDER = 1_000_000_000_000_000n;
export const EMOJICOIN_SUPPLY = 4_500_000_000_000_000n;
export const LP_TOKENS_INITIAL = 10_000_000_000_000n;
export const BASE_REAL_FLOOR = 0n;
export const QUOTE_REAL_FLOOR = 0n;
export const BASE_REAL_CEILING = 35_000_000_000_000_000n;
export const QUOTE_REAL_CEILING = 1_000_000_000_000n;
export const BASE_VIRTUAL_FLOOR = 14_000_000_000_000_000n;
export const QUOTE_VIRTUAL_FLOOR = 400_000_000_000n;
export const BASE_VIRTUAL_CEILING = 49_000_000_000_000_000n;
export const QUOTE_VIRTUAL_CEILING = 1_400_000_000_000n;
export const BASE_REAL_CEILING = 3_500_000_000_000_000n;
export const QUOTE_REAL_CEILING = 100_000_000_000n;
export const BASE_VIRTUAL_FLOOR = 1_400_000_000_000_000n;
export const QUOTE_VIRTUAL_FLOOR = 40_000_000_000n;
export const BASE_VIRTUAL_CEILING = 4_900_000_000_000_000n;
export const QUOTE_VIRTUAL_CEILING = 140_000_000_000n;
export const POOL_FEE_RATE_BPS = 25;
export const MARKET_REGISTRATION_FEE = ONE_APT_BIGINT;
export const MARKET_REGISTRATION_DEPOSIT = 4n * ONE_APT_BIGINT;

0 comments on commit 266df13

Please sign in to comment.