From 5b5872d400994abed7103403ac6f2501bea74af5 Mon Sep 17 00:00:00 2001 From: Sorin Chis Date: Wed, 11 Oct 2023 13:55:59 +0300 Subject: [PATCH] feat(swap): add complete order integration (#2742) Signed-off-by: Sorin Chis Co-authored-by: Juliano Lazzarotto <30806844+stackchain@users.noreply.github.com> Co-authored-by: jorbuedo Co-authored-by: Ruslan Dudin Co-authored-by: Michal --- .../src/TxHistory/TxDetails/TxDetails.tsx | 14 +- .../ExpandableInfoCard/ExpandableInfoCard.tsx | 18 +- .../ConfirmWithSpendingPassword.tsx | 21 +- .../src/features/Swap/common/strings.ts | 5 + .../src/features/Swap/common/useSwapTx.ts | 2 - .../ConfirmTxScreen/ConfirmTxWithPassword.tsx | 7 +- .../ListOrders/CompletedOrders.tsx | 225 +++-- .../StartSwapScreen/ListOrders/OpenOrders.tsx | 8 +- .../StartSwapScreen/ListOrders/mapOrders.ts | 11 +- .../wallet-mobile/src/i18n/locales/en-US.json | 1 + .../processTransactions.ts | 6 +- .../transactionManager.test.ts.snap | 2 + .../transactionManager/transactionManager.ts | 2 + .../src/yoroi-wallets/types/other.ts | 8 + .../src/yoroi-wallets/utils/utils.ts | 9 +- .../src/TxHistory/TxDetails/TxDetails.json | 128 +-- .../src/features/Swap/common/strings.json | 775 +++++++++--------- 17 files changed, 688 insertions(+), 554 deletions(-) diff --git a/apps/wallet-mobile/src/TxHistory/TxDetails/TxDetails.tsx b/apps/wallet-mobile/src/TxHistory/TxDetails/TxDetails.tsx index 854b53043f..0bdd7848ec 100644 --- a/apps/wallet-mobile/src/TxHistory/TxDetails/TxDetails.tsx +++ b/apps/wallet-mobile/src/TxHistory/TxDetails/TxDetails.tsx @@ -5,7 +5,7 @@ import {BigNumber} from 'bignumber.js' import {fromPairs} from 'lodash' import React, {useEffect, useState} from 'react' import {defineMessages, IntlShape, useIntl} from 'react-intl' -import {LayoutAnimation, Linking, StyleSheet, TouchableOpacity, View, ViewProps} from 'react-native' +import {LayoutAnimation, StyleSheet, TouchableOpacity, View, ViewProps} from 'react-native' import {ScrollView} from 'react-native-gesture-handler' import {Banner, Boundary, Button, CopyButton, FadeIn, Icon, StatusBar, Text} from '../../components' @@ -17,11 +17,10 @@ import {useSelectedWallet} from '../../SelectedWallet' import {brand, COLORS} from '../../theme' import {isEmptyString} from '../../utils/utils' import {MultiToken} from '../../yoroi-wallets/cardano/MultiToken' -import {getNetworkConfigById} from '../../yoroi-wallets/cardano/networks' import {CardanoTypes, YoroiWallet} from '../../yoroi-wallets/cardano/types' import {useTipStatus, useTransactionInfos} from '../../yoroi-wallets/hooks' -import {NetworkId, TransactionInfo} from '../../yoroi-wallets/types' -import {asQuantity} from '../../yoroi-wallets/utils' +import {TransactionInfo} from '../../yoroi-wallets/types' +import {asQuantity, openInExplorer} from '../../yoroi-wallets/utils' import {AssetList} from './AssetList' import assetListStyle from './AssetListTransaction.style' @@ -168,7 +167,7 @@ export const TxDetails = () => {