Skip to content

Commit

Permalink
temp do not use cached provider
Browse files Browse the repository at this point in the history
  • Loading branch information
estebanmino committed Aug 29, 2024
1 parent a6b3657 commit 1c5614c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
11 changes: 10 additions & 1 deletion src/__swaps__/screens/Swap/components/SwapActionButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ function SwapButton({
return rightIcon;
});

console.log('testID', testID, 'aa');

return (
<Animated.View style={buttonWrapperStyles}>
<Box
Expand Down Expand Up @@ -139,7 +141,14 @@ function SwapButton({
)}
{typeof label !== 'undefined' && (
<Column width="content">
<AnimatedText align="center" style={textStyles} numberOfLines={1} size={small ? '17pt' : '20pt'} weight="heavy">
<AnimatedText
testID={`${testID}-text`}
align="center"
style={textStyles}
numberOfLines={1}
size={small ? '17pt' : '20pt'}
weight="heavy"
>
{labelValue}
</AnimatedText>
</Column>
Expand Down
1 change: 1 addition & 0 deletions src/__swaps__/utils/decimalFormatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ export function valueBasedDecimalFormatter({
// Default to normal rounding if no rounding mode is specified
roundedAmount = divWorklet(roundWorklet(mulWorklet(amount, factor)), factor);
}
console.log('maximumDecimalPlaces', maximumDecimalPlaces);
// Format the number to add separators and trim trailing zeros
const numberFormatter = new Intl.NumberFormat('en-US', {
minimumFractionDigits: minimumDecimalPlaces,
Expand Down
8 changes: 4 additions & 4 deletions src/handlers/web3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,11 +199,11 @@ export const getCachedProviderForNetwork = (chainId: ChainId = ChainId.mainnet):
};

export const getProvider = ({ chainId }: { chainId: number }): StaticJsonRpcProvider => {
const cachedProvider = chainsProviders.get(chainId);
// const cachedProvider = chainsProviders.get(chainId);

if (cachedProvider) {
return cachedProvider;
}
// if (cachedProvider) {
// return cachedProvider;
// }

const networkObject = getNetworkObject({ chainId });

Expand Down

0 comments on commit 1c5614c

Please sign in to comment.