linter.
This commit is contained in:
parent
080d44fbc7
commit
b19740389d
|
@ -9,7 +9,10 @@ export function handleAllocated(event: Allocated): void {
|
|||
// loop all allocations
|
||||
const token = getToken(event.params.tokenAddress, false)
|
||||
for (let i = 0; i < event.params.tos.length; i++) {
|
||||
const reward = getDFReward(event.params.tos[i], event.transaction.hash.toHex())
|
||||
const reward = getDFReward(
|
||||
event.params.tos[i],
|
||||
event.transaction.hash.toHex()
|
||||
)
|
||||
|
||||
const history = new DFHistory(
|
||||
event.params.tos[i].toHexString() +
|
||||
|
@ -61,7 +64,11 @@ export function handleClaimed(event: Claimed): void {
|
|||
history.save()
|
||||
|
||||
// update available claims
|
||||
const claim = getDFAvailableClaim(event.params.to, event.params.tokenAddress, event.transaction.hash.toHex())
|
||||
const claim = getDFAvailableClaim(
|
||||
event.params.to,
|
||||
event.params.tokenAddress,
|
||||
event.transaction.hash.toHex()
|
||||
)
|
||||
claim.amount = claim.amount.minus(history.amount)
|
||||
claim.save()
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ export function getDFReward(address: Address, txId: String): DFReward {
|
|||
export function getDFAvailableClaim(
|
||||
user: Address,
|
||||
token: Address,
|
||||
txId: String,
|
||||
txId: String
|
||||
): DFAvailableClaim {
|
||||
const id = user.toHexString() + '-' + token.toHexString()
|
||||
let dfClaim = DFAvailableClaim.load(id)
|
||||
|
|
Loading…
Reference in New Issue