Skip to content
This repository has been archived by the owner on May 16, 2019. It is now read-only.

Changes logic to handle both upper and lower case on all dispute mess… #1834

Merged
merged 1 commit into from
Nov 17, 2016

Conversation

jjeffryes
Copy link
Contributor

…ages from the server.

  • this was already done in some cases, now it's done everywhere
  • TODO: investigate if the previous instances of handling upper and lower cases were because the server was inconsistent. If that's the case, the server should be updated to always use the same case.

…ages from the server.

- this was already done in some cases, now it's done everywhere
- TODO: investigate if the previous instances of handling upper and lower cases were because the server was inconsistent. If that's the case, the server should be updated to always use the same case.
@@ -13,7 +13,7 @@
<%= polyglot.t('NotificationOrderConfirmed') %>
</div>
<div class="textSize11px floatLeft txt-fade"><%= ob.moment(new Date(ob.timestamp*1000)).locale(window.lang).format('MMM D, h:mm A') %></div>
<% } else if(ob.type == "dispute_close") { %>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same concern as on the other PR. If indeed the server is inconsistently sending types with different case, then the bug should be on the server. IMHO, it's poor practice to complicate a client code base to account for fixable defects in the server.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think the server currently only sends upper case, handling lower case was left in because it was there before, and I didn't want to add a new bug in the 1.1.9 release.

case "dispute_open":
Backbone.history.navigate('#transactions/purchases/' + this.model.get('order_id'), {trigger: true});
break;
case "dispute_close":
Copy link
Collaborator

Choose a reason for hiding this comment

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

In the server ticket, I would also request consistency in format beyond case. For example, some types have underscores for spaces (dispute_close) whereas others use actual spaces (new order).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That would be good, the messages don't have much consistency.

@jjeffryes
Copy link
Contributor Author

A server issue for the data inconsistency has been posted. OpenBazaar/OpenBazaar-Server#506

@jjeffryes jjeffryes merged commit 426ff10 into master Nov 17, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants