JoinColony / colonyCDapp

An iteration of the Colony Dapp sporting both a fully decentralized operating mode, as well as a mode enhanced by a metadata caching layer
5 stars 13 forks source link

fix: delete old bank account only _after_ creating a new one #3184

Open chmanie opened 4 days ago

chmanie commented 4 days ago

Description

This PR fixes the bug where bank accounts where deleted before a new one was created, resulting in deleting all bank accounts when there was an error.

It's done by first getting all bank accounts for that customer, then creating a new account, then deleting all of the old ones (most of the time that should be just a single one).

Testing

Testing this is hard, so bring some time.

Diffs

New stuff

Changes 🏗

Resolves #2963