Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,6 @@ gem "yt", "~> 0.33"
gem "zeitwerk", "~> 2.6"
gem "zendesk_api", "~> 3.1.0"

# gem "activerecord-nulldb-adapter", git: "https://github.com/taylorthurlow/nulldb", branch: "fix/activerecord72-register-adapter"

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem "tzinfo-data", platforms: [:mingw, :mswin, :x64_mingw, :jruby]

Expand Down
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 @@ -159,12 +159,12 @@ def get_site_banner_details(site_banner_lookup)
details[key.underscore] = value
end

public_id = site_banner_lookup.channel.public_identifier
public_id = site_banner_lookup.channel.web3_subdirectory
include_web3 = (site_banner_lookup.channel.crypto_address_for_channels.length > 0) && public_id
details.web3_url = include_web3 ? "#{ENV["CREATORS_HOST"]}/c/#{public_id}" : ""
web3_address = include_web3 ? "#{ENV["CREATORS_HOST"]}/c/#{public_id}" : ""

# ENV host variables serve various purposes, some will begin with https and some wont
details.web3_url.start_with?("https://") ? details.web3_url : "https://#{details.web3_url}"
details.web3_url = (!include_web3 || web3_address.start_with?("https://")) ? web3_address : "https://#{web3_address}"

if site_banner_lookup.derived_site_banner_info["socialLinks"].present?
social_links_pb = nil
Expand Down
4 changes: 4 additions & 0 deletions app/models/channel.rb
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,10 @@ def set_public_identifier!
save!
end

def web3_subdirectory
public_name || public_identifier
end

def failed_verification_details
return if verified? || details_type != "SiteChannelDetails"
case verification_details
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ def self.test_order
assert service.temp_file.present?
result = Brotli.inflate(File.open(service.temp_file.path, "rb").readlines.join("").slice(4..-1))
result = PublishersPb::ChannelResponseList.decode(result)

assert_equal result.channel_responses[0].wallets[0].gemini_wallet.address, channel.gemini_connection_for_channel.first.recipient_id
assert_equal result.channel_responses[0].channel_identifier, channel.details.channel_identifier
assert_equal result.channel_responses[0].site_banner_details.web3_url, ""
Expand Down
Loading