Skip to content

Commit 4824f2b

Browse files
committed
Fix the detailed description for subdivision txn
1 parent 9de7320 commit 4824f2b

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

ws_api/wealthsimple_api.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,8 +488,11 @@ def _activity_add_description(self, act):
488488
held_activity = next((activity for activity in child_activities if activity['entitlementType'] == 'HOLD'), None)
489489
receive_activity = next((activity for activity in child_activities if activity['entitlementType'] == 'RECEIVE'), None)
490490
if held_activity and receive_activity:
491+
held_shares: float = float(held_activity['quantity'])
492+
received_shares: float = float(receive_activity['quantity'])
493+
total_shares: float = held_shares + received_shares
491494
act['description'] = (
492-
f"Subdivision: {held_activity['quantity']} -> {receive_activity['quantity']} shares of {act['assetSymbol']}"
495+
f"Subdivision: {held_shares} -> {total_shares} shares of {act['assetSymbol']}"
493496
)
494497
else:
495498
act['description'] = f"Subdivision: Received {act['amount']} shares of {act['assetSymbol']}"

0 commit comments

Comments
 (0)