Skip to content

Commit

Permalink
fix: make receiver verifications optional
Browse files Browse the repository at this point in the history
  • Loading branch information
marwen-abid committed Nov 6, 2024
1 parent 2e1d49c commit 5991162
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/helpers/formatReceiver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@ export const formatReceiver = (receiver: ApiReceiver): ReceiverDetails => ({
// TODO: withdrawn amount
withdrawnAmount: "",
})),
verifications: receiver.verifications.map((v) => ({
verificationField: v.verification_field,
value: v.hashed_value,
confirmedAt: v.confirmed_at,
})),
verifications:
receiver.verifications?.map((v) => ({
verificationField: v.verification_field,
value: v.hashed_value,
confirmedAt: v.confirmed_at,
})) || [],
});

0 comments on commit 5991162

Please sign in to comment.