File tree 1 file changed +10
-1
lines changed
wormhole-connect/src/hooks
1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ const useFetchSupportedRoutes = (): HookReturn => {
40
40
41
41
const getSupportedRoutes = async ( ) => {
42
42
setIsFetching ( true ) ;
43
- const _routes : string [ ] = [ ] ;
43
+ let _routes : string [ ] = [ ] ;
44
44
await config . routes . forEach ( async ( name , route ) => {
45
45
// Disable manual routes when the receiving wallet is a ReadOnlyWallet
46
46
// because the receiving wallet can't sign/complete the transaction
@@ -91,6 +91,15 @@ const useFetchSupportedRoutes = (): HookReturn => {
91
91
}
92
92
} ) ;
93
93
94
+ // HAX - We don't want users to use the token bridge route when the TBTC route is available
95
+ // or they might receive frankenstein TBTC
96
+ if ( _routes . includes ( 'ManualTBTC' ) ) {
97
+ _routes = _routes . filter (
98
+ ( route ) =>
99
+ ! [ 'ManualTokenBridge' , 'AutomaticTokenBridge' ] . includes ( route ) ,
100
+ ) ;
101
+ }
102
+
94
103
if ( isActive ) {
95
104
setIsFetching ( false ) ;
96
105
setRoutes ( _routes ) ;
You can’t perform that action at this time.
0 commit comments