Skip to content

Commit 021cf56

Browse files
authored
Merge branch 'main' into NUM_MIN_MINORITY_GUARDIANS
2 parents fba9ca2 + f888e25 commit 021cf56

File tree

7 files changed

+23
-24
lines changed

7 files changed

+23
-24
lines changed

packages/bridge-ui/config/schemas/configuredCustomTokens.schema.json

+3
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@
3030
},
3131
"mintable": {
3232
"type": "boolean"
33+
},
34+
"wrapped": {
35+
"type": "boolean"
3336
}
3437
},
3538
"required": ["name", "addresses", "symbol", "decimals", "type", "logoURI"]

packages/bridge-ui/src/components/Bridge/FungibleBridgeComponents/ReviewStep/ReviewStep.svelte

+10
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import { destNetwork as destChain, enteredAmount, selectedToken } from '$components/Bridge/state';
1010
import { PUBLIC_SLOW_L1_BRIDGING_WARNING } from '$env/static/public';
1111
import { LayerType } from '$libs/chain';
12+
import { isWrapped, type Token } from '$libs/token';
1213
import { connectedSourceChain } from '$stores/network';
1314
1415
export let hasEnoughEth: boolean = false;
@@ -21,6 +22,10 @@
2122
2223
$: displayL1Warning = slowL1Warning && $destChain?.id && chainConfig[$destChain.id].type === LayerType.L1;
2324
25+
$: wrapped = $selectedToken !== null && isWrapped($selectedToken as Token);
26+
27+
$: wrappedAssetWarning = $t('bridge.alerts.wrapped_eth');
28+
2429
const dispatch = createEventDispatcher();
2530
2631
const editTransactionDetails = () => {
@@ -64,6 +69,11 @@
6469
<Alert type="warning">{$t('bridge.alerts.slow_bridging')}</Alert>
6570
{/if}
6671

72+
{#if wrapped}
73+
<!-- eslint-disable-next-line svelte/no-at-html-tags -->
74+
<Alert type="warning">{@html wrappedAssetWarning}</Alert>
75+
{/if}
76+
6777
<div class="h-sep" />
6878
<!--
6979
Recipient & Processing Fee

packages/bridge-ui/src/i18n/en.json

+5-4
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@
3838
"nft_scan_again": "Scan again"
3939
},
4040
"alerts": {
41-
"slow_bridging": "Please note: Bridging to L1 will take around 24hrs!"
41+
"slow_bridging": "Please note: Bridging to L1 will take around 24hrs!",
42+
"wrapped_eth": "You are bridging wrapped ETH. Please be aware that un-wrapping will only work on the original chain of the token, <span class=\"font-bold\">NOT</span> on the destination."
4243
},
4344
"button": {
4445
"approve": "Approve",
@@ -361,10 +362,10 @@
361362
"transactions": "Transactions"
362363
},
363364
"paginator": {
364-
"of": "of",
365-
"page": "Page",
365+
"everything_loaded": "Everything loaded",
366366
"more": "Fetch more...",
367-
"everything_loaded": "Everything loaded"
367+
"of": "of",
368+
"page": "Page"
368369
},
369370
"paused_modal": {
370371
"description": "The bridge is currently not available. Follow our official communication channels for more information. ",

packages/bridge-ui/src/libs/token/tokens.ts

+4
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,7 @@ export const testNFT: Token[] = customToken.filter(
2424
);
2525

2626
export const tokens = [ETHToken, ...testERC20Tokens];
27+
28+
export const getTokensByType = (type: TokenType): Token[] => tokens.filter((token) => token.type === type);
29+
30+
export const isWrapped = (token: Token): boolean => tokens.find((token) => token.wrapped === true) === token;

packages/bridge-ui/src/libs/token/types.ts

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export type Token = {
2323
imported?: boolean;
2424
mintable?: boolean;
2525
balance?: bigint;
26+
wrapped?: boolean;
2627
};
2728

2829
export type NFT = Token & {
-5.15 MB
Binary file not shown.

packages/protocol/docs/native_token_support.md

-20
This file was deleted.

0 commit comments

Comments
 (0)