Skip to content

Commit

Permalink
fetch networkId from token data
Browse files Browse the repository at this point in the history
  • Loading branch information
CarlosQ96 committed Jan 23, 2024
1 parent 262be4d commit 9b87b46
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export type FetchedSavedFailDonationInterface = {
};
walletAddress: string;
amount: number;
chainId: number;
chainId?: number;
projectId: number;
anonymous: boolean;
nonce: number;
Expand Down
3 changes: 2 additions & 1 deletion src/services/cronJobs/backupDonationImportJob.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ export const createBackupDonation = async (
const {
amount,
txHash,
chainId,
token,
anonymous,
walletAddress,
Expand All @@ -87,6 +86,8 @@ export const createBackupDonation = async (
chainvineReferred,
} = donationData;

const chainId = donationData?.chainId || donationData.token.networkId;

const donorUser = await findUserByWalletAddress(walletAddress);
if (!donorUser) {
throw new Error(i18n.__(translationErrorMessagesKeys.UN_AUTHORIZED));
Expand Down

0 comments on commit 9b87b46

Please sign in to comment.