From 56b19040f6e24157185a7cdac583c5ef49fa9597 Mon Sep 17 00:00:00 2001 From: Cory McDonald Date: Fri, 4 Oct 2019 16:02:14 -0500 Subject: [PATCH] Update Channel ID when a channel is being transferred (#2285) * Update Channel ID when a channel is being transferred or re-added after being deleted * Update app/jobs/create_uphold_channel_card_job.rb Co-Authored-By: Albert Wang --- app/jobs/create_uphold_channel_card_job.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/jobs/create_uphold_channel_card_job.rb b/app/jobs/create_uphold_channel_card_job.rb index a354f14f45..4f18d35e23 100644 --- a/app/jobs/create_uphold_channel_card_job.rb +++ b/app/jobs/create_uphold_channel_card_job.rb @@ -23,6 +23,8 @@ def perform(uphold_connection_id:, channel_id:) upfc.update( address: get_address(uphold_connection, card_id), card_id: card_id, + # It's possible a channel can be removed, so this covers re-linking an existing UCFC to the re-added channel. + channel_id: channel_id, uphold_id: uphold_connection.uphold_id ) end