This repository was archived by the owner on Mar 28, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 284
Add price and listingType fields to order websocket notification #1223
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Final example of order websocket notification:
|
tyler-smith
suggested changes
Oct 17, 2018
cpacia
suggested changes
Oct 18, 2018
a6344b8
to
095c8ef
Compare
placer14
commented
Oct 23, 2018
|
||
// DefaultCurrencyDivisibility is the Divisibility of the Currency if not | ||
// defined otherwise | ||
const DefaultCurrencyDivisibility uint32 = 1e8 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left this here. Hope no one minds.
placer14
commented
Oct 23, 2018
if wallet, err := n.Multiwallet.WalletForCurrencyCode(listing.Metadata.CoinType); err != nil { | ||
expectedDivisibility = DefaultCurrencyDivisibility | ||
} else { | ||
expectedDivisibility = uint32(wallet.ExchangeRates().UnitsPerCoin()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be nice if UnitsPerCoin matched types with the listing data. (OpenBazaar/wallet-interface#9)
placer14
commented
Oct 23, 2018
if err == nil { | ||
return uint32(wallet.ExchangeRates().UnitsPerCoin()) | ||
} | ||
return core.DefaultCurrencyDivisibility |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer divisibility from listing, then check wallet's preference, then fail to default as a last resort.
* multiwallet: (49 commits) Improve README: fix grammar Update out_of_inventory.py test Update market_price_modifier.py test Update manage_crypto_listings.py test Update listings.py test Update fulfill_direct_online.py test Update escrow_release_after_timeout.py test Update dispute_close_split.py test Update dispute_close_buyer.py test Update complete_moderated_with_timeout.py test Update complete_moderated_online.py Update complete_disputed.py Update complete_direct_online.py Update cancel_direct.py test Fix bug in ResyncManager [#1204] Remove unused package CLEANUP: Fix misspellings. Update btcrpcclient link [#1004] Isolate dependencies in repo/db/stxo_test.go improved README ... Conflicts: core/listings_test.go
* multiwallet: Log error adding key to peerstore Update bitcoin/listeners/transaction_listener.go Improved grammar and fixed capitalization in the main README file. Fix bug calculating crypto listing market price Update remaining qa tests Remove arch requirement on make ios_framework task Lint fixes after merging latest master into multiwallet Fixed import error Update Documentation section (PR #1252) Remove unused Python modules in qa/chat.py HandleOfflineRelay save public key
LGTM |
cpacia
approved these changes
Oct 30, 2018
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Completes #1188. New fields in
order
websocket notification.