Skip to content

Commit 0fd7f96

Browse files
committed
fix: include unstake_all and withdraw_all events in user_activities view
1 parent d2dbc57 commit 0fd7f96

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sql_files/views/user_activities.sql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ WITH receipt_actions_prep AS (
3232
ON ra.receipt_id = eo.receipt_id
3333
WHERE
3434
ra.action_kind = 'FunctionCall'
35-
AND ra.method_name IN ('on_lockup_deployed', 'lock_near', 'on_lockup_update', 'delegate_all', 'undelegate', 'begin_unlock_near', 'lock_pending_near', 'withdraw_from_staking_pool', 'unstake')
35+
AND ra.method_name IN ('on_lockup_deployed', 'lock_near', 'on_lockup_update', 'delegate_all', 'undelegate', 'begin_unlock_near', 'lock_pending_near', 'withdraw_from_staking_pool', 'withdraw_all_from_staking_pool', 'unstake', 'unstake_all')
3636
)
3737
--------------------
3838
--Account Creation--
@@ -290,7 +290,7 @@ WITH receipt_actions_prep AS (
290290
, ra.block_hash
291291
FROM receipt_actions_prep AS ra
292292
WHERE
293-
ra.method_name = 'withdraw_from_staking_pool'
293+
ra.method_name IN ('withdraw_from_staking_pool', 'withdraw_all_from_staking_pool')
294294
AND SUBSTRING(ra.receiver_id FROM POSITION('.' IN ra.receiver_id) + 1) IN (
295295
'{VENEAR_CONTRACT_PREFIX}.{HOS_CONTRACT}'
296296
, '{VOTING_CONTRACT_PREFIX}.{HOS_CONTRACT}'
@@ -319,7 +319,7 @@ WITH receipt_actions_prep AS (
319319
, ra.block_hash
320320
FROM receipt_actions_prep AS ra
321321
WHERE
322-
ra.method_name = 'unstake'
322+
ra.method_name IN ('unstake', 'unstake_all')
323323
AND SUBSTRING(ra.receiver_id FROM POSITION('.' IN ra.receiver_id) + 1) IN (
324324
'{VENEAR_CONTRACT_PREFIX}.{HOS_CONTRACT}'
325325
, '{VOTING_CONTRACT_PREFIX}.{HOS_CONTRACT}'

0 commit comments

Comments
 (0)