Skip to content
This repository has been archived by the owner on Sep 24, 2023. It is now read-only.

Commit

Permalink
fix: add missing fields id, address, name for interface `CardTr…
Browse files Browse the repository at this point in the history
…ansaction`
  • Loading branch information
UNIDY2002 committed Aug 11, 2023
1 parent 0192758 commit 44342e3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
3 changes: 2 additions & 1 deletion release
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
fix(card): Fixed wechat payment and changed return value of card charge (#97)
fix: add controller flag for whether card recharging is supported
fix: add missing fields `id`, `address`, `name` for interface `CardTransaction`
5 changes: 4 additions & 1 deletion src/lib/card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,14 @@ export const cardGetTransactions = async (
});

return rawTransactionsData.rows.map((rawTransaction: any) => ({
id: rawTransaction.id,
summary: rawTransaction.summary,
timestamp: new Date(rawTransaction.txdate),
balance: rawTransaction.balance / 100,
amount: rawTransaction.txamt / 100,
}));
address: rawTransaction.meraddr,
name: rawTransaction.mername,
} as CardTransaction));
};

export const cardChangeTransactionPassword = async (helper: InfoHelper, oldPassword: string, newPassword: string) => {
Expand Down
3 changes: 3 additions & 0 deletions src/models/card/transaction.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
export interface CardTransaction {
id: string;
summary: string;
timestamp: Date;
balance: number;
amount: number;
address: string;
name: string;
}

export enum CardTransactionType {
Expand Down

0 comments on commit 44342e3

Please sign in to comment.