From 4ba14043a40ef26ad99d15d53e3e9ff65ae0c5de Mon Sep 17 00:00:00 2001 From: tomjeatt <40243778+tomjeatt@users.noreply.github.com> Date: Thu, 4 Jul 2024 17:19:55 +0100 Subject: [PATCH] feat: add WBTC to gateway (#38) --- .../src/pages/Bridge/components/BridgeForm/BridgeForm.tsx | 6 ++---- .../pages/Bridge/components/BridgeForm/BtcBridgeForm.tsx | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/apps/evm/src/pages/Bridge/components/BridgeForm/BridgeForm.tsx b/apps/evm/src/pages/Bridge/components/BridgeForm/BridgeForm.tsx index 9904f3b0b..2f2d7682a 100644 --- a/apps/evm/src/pages/Bridge/components/BridgeForm/BridgeForm.tsx +++ b/apps/evm/src/pages/Bridge/components/BridgeForm/BridgeForm.tsx @@ -1,5 +1,5 @@ import { ChainId } from '@gobob/chains'; -import { TBTC } from '@gobob/tokens'; +import { TBTC, WBTC } from '@gobob/tokens'; import { ArrowRight, Divider, Flex, InformationCircle, P, RadioGroup } from '@gobob/ui'; import { Key, useCallback, useMemo, useState } from 'react'; @@ -119,9 +119,7 @@ const BridgeForm = ({ const btcTokens = useMemo( () => tokens?.filter( - (token) => token.currency.symbol === TBTC[L2_CHAIN].symbol - // TODO: enable WBTC when supported - // || token.currency.symbol === WBTC[L2_CHAIN].symbol + (token) => token.currency.symbol === TBTC[L2_CHAIN].symbol || token.currency.symbol === WBTC[L2_CHAIN].symbol ), [tokens] ); diff --git a/apps/evm/src/pages/Bridge/components/BridgeForm/BtcBridgeForm.tsx b/apps/evm/src/pages/Bridge/components/BridgeForm/BtcBridgeForm.tsx index e031a3d0a..88fbbb7b5 100644 --- a/apps/evm/src/pages/Bridge/components/BridgeForm/BtcBridgeForm.tsx +++ b/apps/evm/src/pages/Bridge/components/BridgeForm/BtcBridgeForm.tsx @@ -335,7 +335,7 @@ const BtcBridgeForm = ({ size='lg' type='modal' {...mergeProps(form.getSelectFieldProps(BRIDGE_TICKER), { - onValueChange: (value: string) => setReceiveTicker(value) + onSelectionChange: (value: string) => setReceiveTicker(value) })} > {(data) => (