New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add prefix response support for Gemini wallets #3237
Conversation
@@ -21,7 +21,7 @@ def perform(prefix) | |||
def generate_brotli_encoded_channel_response(prefix:) | |||
@site_banner_lookups = SiteBannerLookup.where("sha2_base16 LIKE ?", prefix + "%") | |||
channel_responses = PublishersPb::ChannelResponseList.new | |||
@site_banner_lookups.includes(publisher: :uphold_connection).includes(publisher: :paypal_connection).each do |site_banner_lookup| | |||
@site_banner_lookups.includes(publisher: [:uphold_connection, :bitflyer_connection, :gemini_connection, :paypal_connection]).each do |site_banner_lookup| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@site_banner_lookups.includes(publisher: [:uphold_connection, :bitflyer_connection, :gemini_connection, :paypal_connection]).each do |site_banner_lookup| | |
@site_banner_lookups.includes(publisher: [:uphold_connection, :bitflyer_connection, :gemini_connection]).each do |site_banner_lookup| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea! I had initially removed all paypal support from this PR, but reverted it since I wanted to keep the concepts separate. I want to put up a new PR that only removes Paypal support.
By the way this works using Just update the pcdn links and proto files:
|
Co-authored-by: Yachtcaptain23 <amwang217@gmail.com>
@@ -20,10 +20,28 @@ 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 result.channel_responses[0].wallets[0].uphold_wallet.address |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
assert result.channel_responses[0].wallets[0].uphold_wallet.address |
The next line already does a null check, so this isn't needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not a null check, it's an equality check. They could both be null.
Leaving as a note, the corresponding protobuf file change in brave-core is in https://github.com/brave/brave-core/blob/e618e80cc01c0de34f846e5eab01c0e094f6547e/vendor/bat-native-ledger/src/bat/ledger/internal/publisher/protos/channel_response.proto |
Thanks. PJ is working on incorporating the changes. |
We need to tell the browser which Gemini wallet a user has for direct deposits. We use the protobuf prefix responses for this, and this PR adds Gemini wallet support for that.
Closes brave-intl/creators-private-issues#278