Skip to content

Commit

Permalink
fix: make finalization required, update ecosystem links, update web3m…
Browse files Browse the repository at this point in the history
…odal
  • Loading branch information
JackHamer09 committed Mar 31, 2024
1 parent dc07776 commit a5d6089
Show file tree
Hide file tree
Showing 8 changed files with 126 additions and 174 deletions.
11 changes: 5 additions & 6 deletions composables/zksync/useTransaction.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { useMemoize } from "@vueuse/core";
import { BigNumber, type BigNumberish } from "ethers";
import { parseEther } from "ethers/lib/utils";
import { type BigNumberish } from "ethers";

import { isCustomNode } from "@/data/networks";

import type { TokenAmount } from "@/types";
import type { Provider, Signer } from "zksync-ethers";
Expand All @@ -12,10 +13,8 @@ type TransactionParams = {
amount: BigNumberish;
};

export const isWithdrawalManualFinalizationRequired = (token: TokenAmount, l1NetworkId: number) => {
return (
token.address === ETH_TOKEN.address && BigNumber.from(token.amount).lt(parseEther("0.01")) && l1NetworkId === 1
);
export const isWithdrawalManualFinalizationRequired = (_token: TokenAmount, l1NetworkId: number) => {
return l1NetworkId === 1 || isCustomNode;
};

export default (getSigner: () => Promise<Signer | undefined>, getProvider: () => Provider) => {
Expand Down
221 changes: 101 additions & 120 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
"@vueuse/router": "^10.9.0",
"@wagmi/connectors": "^4.1.14",
"@wagmi/core": "^2.6.5",
"@web3modal/wagmi": "^4.0.11",
"@web3modal/wagmi": "^4.1.3",
"crypto-js": "^4.1.1",
"dotenv": "^16.0.3",
"ethers": "^5.7.2",
Expand Down
4 changes: 2 additions & 2 deletions pages/assets.vue
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ const depositMethods = computed(() => {
label: "Top-up with cash",
description: "Buy tokens using a card or another method for fiat",
as: "a",
href: "https://zksync.dappradar.com/ecosystem?category-de=gateways",
href: "https://zksync.dappradar.com/ecosystem?category=non_dapps_on_off_ramps",
target: "_blank",
icon: ArrowTopRightOnSquareIcon,
},
Expand All @@ -216,7 +216,7 @@ const depositMethods = computed(() => {
label: "Bridge from other networks",
description: "Explore ecosystem of third party bridges",
as: "a",
href: "https://zksync.dappradar.com/ecosystem?category-de=bridges",
href: "https://zksync.dappradar.com/ecosystem?category=defi_bridge",
target: "_blank",
icon: ArrowTopRightOnSquareIcon,
},
Expand Down
Loading

0 comments on commit a5d6089

Please sign in to comment.