Skip to content
This repository has been archived by the owner on Aug 1, 2024. It is now read-only.

Commit

Permalink
Merge pull request #7 from Arunshaik2001/arun/optimising_gy_did_purch…
Browse files Browse the repository at this point in the history
…ase_product

Small Improvement: optimising gy_did_purchase_product method handler
  • Loading branch information
lgarbo authored Nov 15, 2023
2 parents 6950c50 + 8b2ec82 commit 463f5ba
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/glassfy_flutter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ class Glassfy {
..setMethodCallHandler((call) async {
switch (call.method) {
case 'gy_did_purchase_product':
for (final listener in _didPurchaseListenerListeners) {
try {
final transaction =
GlassfyTransaction.fromJson(jsonDecode(call.arguments));
try{
final transaction =
GlassfyTransaction.fromJson(jsonDecode(call.arguments));
for (final listener in _didPurchaseListenerListeners) {
listener(transaction);
} catch (e) {
debugPrint("Invalid didPurchaseListner Argument");
}
} catch(e){
debugPrint("Invalid didPurchaseListner Argument");
}
break;
}
Expand Down

0 comments on commit 463f5ba

Please sign in to comment.