Skip to content

Commit

Permalink
auto default
Browse files Browse the repository at this point in the history
  • Loading branch information
ap-justin committed Dec 11, 2023
1 parent af405fb commit cd347ab
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
6 changes: 5 additions & 1 deletion src/pages/Admin/Charity/PayoutMethods/List/Table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,14 @@ function SetDefaultBtn({
thisPriorityNum,
topPriorityNum,
}: PayoutMethod) {
const APPROVED_PRIORITY_NUM = 2;
const [update] = useUpdateBankingApplicationMutation();

if (status !== "approved") return <></>;
if (thisPriorityNum === topPriorityNum && topPriorityNum !== 0)
if (
topPriorityNum === thisPriorityNum &&
topPriorityNum !== APPROVED_PRIORITY_NUM
)
return <>default</>;

return (
Expand Down
4 changes: 2 additions & 2 deletions src/pages/Admin/Charity/PayoutMethods/PayoutMethods.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ export default function PayoutMethods() {
onClick={async () => {
await newApplication({
wiseRecipientID: window.crypto.randomUUID(),
bankAccountNumber: "3321",
bankName: "No coiners fiat bank",
bankAccountNumber: "1231",
bankName: "Solana 10dPERyear",
endowmentID: 32,
payoutCurrency: "USD",
bankStatementFile: {
Expand Down
2 changes: 1 addition & 1 deletion src/types/aws/ap/applications.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ type BaseBankingApplication = {
export type NewBankingApplication = BaseBankingApplication;

export type BankingApplication = {
topPriorityNum: number;
topPriorityNum?: number;
thisPriorityNum: number;
status: BankingApplicationStatus;
dateCreated: string; //ISODateString
Expand Down

0 comments on commit cd347ab

Please sign in to comment.