Skip to content

Commit

Permalink
address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
andymck committed Dec 11, 2023
1 parent 7a1475c commit 3f59243
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
5 changes: 2 additions & 3 deletions mobile_config/migrations/5_carrier_service.sql
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
create table carrier_keys (
pubkey text not null,
pubkey text primary key not null,
entity_key text not null,
created_at timestamptz not null default now(),
updated_at timestamptz not null default now(),
PRIMARY KEY(pubkey)
updated_at timestamptz not null default now()
);
6 changes: 3 additions & 3 deletions mobile_verifier/src/reward_shares.rs
Original file line number Diff line number Diff line change
Expand Up @@ -218,15 +218,15 @@ impl ServiceProviderShares {
payer_shares: HashMap<String, u64>,
client: &dyn CarrierServiceVerifier<Error = ClientError>,
) -> anyhow::Result<ServiceProviderShares> {
let mut shares = vec![];
let mut sp_shares = ServiceProviderShares::default();
for (payer, total_dcs) in payer_shares {
let service_provider = Self::payer_key_to_service_provider(&payer, client).await?;
shares.push(ServiceProviderDataSession {
sp_shares.shares.push(ServiceProviderDataSession {
service_provider,
total_dcs: Decimal::from(total_dcs),
})
}
Ok(ServiceProviderShares { shares })
Ok(sp_shares)
}

fn total_dc(&self) -> Decimal {
Expand Down
3 changes: 2 additions & 1 deletion reward_index/src/indexer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ pub enum RewardType {
IotGateway,
IotOperational,
MobileSubscriber,
MobileServiceProvider,
}

#[derive(Debug, Clone, PartialEq, Eq, Hash)]
Expand Down Expand Up @@ -157,7 +158,7 @@ impl Indexer {
Ok((
RewardKey {
key: sp.as_str_name().to_string(),
reward_type: RewardType::MobileSubscriber,
reward_type: RewardType::MobileServiceProvider,
},
r.amount,
))
Expand Down

0 comments on commit 3f59243

Please sign in to comment.