Skip to content

Commit

Permalink
Updated customer metadata when updating to use bank account (#5050)
Browse files Browse the repository at this point in the history
  • Loading branch information
cturnbull-bitwarden authored Nov 20, 2024
1 parent 5227ee7 commit 77cde50
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -768,8 +768,9 @@ private async Task RemoveBraintreeCustomerIdAsync(
{
var metadata = customer.Metadata ?? new Dictionary<string, string>();

if (metadata.ContainsKey(BraintreeCustomerIdKey))
if (metadata.TryGetValue(BraintreeCustomerIdKey, out var value))
{
metadata[BraintreeCustomerIdOldKey] = value;
metadata[BraintreeCustomerIdKey] = null;

await stripeAdapter.CustomerUpdateAsync(customer.Id, new CustomerUpdateOptions
Expand Down

0 comments on commit 77cde50

Please sign in to comment.