From 387c2f90ffa3493fd3d3b3f46867122d75451f72 Mon Sep 17 00:00:00 2001 From: Korbinian Date: Wed, 29 May 2024 18:07:05 +0700 Subject: [PATCH 1/2] update usdc messaging --- packages/bridge-ui/src/i18n/en.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/bridge-ui/src/i18n/en.json b/packages/bridge-ui/src/i18n/en.json index 2cc00d4618..0910ddc58b 100644 --- a/packages/bridge-ui/src/i18n/en.json +++ b/packages/bridge-ui/src/i18n/en.json @@ -41,7 +41,7 @@ "alerts": { "slow_bridging": "Please note: Bridging to L1 will take around 24hrs!", "smart_contract_wallet": "It seems you are using a smart contract wallet. Please double check that the recipient matches your wallet on the destination or change it accordingly.", - "stable_coin": "You are bridging a stable coin. Currently we are not supporting a native 1:1 conversion. Please use the Stargate Bridge instead. Your bridged asset might not be of any use.", + "stable_coin": "You are bridging a stable coin. For USDC, we are currently partnering with Stargate Bridge for liquidity. Consider using their bridge, as the ecosystem partners are likely using their bridged version", "wrapped_eth": "You are bridging wrapped ETH. Please be aware that un-wrapping will only work on the original chain of the token, NOT on the destination." }, "button": { From cf530e40917e612251bce3c276b4b86ca3bec082 Mon Sep 17 00:00:00 2001 From: Korbinian Date: Wed, 29 May 2024 19:46:36 +0700 Subject: [PATCH 2/2] update min claim --- packages/bridge-ui/src/app.config.ts | 2 +- .../ProcessingFee/NoneOption.svelte | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/bridge-ui/src/app.config.ts b/packages/bridge-ui/src/app.config.ts index 0515a39246..89505df150 100644 --- a/packages/bridge-ui/src/app.config.ts +++ b/packages/bridge-ui/src/app.config.ts @@ -28,7 +28,7 @@ export const bridgeTransactionPoller = { }; export const claimConfig = { - minimumEthToClaim: 0.001, + minimumEthToClaim: 0.0015, // 1M gas * 1.5 gwei (lowest gasPrice) }; export const transactionConfig = { diff --git a/packages/bridge-ui/src/components/Bridge/SharedBridgeComponents/ProcessingFee/NoneOption.svelte b/packages/bridge-ui/src/components/Bridge/SharedBridgeComponents/ProcessingFee/NoneOption.svelte index 9a1eaf1f67..70d0ebfc0f 100644 --- a/packages/bridge-ui/src/components/Bridge/SharedBridgeComponents/ProcessingFee/NoneOption.svelte +++ b/packages/bridge-ui/src/components/Bridge/SharedBridgeComponents/ProcessingFee/NoneOption.svelte @@ -2,6 +2,7 @@ import type { Address } from 'viem'; import { destNetwork, selectedToken } from '$components/Bridge/state'; + import { claimConfig } from '$config'; import { recommendProcessingFee } from '$libs/fee'; import { fetchBalance, type NFT, type Token } from '$libs/token'; import { account, connectedSourceChain } from '$stores'; @@ -28,12 +29,17 @@ }); // Calculate the recommended amount of ETH needed for processMessage call - const recommendedAmount = await recommendProcessingFee({ + let recommendedAmount = await recommendProcessingFee({ token, destChainId: destChain, srcChainId: srcChain, }); + if (recommendedAmount <= claimConfig.minimumEthToClaim) { + // should the fee be very small, set it to at least the minimum + recommendedAmount = BigInt(claimConfig.minimumEthToClaim); + } + // Does the user have enough ETH to claim manually on the destination chain? enoughEth = destBalance ? destBalance?.value >= recommendedAmount : false; } catch (err) {