File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -543,7 +543,7 @@ def filter_fn(activity):
543543 def _activity_add_description (self , act ):
544544 act ['description' ] = f"{ act ['type' ]} : { act ['subType' ]} "
545545
546- if act ['type' ] == 'INTERNAL_TRANSFER' :
546+ if act ['type' ] == 'INTERNAL_TRANSFER' or act [ 'type' ] == 'ASSET_MOVEMENT' :
547547 accounts = self .get_accounts (False )
548548 matching = [acc for acc in accounts if acc ['id' ] == act ['opposingAccountId' ]]
549549 target_account = matching .pop () if matching else None
@@ -552,10 +552,8 @@ def _activity_add_description(self, act):
552552 if target_account else
553553 act ['opposingAccountId' ]
554554 )
555- if act ['subType' ] == 'SOURCE' :
556- act ['description' ] = f"Transfer out: Transfer to Wealthsimple { account_description } "
557- else :
558- act ['description' ] = f"Transfer in: Transfer from Wealthsimple { account_description } "
555+ direction = 'to' if act ['subType' ] == 'SOURCE' else 'from'
556+ act ['description' ] = f"Money transfer: { direction } Wealthsimple { account_description } "
559557
560558 elif act ['type' ] in ['DIY_BUY' , 'DIY_SELL' ]:
561559 verb = act ['subType' ].replace ('_' , ' ' ).capitalize ()
You can’t perform that action at this time.
0 commit comments