Skip to content

Commit c167e9c

Browse files
committed
fix rebase imports
1 parent 8136ae7 commit c167e9c

File tree

6 files changed

+16
-22
lines changed

6 files changed

+16
-22
lines changed

ios/Podfile.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -2429,4 +2429,4 @@ SPEC CHECKSUMS:
24292429

24302430
PODFILE CHECKSUM: 0839e4141c8f26133bf9a961f5ded1ea3127af54
24312431

2432-
COCOAPODS: 1.14.3
2432+
COCOAPODS: 1.15.2

src/components/Transactions/TransactionDetailsCard.tsx

+2-4
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import { abbreviations, ethereumUtils } from '@/utils';
99
import { TransactionSimulationMeta } from '@/graphql/__generated__/metadataPOST';
1010
import { ChainId } from '@/networks/types';
1111

12-
import { getNetworkObject } from '@/networks';
1312
import { TransactionDetailsRow } from '@/components/Transactions/TransactionDetailsRow';
1413
import { FadedScrollCard } from '@/components/FadedScrollCard';
1514
import { IconContainer } from '@/components/Transactions/TransactionIcons';
@@ -21,6 +20,7 @@ import {
2120
CARD_BORDER_WIDTH,
2221
EXPANDED_CARD_TOP_INSET,
2322
} from '@/components/Transactions/constants';
23+
import { chainsName } from '@/networks/chains';
2424

