Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/change UI #246

Merged
merged 12 commits into from
May 20, 2024
2 changes: 1 addition & 1 deletion components/common/Timer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const formatTimeDiff = (diff: number, onlyDays = false): string => {

if (props.format === "human-readable") {
if (onlyDays) {
return `~ ${day + 1} day${day + 1 !== 1 ? "s" : ""}`;
return `~ ${day + 0.5} day${day + 1 !== 1 ? "s" : ""}`;
}
let formattedString = "";
if (hours > 0) formattedString += `${day} day ${hours} hour${hours > 1 ? "s" : ""} `;
Expand Down
4 changes: 2 additions & 2 deletions components/token/TokenSelectModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ const buttonClicked = async (network: ZkSyncNetwork) => {
if (!e.l1Address) {
return false;
}
if (isWithdraw.value && network.key === "mantle") {
if (isWithdraw.value && network.key === "mantle" && e.l1Address === ETH_ADDRESS) {
return false;
} else if (e.l1Address === ETH_ADDRESS) {
return true;
Expand Down Expand Up @@ -355,6 +355,6 @@ const closeModal = () => {
.active {
border-radius: 8px;
background: rgba(23, 85, 244, 0.25);
border: 2px solid #1755f4;
/* border: 2px solid #1755f4; */
}
</style>
20 changes: 10 additions & 10 deletions components/transaction/DepositThirdPartyBridge.vue
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ const ThirdPartyBridges = [
logo: "/img/Meson.svg",
url: "https://meson.fi/zklink",
},
{
name: "Owlto Finance",
logo: "/img/owlto.svg",
url: "https://owlto.finance/?to=zkLinkNova",
},
// {
// name: "Owlto Finance",
// logo: "/img/owlto.svg",
// url: "https://owlto.finance/?to=zkLinkNova",
// },
{
name: "Symbiosis",
logo: "/img/Symbiosys.svg",
Expand All @@ -79,15 +79,15 @@ const fetchBridgePoints = async () => {
const points = (await Promise.all([
$fetch(API_URL, { params: { name: "orbiter" } }),
$fetch(API_URL, { params: { name: "meson" } }),
$fetch(API_URL, { params: { name: "owlet" } }),
// $fetch(API_URL, { params: { name: "owlet" } }),
$fetch(API_URL, { params: { name: "symbiosis" } }),
])) as any[];
console.log(points, "points");
const _bridgePoints = bridgePoints.value;
for (let i = 0; i < points.length; i++) {
const { data } = points[i];
_bridgePoints[i].points = data;
}
_bridgePoints[1].points = points[0]?.data;
_bridgePoints[2].points = points[1]?.data;
_bridgePoints[3].points = points[2]?.data;

bridgePoints.value = _bridgePoints;
};

Expand Down
1 change: 1 addition & 0 deletions data/wallets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ type WalletEntry = { walletName: string; type: "injected" | "metaMask" | "wallet
export const confirmedSupportedWallets: WalletEntry[] = [
{ walletName: "MetaMask", type: "metaMask" },

{ walletName: "Binance Web3", type: "injected" },
{ walletName: "Injected", type: "injected" },
{ walletName: "OKX", type: "injected" },
{ walletName: "GateWallet", type: "injected" },
Expand Down
9 changes: 8 additions & 1 deletion store/onboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,14 @@ export const useOnboardStore = defineStore("onboard", () => {
const connectors = [
injected(),
safe({
allowedDomains: [/app.safe.global$/, /safe.zklink.io$/],
allowedDomains: [
/app.safe.global$/,
/safe.zklink.io$/,
/safe.manta.network$/,
/multisig.mantle.xyz$/,
/safe.linea.build$/,
/blast-safe.io$/,
],
debug: true,
}),
walletConnect({ projectId: env.walletConnectProjectID, showQrModal: false, metadata }),
Expand Down
2 changes: 1 addition & 1 deletion utils/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,6 @@ export const getEstimateWithdrawalDelayDays = (txTime: string | number) => {
return 14;
} else {
const gap = Math.ceil(14 - (transactionTime - LAST_BLAST_SYNCL2_TIME) / (24 * 3600 * 1000));
return gap >= 8 ? gap : 8;
return gap >= 8 ? gap : 8.5;
}
};
6 changes: 6 additions & 0 deletions views/transactions/Withdraw.vue
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,12 @@ import WithdrawalSubmitted from "@/views/transactions/WithdrawalSubmitted.vue";
import { ETH_ADDRESS } from "~/zksync-web3-nova/src/utils";
const showBridge = ref(true);
const chainList = [
{
name: "Orbiter Finance",
logo: "orbiter.svg",
url: "https://www.orbiter.finance/",
description: "https://www.orbiter.finance/",
},
{
name: "Meson Finance",
description: "https://meson.fi/",
Expand Down
Loading