Skip to content

Commit

Permalink
fix: use Utils
Browse files Browse the repository at this point in the history
  • Loading branch information
bertux committed Feb 22, 2022
1 parent 71cdf57 commit 8f2967a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/payment-detection/src/erc777/superfluid-retriever.ts
@@ -1,5 +1,6 @@
import { PaymentTypes } from '@requestnetwork/types';
import { utils } from 'ethers';
import { utils as ethersUtils } from 'ethers';
import Utils from '@requestnetwork/utils';
import { FlowUpdatedEvent } from '../thegraph/generated/graphql-superfluid';
import {
getTheGraphSuperfluidClient,
Expand Down Expand Up @@ -38,7 +39,7 @@ export class SuperFluidInfoRetriever {

private getGraphVariables(): GraphPaymentQueryParams {
return {
reference: utils.keccak256(`0x${this.paymentReference}`),
reference: ethersUtils.keccak256(`0x${this.paymentReference}`),
to: this.toAddress,
tokenAddress: this.tokenContractAddress,
};
Expand All @@ -65,7 +66,7 @@ export class SuperFluidInfoRetriever {
streamEvents.push({
oldFlowRate: streamEvents[streamEvents.length - 1].flowRate,
flowRate: 0,
timestamp: Math.floor(Date.now() / 1000),
timestamp: Utils.getCurrentTimestampInSecond(),
blockNumber: null,
transactionHash: null,
} as FlowUpdatedEvent);
Expand Down

0 comments on commit 8f2967a

Please sign in to comment.