Skip to content
  • Florent Viard's avatar
    [boursorama] Fixes succesful recipient additions that results in "Recipient not found" errors · 0b884402
    Florent Viard authored and hydrargyrum's avatar hydrargyrum committed
    When adding recipients, sometimes the process would successfully go to
    completion but an error "Recipient not found" would be raised at the
    final check.
    (ie when we check that the newly added recipient is inside the
    recipients list)
    
    The origin of the problem is that on Boursorama side, the recipient list
    is global for all accounts.
    But for some accounts, the recipient list is prefixed (ex. saving
    accounts) or transfer is not allowed (ex. market accounts).
    
    Before, the "origin" account that was used to add the recipient was
    selected in a random way as "the first account retrieved by
    get_accounts".
    This was not good as, randomly, an unusable account could have been
    selected, like saving accounts.
    
    Boobank does not select an origin_account_id, but if it is the case, we
    also have to ensure that the account is valid to add the recipient.
    And so, avoid to fail in an unexpected way.
    0b884402