BranchMetrics / unity-branch-deep-linking-attribution

The Branch Unity SDK for deep linking and attribution. Branch helps mobile apps grow with deep links / deeplinks that power paid acquisition and re-engagement campaigns, referral programs, content sharing, deep linked emails, smart banners, custom user onboarding, and more.
https://docs.branch.io/apps/unity/
MIT License
118 stars 25 forks source link

reference to incorrect keys in RewardsHistoryPanel.cs #82

Closed eps-git00 closed 7 years ago

eps-git00 commented 7 years ago

Looks like a cut and paste error in here. Uses of keys for "amount", "date" and "bucket" all check against a key of "type" rather than the correct key in RewardsHistoryPanel.cs, see items marked "WRONG KEY" in the snippet below:

    if (dict.ContainsKey("transaction")) {
        Dictionary<string, object> transactionDict = dict["transaction"] as Dictionary<string, object>;

        if (transactionDict != null) {
            if (transactionDict.ContainsKey("type") && transactionDict["type"] != null) {
                strRes += "type = " + transactionDict["type"].ToString();
            }

            if (transactionDict.ContainsKey("id") && transactionDict["id"] != null) {
                strRes += "  id = " + transactionDict["id"].ToString();
            }

// WRONG KEY!!! if (transactionDict.ContainsKey("type") && transactionDict["type"] != null) { strRes += " bucket = " + transactionDict["bucket"].ToString(); }

// WRONG KEY!!!
if (transactionDict.ContainsKey("type") && transactionDict["type"] != null) { strRes += " amount = " + transactionDict["amount"].ToString(); }

// WRONG KEY!!! if (transactionDict.ContainsKey("type") && transactionDict["type"] != null) { strRes += " date = " + transactionDict["date"].ToString(); } }

antonargunov commented 7 years ago

@eps-git00 , thank you for report! it will be fixed in the next version