Skip to content

Commit ce89c44

Browse files
authored
Merge pull request #128 from thefifthdev/issue-4-auth-check
Fix #4: Add subscriber auth check to charge_subscription
2 parents 6f74469 + dbf484a commit ce89c44

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

contracts/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,8 @@ impl SubTrackrContract {
337337
.get(&DataKey::Subscription(subscription_id))
338338
.expect("Subscription not found");
339339

340+
sub.subscriber.require_auth();
341+
340342
assert!(
341343
sub.status == SubscriptionStatus::Active,
342344
"Subscription not active"

0 commit comments

Comments
 (0)