Skip to content

Commit

Permalink
Minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
wensihao123 committed Aug 30, 2019
1 parent 0d728ef commit 05c38cc
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 13 deletions.
4 changes: 0 additions & 4 deletions src/DynamoUtil.test.ts
Expand Up @@ -1787,7 +1787,6 @@ const currentRoundInfo = {
};

test('getInlineWarrantCurrentInfoByAccount', async () => {
DynamoUtil.getUTCNowDateString = jest.fn(() => moment.utc(1500000000000).format('YYYY-MM-DD'));
dynamoUtil.queryData = jest.fn(() =>
Promise.resolve({
Count: 1,
Expand Down Expand Up @@ -1838,6 +1837,3 @@ test('getUTCNowTimestamp', () => {
expect(DynamoUtil.getUTCNowTimestamp()).toBeGreaterThan(0);
})

test('getUTCNowDateString', () => {
expect(DynamoUtil.getUTCNowDateString()).toHaveLength(10);
})
10 changes: 1 addition & 9 deletions src/DynamoUtil.ts
Expand Up @@ -773,11 +773,7 @@ export class DynamoUtil {
txHash: item.transactionHash.S,
status: CST.DB_PENDING
};
if (
moment.utc(Number(item.updateAt.S)).format('YYYY-MM-DD') ===
DynamoUtil.getUTCNowDateString()
)
records.push(entry);
records.push(entry);
}
records.sort((a, b) => a.date - b.date);
return records;
Expand Down Expand Up @@ -831,10 +827,6 @@ export class DynamoUtil {
public static getUTCNowTimestamp() {
return moment().valueOf();
}

public static getUTCNowDateString() {
return moment.utc().format('YYYY-MM-DD');
}
}

export default DynamoUtil;

0 comments on commit 05c38cc

Please sign in to comment.