Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NT-649] Errored pledges query #981

Merged
merged 10 commits into from
Dec 9, 2019
Merged

Conversation

Scollaco
Copy link
Contributor

@Scollaco Scollaco commented Dec 5, 2019

📲 What

  • Adds a query to fetch errored pledges from graphQL.

🤔 Why

  • We need this query to show a list of errored pledges on the ActivitiesViewController and allow users to fix them.

🛠 How

  • Created a new model GraphBacking
  • Added the required fields on the GraphSchema
  • Added output on ActivityViewModel that emits the list of errored pledges
  • Added tests

JIRA ticket

✅ Acceptance criteria

Testing with Charles

  • Open the app and tap the Activity tab. A list of errored backings (if any), should be visible on the response.

If there's no errored pledges

  • Add a breakpoint to intercept the response once the ActivitiesViewController is open and change the status of backings to errored. The erroredBackings output on ActivitiesViewModel should emit a list with the errored pledges.

@Scollaco Scollaco changed the title Nt 649 errored pledges query [NT-649] Errored pledges query Dec 5, 2019
Copy link
Contributor

@justinswart justinswart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool lgtm, had minor comments!

}
}
"""
let data = jsonString.data(using: .utf8)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we use the non-failable Data initializer then we don't need to force-unwrap later on:

let data = Data(jsonString.utf8)

public var slug: String
}

public enum Status: String, CaseIterable, Swift.Decodable {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see the back-end also has a status authentication_required 🤔

@Scollaco Scollaco merged commit 7c5efa8 into master Dec 9, 2019
@Scollaco Scollaco deleted the NT-649_errored-pledges-query branch December 9, 2019 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants