From cf18cda7cb55bc81087eb268b5727e3e6e5c4e47 Mon Sep 17 00:00:00 2001 From: frank <98238480+soundsonacid@users.noreply.github.com> Date: Tue, 23 Jan 2024 10:55:35 -0800 Subject: [PATCH] fix referrer info (#28) * fix: referrer info --- python/sdk/jit_proxy/jitter/base_jitter.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/python/sdk/jit_proxy/jitter/base_jitter.py b/python/sdk/jit_proxy/jitter/base_jitter.py index f270202..79d93d8 100644 --- a/python/sdk/jit_proxy/jitter/base_jitter.py +++ b/python/sdk/jit_proxy/jitter/base_jitter.py @@ -10,7 +10,7 @@ from driftpy.types import is_variant, UserAccount, Order, UserStatsAccount, ReferrerInfo from driftpy.drift_client import DriftClient from driftpy.auction_subscriber.auction_subscriber import AuctionSubscriber -from driftpy.addresses import get_user_stats_account_public_key +from driftpy.addresses import get_user_stats_account_public_key, get_user_account_public_key from driftpy.math.orders import has_auction_price from driftpy.math.conversion import convert_to_number @@ -204,8 +204,12 @@ def get_referrer_info( return None else: return ReferrerInfo( - taker_stats.referrer, + get_user_account_public_key( + self.drift_client.program_id, # type: ignore + taker_stats.referrer, + 0 + ), get_user_stats_account_public_key( - self.drift_client.program_id, taker_stats.referrer + self.drift_client.program_id, taker_stats.referrer # type: ignore ), )