Skip to content

Commit 4ae0f8e

Browse files
authoredMar 17, 2025··
Merge branch 'main' into zs/token-search-display
2 parents ea77cca + 9d582bd commit 4ae0f8e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+2971
-80
lines changed
 

‎app/components/UI/Bridge/index.test.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ import Routes from '../../../constants/navigation/Routes';
77
import { BridgeState } from '../../../core/redux/slices/bridge';
88
import { Hex } from '@metamask/utils';
99

10+
jest.mock('../../../selectors/confirmTransaction');
11+
1012
jest.mock('../../../core/Engine', () => ({
1113
context: {
1214
SwapsController: {

‎app/components/UI/Bridge/index.tsx

+8
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ import { useNavigation, useRoute } from '@react-navigation/native';
3333
import { getBridgeNavbar } from '../Navbar';
3434
import { useTheme } from '../../../util/theme';
3535
import { strings } from '../../../../locales/i18n';
36+
import useSubmitBridgeTx from '../../../util/bridge/hooks/useSubmitBridgeTx';
37+
import { QuoteResponse } from './types';
3638

3739
const getNetworkImage = (chainId: SupportedCaipChainId | Hex) => {
3840
if (isTestNet(chainId)) return getTestNetImageByChainId(chainId);
@@ -116,6 +118,7 @@ const BridgeView = () => {
116118
const navigation = useNavigation();
117119
const route = useRoute();
118120
const { colors } = useTheme();
121+
const { submitBridgeTx } = useSubmitBridgeTx();
119122

120123
// Bridge state from Redux
121124
const sourceToken = useSelector(selectSourceToken);
@@ -154,6 +157,11 @@ const BridgeView = () => {
154157

155158
const handleContinue = () => {
156159
// TODO: Implement bridge transaction with source and destination amounts
160+
// TESTING: Paste a quote from the Bridge API here to test the bridge flow
161+
const quoteResponse = undefined;
162+
if (quoteResponse) {
163+
submitBridgeTx({quoteResponse: quoteResponse as QuoteResponse});
164+
}
157165
};
158166

159167
const handleTermsPress = () => {

0 commit comments

Comments
 (0)
Please sign in to comment.