Skip to content

Commit

Permalink
Remove nil error for sending addresses through pCDN
Browse files Browse the repository at this point in the history
  • Loading branch information
tsmartt committed Jul 9, 2024
1 parent d6ced0d commit 51eb93d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/jobs/cache/browser_channels/responses_for_prefix.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def generate_brotli_encoded_channel_response(prefix:)
if connection.valid_country?
uphold_address = site_banner_lookup.channel&.uphold_connection&.address || ""
print site_banner_lookup.channel_identifier
uphold_wallet.address = payable ? uphold_address : ""
uphold_wallet.address = payable ? (uphold_address || "") : ""
else
uphold_wallet.address = ""
LogException.perform("Wallet outside of allowed. Country: #{connection.country} Id: #{connection.id} Publisher #{site_banner_lookup.publisher.id}", expected: true)
Expand All @@ -56,7 +56,7 @@ def generate_brotli_encoded_channel_response(prefix:)
bitflyer_wallet = PublishersPb::BitflyerWallet.new
connection = site_banner_lookup.publisher.bitflyer_connection
bitflyer_wallet.wallet_state = get_bitflyer_wallet_state(bitflyer_connection: connection)
bitflyer_wallet.address = payable ? site_banner_lookup.channel.deposit_id : ""
bitflyer_wallet.address = payable ? (site_banner_lookup.channel.deposit_id || "" ) : ""

wallet.bitflyer_wallet = bitflyer_wallet
channel_response.wallets.push(wallet)
Expand All @@ -69,7 +69,7 @@ def generate_brotli_encoded_channel_response(prefix:)

if connection.valid_country?
gemini_address = site_banner_lookup.channel&.gemini_connection&.recipient_id || ""
gemini_wallet.address = payable ? gemini_address : ""
gemini_wallet.address = payable ? (gemini_address || "") : ""
end

wallet.gemini_wallet = gemini_wallet
Expand Down

0 comments on commit 51eb93d

Please sign in to comment.