Skip to content

Commit

Permalink
change landlineaccount createdAt to string for backcompat
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewliu08 committed Sep 5, 2024
1 parent 04318bc commit 700ca88
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 5 additions & 1 deletion packages/daimo-api/src/landline/connector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,11 @@ export async function getLandlineAccounts(
daimoAddress,
});
console.log(`[LANDLINE] got external accounts for ${daimoAddress}`);
return landlineAccounts;
// TODO: change to number. Currently a string for backcompat
return landlineAccounts.map((account: any) => ({
...account,
createdAt: new Date(account.createdAt).toISOString(),
}));
} catch (err: any) {
console.error(
`[LANDLINE] error getting external accounts for ${daimoAddress}`,
Expand Down
3 changes: 2 additions & 1 deletion packages/daimo-common/src/landline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ export interface LandlineAccount {
liquidationAddress: Address;
liquidationChain: string;
liquidationCurrency: string;
createdAt: number;
// TODO: change to number. Currently a string for backcompat
createdAt: string;
}

export enum LandlineTransferStatus {
Expand Down

0 comments on commit 700ca88

Please sign in to comment.