Skip to content

Commit

Permalink
Merge branch 'develop' into @matthew/backend-chain-badge
Browse files Browse the repository at this point in the history
  • Loading branch information
walmat authored Dec 27, 2024
2 parents b1398f2 + 9f4c71f commit e2361bc
Show file tree
Hide file tree
Showing 8 changed files with 388 additions and 371 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,9 @@ export const ChainSelection = memo(function ChainSelection({ allText, output }:
const backendNetworks = useBackendNetworksStore(state => state.backendNetworksSharedValue);

// chains sorted by balance on output, chains without balance hidden on input
const { balanceSortedChainList, filter } = useUserAssetsStore(state => ({
balanceSortedChainList: output ? state.getBalanceSortedChainList() : state.getChainsWithBalance(),
filter: state.filter,
}));
const balanceSortedChainList = useUserAssetsStore(state => (output ? state.getBalanceSortedChainList() : state.getChainsWithBalance()));
const filter = useUserAssetsStore(state => state.filter);

const inputListFilter = useSharedValue(filter);

const accentColor = useMemo(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,11 @@ export function SyncGasStateToSharedValues() {

const gasSettings = useSelectedGas(chainId);

const { userNativeNetworkAsset, isLoadingNativeNetworkAsset } = useUserAssetsStore(state => {
const { address: nativeCurrencyAddress } = useBackendNetworksStore.getState().getChainsNativeAsset()[chainId];
const uniqueId = getUniqueId(nativeCurrencyAddress, chainId);
return { userNativeNetworkAsset: state.getLegacyUserAsset(uniqueId), isLoadingNativeNetworkAsset: state.isLoadingUserAssets };
});
const { address: nativeCurrencyAddress } = useBackendNetworksStore.getState().getChainsNativeAsset()[chainId];

const isLoadingNativeNetworkAsset = useUserAssetsStore(state => state.isLoadingUserAssets);
const userNativeNetworkAsset = useUserAssetsStore(state => state.getLegacyUserAsset(getUniqueId(nativeCurrencyAddress, chainId)));

const { data: estimatedGasLimit } = useSwapEstimatedGasLimit({ chainId, assetToSell, quote });

const gasFeeRange = useSharedValue<[string, string] | null>(null);
Expand Down
188 changes: 74 additions & 114 deletions src/components/Discover/TrendingTokens.tsx

Large diffs are not rendered by default.

Loading

0 comments on commit e2361bc

Please sign in to comment.