2525
interface TransactionDetailsCardProps {
2626
chainId: ChainId;
@@ -49,8 +49,6 @@ export const TransactionDetailsCard = ({
4949
const contentHeight = useSharedValue(COLLAPSED_CARD_HEIGHT - CARD_BORDER_WIDTH * 2);
5050
const [isExpanded, setIsExpanded] = useState(false);
5151

52-
const currentNetwork = getNetworkObject({ chainId });
53-
5452
const listStyle = useAnimatedStyle(() => ({
5553
opacity: interpolate(
5654
cardHeight.value,
@@ -95,7 +93,7 @@ export const TransactionDetailsCard = ({
9593
</Box>
9694
<Animated.View style={listStyle}>
9795
<Stack space="24px">
98-
{<TransactionDetailsRow chainId={chainId} detailType="chain" value={currentNetwork.name} />}
96+
{<TransactionDetailsRow chainId={chainId} detailType="chain" value={chainsName[chainId]} />}
9997
{!!(meta?.to?.address || toAddress || showTransferToRow) && (
10098
<TransactionDetailsRow
10199
detailType={isContract ? 'contract' : 'to'}

src/components/Transactions/TransactionSimulationCard.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import { TextColor } from '@/design-system/color/palettes';
1414

1515
import { TransactionErrorType, TransactionSimulationResult, TransactionScanResultType } from '@/graphql/__generated__/metadataPOST';
1616

17-
import { getNetworkObject } from '@/networks';
1817
import { isEmpty } from 'lodash';
1918
import { TransactionSimulatedEventRow } from '@/components/Transactions/TransactionSimulatedEventRow';
2019
import { FadedScrollCard } from '@/components/FadedScrollCard';
@@ -29,6 +28,7 @@ import {
2928
timingConfig,
3029
} from '@/components/Transactions/constants';
3130
import { ChainId } from '@/networks/types';
31+
import { chainsName } from '@/networks/chains';
3232

3333
interface TransactionSimulationCardProps {
3434
chainId: ChainId;
@@ -271,7 +271,7 @@ export const TransactionSimulationCard = ({
271271
<Text color="labelQuaternary" size="13pt" weight="semibold">
272272
{i18n.t(i18n.l.walletconnect.simulation.simulation_card.messages.need_more_native, {
273273
symbol: walletBalance?.symbol,
274-
network: getNetworkObject({ chainId }).name,
274+
network: chainsName[chainId],
275275
})}
276276
</Text>
277277
) : (

src/hooks/useCalculateGasLimit.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { useEffect, useRef, useCallback } from 'react';
22
import { estimateGas, web3Provider, toHex } from '@/handlers/web3';
33
import { convertHexToString, omitFlatten } from '@/helpers/utilities';
44
import { logger, RainbowError } from '@/logger';
5-
import { getNetworkObject } from '@/networks';
65
import { ethereumUtils } from '@/utils';
76
import { hexToNumber, isHex } from 'viem';
87
import { isEmpty } from 'lodash';
@@ -11,6 +10,7 @@ import { GasFeeParamsBySpeed } from '@/entities';
1110
import { StaticJsonRpcProvider } from '@ethersproject/providers';
1211
import { useGas } from '@/hooks';
1312
import { ChainId } from '@/networks/types';
13+
import { needsL1SecurityFeeChains } from '@/networks/chains';
1414

1515
type CalculateGasLimitProps = {
1616
isMessageRequest: boolean;
@@ -52,8 +52,8 @@ export const useCalculateGasLimit = ({
5252
} finally {
5353
logger.debug('WC: Setting gas limit to', { gas: convertHexToString(gas) }, logger.DebugContext.walletconnect);
5454

55-
const networkObject = getNetworkObject({ chainId });
56-
if (chainId && networkObject.gas.OptimismTxFee) {
55+
const needsL1SecurityFee = needsL1SecurityFeeChains.includes(chainId);
56+
if (needsL1SecurityFee) {
5757
const l1GasFeeOptimism = await ethereumUtils.calculateL1FeeOptimism(txPayload, provider || web3Provider);
5858
updateTxFee(gas, null, l1GasFeeOptimism);
5959
} else {

src/hooks/useWatchPendingTxs.ts

+1-6
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import { getNftSortForAddress } from './useNFTsSortBy';
1717
import { ChainId } from '@/networks/types';
1818
import { staleBalancesStore } from '@/state/staleBalances';
1919
import { useConnectedToHardhatStore } from '@/state/connectedToHardhat';
20-
import { networkObjects } from '@/networks';
2120
import { SUPPORTED_MAINNET_CHAIN_IDS } from '@/networks/chains';
2221

2322
export const useWatchPendingTransactions = ({ address }: { address: string }) => {
@@ -190,10 +189,6 @@ export const useWatchPendingTransactions = ({ address }: { address: string }) =>
190189
);
191190

192191
if (minedTransactions.length) {
193-
const chainIds = Object.values(networkObjects)
194-
.filter(networkObject => networkObject.enabled && networkObject.networkType !== 'testnet')
195-
.map(networkObject => networkObject.id);
196-
197192
minedTransactions.forEach(tx => {
198193
if (tx.changes?.length) {
199194
tx.changes?.forEach(change => {
@@ -212,7 +207,7 @@ export const useWatchPendingTransactions = ({ address }: { address: string }) =>
212207
queryKey: consolidatedTransactionsQueryKey({
213208
address,
214209
currency: nativeCurrency,
215-
chainIds,
210+
chainIds: SUPPORTED_MAINNET_CHAIN_IDS,
216211
}),
217212
});
218213

src/resources/assets/UserAssetsQuery.ts

+7-6
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { fetchHardhatBalances } from './hardhatAssets';
1111
import { AddysAccountAssetsMeta, AddysAccountAssetsResponse, RainbowAddressAssets } from './types';
1212
import { Network } from '@/networks/types';
1313
import { staleBalancesStore } from '@/state/staleBalances';
14-
import { networkObjects } from '@/networks';
14+
import { SUPPORTED_MAINNET_CHAIN_IDS } from '@/networks/chains';
1515

1616
// ///////////////////////////////////////////////
1717
// Query Types
@@ -74,14 +74,15 @@ async function userAssetsQueryFunction({
7474
}
7575

7676
try {
77-
const chainIds = Object.values(networkObjects)
78-
.filter(network => network.enabled && network.networkType !== 'testnet')
79-
.map(network => network.id);
80-
8177
staleBalancesStore.getState().clearExpiredData(address);
8278
const staleBalanceParam = staleBalancesStore.getState().getStaleBalancesQueryParam(address);
8379

84-
const { erroredChainIds, results } = await fetchAndParseUserAssetsForChainIds({ address, currency, chainIds, staleBalanceParam });
80+
const { erroredChainIds, results } = await fetchAndParseUserAssetsForChainIds({
81+
address,
82+
currency,
83+
chainIds: SUPPORTED_MAINNET_CHAIN_IDS,
84+
staleBalanceParam,
85+
});
8586
let parsedSuccessResults = results;
8687

8788
// grab cached data for chain IDs with errors

0 commit comments

Comments
 (0)