@@ -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