Skip to content

Commit f4f69df

Browse files
authored
Merge pull request #2804 from nervosnetwork/testnet
Deploy to mainnet
2 parents 3afef8d + babea68 commit f4f69df

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

app/models/ckb_sync/new_node_data_processor.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ def process_withdraw_dao_events!(local_block, dao_contract)
225225
end
226226
if addrs_withdraw_info[address.id][:dao_deposit] == 0
227227
addrs_withdraw_info[address.id][:is_depositor] = false
228+
addrs_withdraw_info[address.id][:unclaimed_compensation] = address.cal_unclaimed_compensation
228229
end
229230

230231
updated_deposit_dao_events_attributes << { block_id: previous_cell_output.block_id,
@@ -292,6 +293,11 @@ def process_interest_dao_events!(local_block, dao_contract)
292293
interest: address.interest.to_i + interest,
293294
}
294295
end
296+
297+
unless address.is_depositor
298+
addrs_withdraw_info[address.id][:unclaimed_compensation] = 0
299+
end
300+
295301
updated_withdraw_dao_events_attributes << { block_id: previous_cell_output.block_id,
296302
ckb_transaction_id: previous_cell_output.ckb_transaction_id,
297303
cell_index: previous_cell_output.cell_index,
@@ -393,6 +399,7 @@ def update_addresses_dao_info(addrs_deposit_info)
393399
dao_deposit: address_info[:dao_deposit],
394400
interest: address_info[:interest],
395401
is_depositor: address_info[:is_depositor],
402+
unclaimed_compensation: address_info[:unclaimed_compensation]
396403
}
397404
end
398405
if addresses_deposit_attributes.present?

0 commit comments

Comments
 (0)