Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
0xAlec committed Feb 12, 2025
1 parent a105a55 commit ae2a7f1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ describe('AppchainBridgeProvider', () => {
const mockDeposit = vi.fn();
(useDeposit as Mock).mockReturnValue({
deposit: mockDeposit,
depositStatus: 'success',
depositStatus: 'depositSuccess',
transactionHash: '0xtx',
resetDepositStatus: vi.fn(),
});
Expand Down
7 changes: 5 additions & 2 deletions src/appchain/bridge/components/AppchainBridgeProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,10 @@ export const AppchainBridgeProvider = ({

// Fetch balance when withdraw is successful
useEffect(() => {
if (withdrawStatus === 'claimSuccess' || depositStatus === 'success') {
if (
withdrawStatus === 'claimSuccess' ||
depositStatus === 'depositSuccess'
) {
fetchBalance();
}
}, [withdrawStatus, depositStatus, fetchBalance]);
Expand Down Expand Up @@ -227,7 +230,7 @@ export const AppchainBridgeProvider = ({
? 'https://basescan.org/tx/'
: 'https://sepolia.basescan.org/tx/';

if (depositStatus === 'success') {
if (depositStatus === 'depositSuccess') {
window.open(`${blockExplorerUrl}${depositTransactionHash}`, '_blank');
return;
}
Expand Down

0 comments on commit ae2a7f1

Please sign in to comment.