Skip to content

Commit

Permalink
chore(release): 1.10.0 (#803)
Browse files Browse the repository at this point in the history
* feature(ui-ux): refetch hot wallet balance and transfer guard (#763)

* init

* refactor on transfer token flow

* code cleanup

* code cleanup

* code cleanup -S

* code cleanup

* code cleanup

* resolve pr comment -S

* resolve pr comment

* fix getBalanceFn response type

* code cleanup

---------

Co-authored-by: JJ Adonis <[email protected]>
Co-authored-by: Pierre Gee <[email protected]>

* chore(ops): enable DFI on client (#804)

chore: enable DFI on client

* feature(ui-ux): added liquidity overview screen (#794)

* feature(ui-ux): added liquidity overview screen

* added Link component

* added Disclosure for mobile view

* removed env variables

* removed unused api endpoint

* lint fix

* fixed width in small screen

* renamed router

* added tool tip and added fetch balances on network change

* minor ui updates

* hide navigation when bridge is down

* desc update

* minor fix

* minor updates

* updated hotWalletAddress to HotWalletAddress

* chore: update dfi label on ethereum

Refactor TokenInfo prop and rename component

---------

Co-authored-by: Keng Ye <[email protected]>
Co-authored-by: Keng Ye <[email protected]>

* chore: re-add dfi into client

* feature(ui-ux): added on click event on entire token header bar while closing (#821)

* feature(ui-ux): added test ids for better cypress testing on liquidity screen (#837)

feature(ui-ux): added testids for better cypress testing on liquidity screen

* chore(ui-ux): update warning message when balance is insufficient (#841)

* feat: add reserved utxo on client form

* feat: support all token for liquidity check

* chore: add liquidity as dependency

* revert: all previous changes

Only update warning message when insufficient balance

* chore(ui-ux): claim - prevent txn hook from running on load (#731)

* chore(refactor): claim - prevent txn hook from running on load

* fix(ui-ux): fix lint error

* bump(deps): update dependency react-secure-storage to ^1.2.0 (#839)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* bump(deps): update @waveshq/walletkit to ^0.43.0 (#842)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* bump(deps): update dependency @netlify/plugin-nextjs to ^4.33.0 (#845)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* feat(server): check for hot wallet DFI balance when crafting send tx (#843)

feat: check for hot wallet DFI balance when crafting send tx

* bump(deps): update dependency @fastify/compress to ^6.2.1 (#844)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* feat(server): Add another sanity check for decodeTxnData (#811)

* add another sanity check

* Update apps/server/src/ethereum/services/EVMTransactionConfirmerService.ts

Co-authored-by: Lee Wei Yuan <[email protected]>

---------

Co-authored-by: JJ Adonis <[email protected]>
Co-authored-by: Lee Wei Yuan <[email protected]>

* chore(core): add sanity checks in evm to dfc endpoints (#816)

* add another sanity check

* chore(core): add sec checks in evm to dfc endpoints

* use clearer variable names

* remove comment

* check txn validity before accessing db

* pass 0 confirmations and revert name

* rename comments

* rename comments

* revert reodering condition

* fix typo

* update e2e

---------

Co-authored-by: cuongquangnam <[email protected]>

* fix(ui-ux): fix disabled claim btn (#852)

* fix(ui-ux): trial fix, claim btn is disabled on some machines

* fix(ui-ux): fix disabled claim btn

* fix(ui-ux): fix disabled claim button for eth (#853)

---------

Co-authored-by: Julio Caesar <[email protected]>
Co-authored-by: Pierre Gee <[email protected]>
Co-authored-by: Keng Ye <[email protected]>
Co-authored-by: Harsh R <[email protected]>
Co-authored-by: Keng Ye <[email protected]>
Co-authored-by: Lyka Labrada <[email protected]>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: cuongquangnam <[email protected]>
Co-authored-by: Lee Wei Yuan <[email protected]>
Co-authored-by: Pierre Gee <[email protected]>
Co-authored-by: cuongquangnam <[email protected]>
  • Loading branch information
12 people authored Mar 29, 2023
1 parent 8ec6462 commit d758573
Show file tree
Hide file tree
Showing 18 changed files with 621 additions and 59 deletions.
3 changes: 2 additions & 1 deletion apps/web/src/components/BridgeForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,8 @@ export default function BridgeForm({

{!isBalanceSufficient && !hasPendingTxn && (
<div className={clsx("pt-3", warningTextStyle)}>
Unable to process transaction. <div>Please try again later</div>
Unable to process due to liquidity cap, please try again in a few
hours
</div>
)}
</div>
Expand Down
17 changes: 16 additions & 1 deletion apps/web/src/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@ import Image from "next/image";
import Link from "next/link";
import ConnectButton from "./ConnectButton";
import Banner from "./Banner";
import Navigation from "./Navigation";

export default function Header(): JSX.Element {
export default function Header({
isBridgeUp,
}: {
isBridgeUp: boolean;
}): JSX.Element {
return (
<div className="relative z-[1] flex flex-col">
<Banner />
Expand All @@ -18,10 +23,20 @@ export default function Header(): JSX.Element {
/>
</div>
</Link>
{isBridgeUp && (
<div className="hidden lg:block">
<Navigation />
</div>
)}
<div className="flex h-9 items-center md:h-10 lg:h-12">
<ConnectButton />
</div>
</div>
{isBridgeUp && (
<div className="lg:hidden px-5 md:px-10 mb-6 md:mb-12">
<Navigation />
</div>
)}
</div>
);
}
44 changes: 44 additions & 0 deletions apps/web/src/components/Link.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/* eslint-disable no-restricted-imports */
import { LinkProps as NextLinkProps } from "next/dist/client/link";
import { useRouter } from "next/router";
import NextLink from "next/link";
import { PropsWithChildren } from "react";
import { UrlObject } from "url";
import { useNetworkEnvironmentContext } from "@contexts/NetworkEnvironmentContext";

export interface LinkUrlObject extends UrlObject {
query?: Record<string, string>;
}

interface LinkProps extends NextLinkProps {
href: LinkUrlObject;
}

/**
* Overrides the default next/link to provide ability to 'keep ?network= query string'.
* This allows `<Link>` usage to be network agnostic where ?network= are automatically appended.
*
* To keep implementation simple, LinkProps enforce href to be strictly a `UrlObject` object
* where query is a `Record<string, string>`. Hence only use this for internal linking.
*
* @param {PropsWithChildren<LinkProps>} props
*/
export function Link(props: PropsWithChildren<LinkProps>): JSX.Element {
const { children, href } = props;
const router = useRouter();
const networkQuery = router.query.network;

const { networkEnv } = useNetworkEnvironmentContext();
if (networkQuery) {
href.query = {
...(href.query ?? {}),
network: networkEnv,
};
}

return (
<NextLink passHref {...props} legacyBehavior>
{children}
</NextLink>
);
}
33 changes: 33 additions & 0 deletions apps/web/src/components/Navigation.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import clsx from "clsx";
import { useRouter } from "next/router";
import { Link } from "./Link";

export default function Navigation() {
const router = useRouter();
const isRoot = router.pathname === "/";

return (
<div className="flex flex-row rounded-[40px] bg-dark-100 p-1 border-[0.5px] border-dark-300/50">
<Link href={{ pathname: "/" }} data-testid="bridge">
<a
className={clsx(
"w-1/2 text-xs md:text-sm py-3 min-w-[136px] text-center font-semibold rounded-[40px]",
isRoot ? "bg-dark-1000 text-dark-00" : "text-dark-1000"
)}
>
Bridge
</a>
</Link>
<Link href={{ pathname: "/liquidity" }} data-testid="liquidity">
<a
className={clsx(
"w-1/2 text-xs md:text-sm py-3 min-w-[136px] text-center font-semibold rounded-[40px]",
!isRoot ? "bg-dark-1000 text-dark-00" : "text-dark-1000"
)}
>
Liquidity
</a>
</Link>
</div>
);
}
Loading

0 comments on commit d758573

Please sign in to comment.