Skip to content

Commit

Permalink
Use the concept of orders instead of swaps (#623)
Browse files Browse the repository at this point in the history
* [started #615] use-the-concept-of-orders-instead-of-swaps

* debug

* - Add new format-order-data file
- Add some unit test

* db: rename swaps2 to orders2

* api: Add myOrders method

* api: Add cancelAllOrders method

* orders data: update type of order

* db: Add removeOrder method in DB

* add formatOrder and formatSwap data

* test case: taker order is filled in 30s

* test case: maker order can has mutil swaps

* test case: maker order is filled

* swaplist: fix order css

* swap-db.js: remove getSwapCount func and add getOrdersCount

* Order: cancel all pair orders before create a new one

* Dashboard: update  ActivityList

* fix bug: swap not found

* ui: update swap Detail modal

* ui: update SwapList

* remove unused file

* fix #5: steps of swap show wrong amount

* fix #6: add cancel button for open order

* fix #4: trade history shows ongoing trade as completed

* fix #15: replace CHIPS with BTC as always-enabled-coin

* fix #3 sort orders based on price

* fix #9 trade history shows cancelled orders as completed

* fix #18: replace todo text when restoring seed phrase

* fix #13 update HUSH

* fix #13 rename InstantDEX to DEX

* fix #13 add BET

* fix #13 disable BET

* fix #12 disabling a coin should be possible again

* fix #17 ERC20 swaps give wrong error when ETH funds lack

* remove annoying log

* add base variable

* fix #19 order not cancellable, not in mm2.0 response but still visible

* fix #27 withdraw confirmation screen shows wrong information

* fix #28 withdraw full balance not working

* fix #22 clicking Price in orderbook section populates a too high buy Price

* add BET

* add HODL, disable HODLC

* add HUSH

* add preliminary MGW support

* let nonofficial mm2 coins still be enabled through electrum

* enable MGW, add COMMOD

* add LABS

* add BUSD, GIN, USDC

* re-enable OOT

* update VRSC daemons

* remove dead GIN electrum

* remove dead coins (#34)

Co-authored-by: Jorian <[email protected]>
  • Loading branch information
particle4dev and jorian authored Feb 26, 2020
1 parent abb973e commit 2f769f0
Show file tree
Hide file tree
Showing 27 changed files with 1,353 additions and 670 deletions.
11 changes: 7 additions & 4 deletions app/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,14 @@ exports.appViews = [
];

exports.defaultEnabledCurrencies = [
'BTC',
'KMD',
'CHIPS',
'DOGE',
'KMD',
'MORTY',
'RICK',
'SUPERNET',

'ETH',
// These are left out for now.
// TODO: Revise this list when HyperDEX is more mature.
// 'BCH',
Expand All @@ -47,8 +48,8 @@ exports.defaultEnabledCurrencies = [
];

exports.alwaysEnabledCurrencies = [
'KMD',
'CHIPS',
'BTC',
'KMD'
];

exports.ignoreExternalPrice = new Set([
Expand All @@ -57,6 +58,8 @@ exports.ignoreExternalPrice = new Set([
'REVS',
'RICK',
'SUPERNET',
"BET",
"HODL",
]);

exports.hiddenCurrencies = [];
Expand Down
3 changes: 3 additions & 0 deletions app/locales/en-US/swap.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
"title": "Swap",
"details": {
"broadcast": "Broadcast",
"maker": "Maker",
"taker": "Taker",
"buy": "Buy",
"copyDebugData": "Copy Swap Debug Data",
"exchanging": "Exchanging",
Expand Down Expand Up @@ -55,6 +57,7 @@
"reverted": "Reverted",
"pending": "Pending",
"open": "Open",
"active": "Open",
"unmatched": "Unmatched",
"cancelled": "Cancelled"
},
Expand Down
4 changes: 4 additions & 0 deletions app/marketmaker/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,11 @@ class Marketmaker {
...options,
gui: 'hyperdex',
userhome: os.homedir(),

netid: 9999, // TODO: Set this to `0` when mm v2 is production ready
// netid: 2323,
// seednodes: ['35.173.213.220'],

rpcport: port,
rpccors: is.development ? 'http://localhost:8080' : 'app://-',
coins,
Expand Down
Loading

0 comments on commit 2f769f0

Please sign in to comment.