diff --git a/release b/release index 307be0d..ab722a7 100644 --- a/release +++ b/release @@ -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` diff --git a/src/lib/card.ts b/src/lib/card.ts index 9870baa..2afad00 100644 --- a/src/lib/card.ts +++ b/src/lib/card.ts @@ -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) => { diff --git a/src/models/card/transaction.ts b/src/models/card/transaction.ts index 133d5a4..b13cc32 100644 --- a/src/models/card/transaction.ts +++ b/src/models/card/transaction.ts @@ -1,8 +1,11 @@ export interface CardTransaction { + id: string; summary: string; timestamp: Date; balance: number; amount: number; + address: string; + name: string; } export enum CardTransactionType {