Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix issue with incorrect value in tokens tab #1065

Merged
merged 1 commit into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,12 @@ export const DeployDetailsResult = ({ deploy }: DeployDetailsResultProps) => {
key={id}
callerAccountInfo={action.callerAccountInfo}
recipientAccountInfo={action.recipientAccountInfo}
toPublicKey={action.recipientKey}
fromPublicKey={action.callerPublicKey}
toPublicKey={
action.recipientKey || action.recipientAccountInfo?.accountHash!
}
fromPublicKey={
action.callerPublicKey || action.callerAccountInfo?.accountHash!
}
fiatAmount={action.fiatAmount}
/>
))}
Expand Down
4 changes: 2 additions & 2 deletions src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ export const ACCOUNT_DEPLOY_REFRESH_RATE = 30 * SECOND;
export const ACCOUNT_CASPER_ACTIVITY_REFRESH_RATE = 30 * SECOND;
export const ERC20_TOKEN_ACTIVITY_REFRESH_RATE = 30 * SECOND;
export const VALIDATORS_REFRESH_RATE = 30 * SECOND;
export const PENDING_DEPLOY_REFETCH_INTERVAL = 5 * SECOND;
export const DEPLOY_DETAILS_REFRESH_RATE = 30 * SECOND;

export const LOGIN_RETRY_ATTEMPTS_LIMIT = 5;
export const ERROR_DISPLAYED_BEFORE_ATTEMPT_IS_DECREMENTED = 1;
Expand All @@ -27,8 +29,6 @@ export const STAKE_COST_MOTES = '2500000000'; // 2.5 CSPR
export const DELEGATION_MIN_AMOUNT_MOTES = '500000000000'; // 500 CSPR
export const MAX_DELEGATORS = 1200;

export const PENDING_DEPLOY_REFETCH_INTERVAL = 5 * 1000;

export const getBlockExplorerAccountUrl = (
casperLiveUrl: string,
publicKey: string
Expand Down
6 changes: 5 additions & 1 deletion src/libs/services/deploys/use-fetch-single-deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import { useQuery } from '@tanstack/react-query';
import { CasperNetwork } from 'casper-wallet-core/src/domain/common/common';
import { useSelector } from 'react-redux';

import { DEPLOY_DETAILS_REFRESH_RATE } from '@src/constants';

import { selectActiveNetworkSetting } from '@background/redux/settings/selectors';
import { selectVaultActiveAccount } from '@background/redux/vault/selectors';
import { deploysRepository } from '@background/wallet-repositories';
Expand All @@ -17,7 +19,9 @@ export const useFetchSingleDeploy = (deployHash?: string) => {
deployHash: deployHash ?? '',
activePublicKey: activeAccount?.publicKey ?? '',
network: network.toLowerCase() as CasperNetwork
})
}),
refetchInterval: DEPLOY_DETAILS_REFRESH_RATE,
staleTime: DEPLOY_DETAILS_REFRESH_RATE
});

return {
Expand Down
Loading