Skip to content

Commit af3506c

Browse files
committed
Refactors use of Timestamp tag to Round-Timestamp
1 parent a32f5ff commit af3506c

1 file changed

Lines changed: 13 additions & 11 deletions

File tree

src/staking-rewards/staking-rewards.service.ts

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
1-
import { Inject, Injectable, Logger, LoggerService, } from '@nestjs/common'
2-
import { AosSigningFunction, sendAosMessage } from '../util/send-aos-message'
3-
import { createEthereumDataItemSigner } from '../util/create-ethereum-data-item-signer'
1+
import { Injectable, Logger } from '@nestjs/common'
2+
import {
3+
AosSigningFunction,
4+
sendAosDryRun,
5+
sendAosMessage
6+
} from '../util/send-aos-message'
7+
import {
8+
createEthereumDataItemSigner
9+
} from '../util/create-ethereum-data-item-signer'
410
import { ethers, Wallet } from 'ethers'
511
import _ from 'lodash'
612
import { EthereumSigner } from '../util/arbundles-lite'
@@ -115,13 +121,9 @@ export class StakingRewardsService {
115121

116122
public async getLastSnapshot(): Promise<RoundSnapshot | undefined> {
117123
try {
118-
const { result } = await sendAosMessage({
124+
const { result } = await sendAosDryRun({
119125
processId: this.stakingRewardsProcessId,
120-
signer: this.signer as any, // NB: types, lol
121-
tags: [
122-
{ name: 'Action', value: 'Last-Snapshot' },
123-
{ name: 'Timestamp', value: Date.now().toString() },
124-
],
126+
tags: [ { name: 'Action', value: 'Last-Snapshot' } ]
125127
})
126128

127129
if (!result.Error) {
@@ -144,7 +146,7 @@ export class StakingRewardsService {
144146
signer: this.signer as any, // NB: types, lol
145147
tags: [
146148
{ name: 'Action', value: 'Add-Scores' },
147-
{ name: 'Timestamp', value: stamp.toString() },
149+
{ name: 'Round-Timestamp', value: stamp.toString() },
148150
],
149151
data: JSON.stringify({
150152
Scores: scores,
@@ -182,7 +184,7 @@ export class StakingRewardsService {
182184
signer: this.signer as any, // NB: types, lol
183185
tags: [
184186
{ name: 'Action', value: 'Complete-Round' },
185-
{ name: 'Timestamp', value: stamp.toString() },
187+
{ name: 'Round-Timestamp', value: stamp.toString() },
186188
],
187189
data: JSON.stringify({})
188190
})

0 commit comments

Comments
 (0)