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

WIP: 10 market module improvements #81

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
e6c23c0
Update README.md
youaresofunny Sep 18, 2018
f33d37a
Merge pull request #1 from youaresofunny/patch-1
roma219 Sep 19, 2018
785715b
test
roma219 Sep 29, 2018
05a2a69
test
roma219 Sep 29, 2018
788c31f
Merge branch 'master' of https://github.com/bitshares/vuex-bitshares
roma219 Sep 29, 2018
2f93edc
package-lock
roma219 Sep 29, 2018
f516530
Merge pull request #6 from bitshares/test-branch
roma219 Sep 29, 2018
96beb8b
fix publicKey prefix
roma219 Sep 30, 2018
af168b8
new account module + new export system
roma219 Sep 30, 2018
fca264e
brainkey login & acc module works
roma219 Oct 2, 2018
984aec9
account module refactoring
roma219 Oct 2, 2018
9a98dac
improving the acc module & service
roma219 Oct 3, 2018
38aadbd
Travis.yml update
youaresofunny Oct 5, 2018
a665523
Merge dev
youaresofunny Oct 5, 2018
e884517
Merge branch '4-auth-refactoring' into reinit-travis-and-tests
youaresofunny Oct 5, 2018
7a19d67
Fix first test - yay
youaresofunny Oct 5, 2018
d478ebc
Lint sources
youaresofunny Oct 5, 2018
87e9bd9
Merge pull request #8 from bitshares/4-auth-refactoring
youaresofunny Oct 5, 2018
9064c59
Merge pull request #9 from bitshares/reinit-travis-and-tests
roma219 Oct 6, 2018
ff678d7
Reinit babel presets
youaresofunny Oct 6, 2018
a1c9acc
Cleanup babel preset, return main entry to src folder
youaresofunny Oct 6, 2018
4461381
Merge pull request #12 from bitshares/reinit-build
roma219 Oct 6, 2018
6db3dfe
signup actions, and service refactor
roma219 Oct 9, 2018
35a1ff7
signup features
roma219 Oct 12, 2018
3bfbb9b
[4] final fixes
roma219 Oct 12, 2018
0e37ae2
fix tests
roma219 Oct 12, 2018
ec91b36
cleanup
roma219 Oct 12, 2018
e87bc44
lint
roma219 Oct 12, 2018
4c0d864
Merge pull request #15 from bitshares/4-auth-refactoring
youaresofunny Oct 12, 2018
2eb607c
Remove useless test, change some mocks, fix existing tests
youaresofunny Oct 13, 2018
7cecfeb
refactor transaction modules
ololokiras Oct 13, 2018
7baef28
Merge pull request #19 from bitshares/14-transaction-module-restructu…
roma219 Oct 13, 2018
7d8afd8
[17] restore backup file action
Oct 13, 2018
d929d7a
[17] comments
roma219 Oct 13, 2018
cb5fd01
[17] linter
roma219 Oct 13, 2018
9440ce8
[17] linter
roma219 Oct 13, 2018
25939e0
Merge pull request #20 from bitshares/17-restore-backup-file
roma219 Oct 13, 2018
b72ace8
Merge
youaresofunny Oct 13, 2018
aac5c62
Fix transaction import path in tests
youaresofunny Oct 13, 2018
bb29131
Account getters and user data fetching
roma219 Oct 13, 2018
13b0f54
Return dictionary
youaresofunny Oct 13, 2018
f1efb13
Merge pull request #18 from bitshares/13-fix-other-tests
roma219 Oct 13, 2018
4f50ae6
linter
roma219 Oct 13, 2018
b944ced
merge dev
roma219 Oct 13, 2018
97c94bd
Merge pull request #21 from bitshares/acc-getters-actions
youaresofunny Oct 13, 2018
a8d4dfb
Fix backup restore function
youaresofunny Oct 14, 2018
05c3105
[27] non zero balance getter
roma219 Oct 16, 2018
8608a47
[27] small fx
roma219 Oct 17, 2018
a89b470
[27] cleanup
roma219 Oct 18, 2018
082f3ed
Merge pull request #30 from bitshares/27-balances
roma219 Oct 18, 2018
debc1cf
Return account module for dev
youaresofunny Oct 21, 2018
45b3da1
Fix wrong path for account utils in services
youaresofunny Oct 21, 2018
2d13267
Add defaults markets and quotes to config, add getter for it, add bas…
youaresofunny Oct 26, 2018
c519be7
Market stats test
youaresofunny Oct 26, 2018
6b64351
Merge
youaresofunny Oct 26, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 1 addition & 13 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,15 +1,3 @@
{
"presets": [
[
"env", {
"targets": {
"node": "current"
}
}
],
[
"es2015"
]
],
"plugins": ["transform-object-rest-spread"]
"presets": [ "@babel/preset-env" ],
}
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
**/node_modules/*
test/brainkey_dictionary.js
src/utils
coverage/
main.js
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module.exports = {
'comma-dangle': 0,
'import/no-extraneous-dependencies': ['error', { 'devDependencies': true }],
'no-console': 0,
'max-len': [2, 100, 2],
'max-len': [2, 110, 2],
'import/prefer-default-export': 0,
'arrow-parens': 0,
'no-param-reassign': [2, { 'props': false }],
Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
node_modules
package-lock.json
*.swp
*.swo
.DS_Store
coverage
coverage
lib
12 changes: 4 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
language: node_js
node_js:
- '7'
- '10'
install:
- npm install
script:
- npm run test
- npm run lint
skip_cleanup: true
deploy:
provider: npm
email: [email protected]
api_key:
secure: DPAXmrWMNoqBdvGJR/kMjEiT4KyoyC9Bfc36ZNRNnnkySRgeVvAfi+g87xvq5oFlMXSUEOEb17Wl4u9RBh3FegnUGq9vauYztsZjp88s9eo7A+60JRyOS4glG9BjrW85P4JsH6ML7700c4TmdfHU6Os0ZK1vcjjeSDTG2CUMGFjUKtzJztEF7YAJjOmpwoH/Ze3z2QyGknOh83Y/34k6SnXp8o5iFBmZBn8Sg0VE7evpEez4YYBHlzGtbrabXy87xL5+dkjTi5zK5fLf0+bzjiXlPhT7Jz5jo9bAk162KCPWGn8X72wXBA6zS5j8Q8Z2e7egFpXULTG29elJ2Mo9KgCaoBuAhCDYdbvUe1Bx5Q8aX8vMwPXaxUXyOWGvp7YvcdNBRWw7z/0fQQRdOLwGdbM50LApP8zCS3UsNd/NqpBMD1JjCWWeqiT/9wT1fU0j4/MiU5jFuFRzp3IUc5ZRuY/GyGivGH0nno8gi6BIo+HZ7JXGOHCFGYDNSllsVEEZMLKGn/nZo+LtN9JHk9WgX+KlzBlkQcFkMr+cvKXO5qtrYYSQ9pWGAfeioCX7mNmTAdDqAYoFU9zlxMxVyR09pAYz7+Rc5rmtgBG0uTvZYXej9sQxsU/Xi+/zcu0reg5mtLulIBi1GLU2ky3bVX9LcCP+SZFrvINiokNRtUOY6LI=
on:
branch: npm
cache:
directories:
- node_modules
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ npm install --save vuex-bitshares
Dev:
```sh
cd your-project
git submodule add [email protected]:TrustyFund/vuex-bitshares.git
git submodule add [email protected]:bitshares/vuex-bitshares.git
npm install --save file:vuex-bitshares
```

Expand Down
26 changes: 26 additions & 0 deletions __mocks__/api_samples.js
Original file line number Diff line number Diff line change
Expand Up @@ -685,6 +685,32 @@ export default {
get_required_fees: {
amount: 1744,
asset_id: '1.3.0'
},
get_ticker: {
'BTS': {
'USD': {
time: '2018-10-26T10:52:42',
base: 'BTS',
quote: 'CNY',
latest: '1.48875987480826691019',
lowest_ask: '1.48875987480826691019',
highest_bid: '1.48532849886616384528',
percent_change: '0.49',
base_volume: '4384993.19055',
quote_volume: '2951879.9388'
},
'EOS': {
time: '2018-10-26T10:52:42',
base: 'BTS',
quote: 'EOS',
latest: '4.2',
lowest_ask: '1.48875987480826691019',
highest_bid: '1.48532849886616384528',
percent_change: '0.70',
base_volume: '100',
quote_volume: '999'
}
}
}

};
6 changes: 5 additions & 1 deletion __mocks__/bitsharesjs-ws.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { ChainTypes } from 'bitsharesjs';
import ApiSamples from './api_samples.js';

const Apis = jest.genMockFromModule('bitsharesjs-ws');
const Apis = {};

const orders = [];
const marketSubscribers = [];
Expand Down Expand Up @@ -158,6 +158,10 @@ Apis.instance = () => {
resolve();
break;
}
case 'get_ticker': {
const [base, quote] = data;
resolve(ApiSamples.get_ticker[base][quote]);
}
default: resolve();
}
});
Expand Down
94 changes: 87 additions & 7 deletions config.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,93 @@ const config = {
referrer: 'trfnd',
removePrefix: 'OPEN.',
faucetUrl: 'https://faucet.trusty.fund/signup',
defaultMarkets: [
'1.3.121',
'1.3.861',
'1.3.113',
'1.3.0',
'1.3.103'
]
marketBases: ["BTC", "ETH", "BTS", "USD", "CNY"],
defaultMarkets: { 'BTC': [
"BTS",
"OPEN.ETH",
"OPEN.DASH",
"BLOCKPAY",
"OPEN.DGD",
"OPEN.STEEM",
"OPEN.USDT",
"OPEN.MAID",
], 'ETH': [
"BTS",
"OPEN.BTC",
"OPEN.DASH",
"BLOCKPAY",
"OPEN.DGD",
"OPEN.STEEM",
"OPEN.USDT",
"OPEN.MAID",
], 'BTS': [
"OPEN.ETH",
"OPEN.EOS",
"PPY",
"OPEN.STEEM",
"OBITS",
"RUBLE",
"HERO",
"OCT",
"SILVER",
"GOLD",
"BLOCKPAY",
"BTWTY",
"SMOKE",
"GDEX.BTC",
"GDEX.ETH",
"GDEX.EOS",
"GDEX.BTO",
"OPEN.EOSDAC",
"OPEN.MAID",
"OPEN.HEAT",
"OPEN.INCENT",
"RUDEX.MUSE",
"RUDEX.TT",
"RUDEX.SCR",
"RUDEX.ETH",
"RUDEX.DGB",
"XBTSX.STH",
"ZEPH",
"HERTZ",
"SPARKDEX.BTC",
"SPARKDEX.ETH",
"RUDEX.SBD",
"RUDEX.KRM",
"RUDEX.STEEM"
], 'USD': [
"BTS",
"OPEN.BTC",
"OPEN.USDT",
"OPEN.ETH",
"OPEN.DASH",
"OPEN.STEEM",
"OPEN.MAID",
"GOLD",
"HERO",
"GDEX.BTC",
"GDEX.ETH",
"GDEX.EOS",
"GDEX.BTO",
"OPEN.EOSDAC",
"RUDEX.STEEM",
"RUDEX.KRM"
], 'CNY': [
"BTS",
"OPEN.BTC",
"USD",
"OPEN.ETH",
"YOYOW",
"OCT",
"GDEX.BTC",
"GDEX.ETH",
"GDEX.EOS",
"GDEX.BTO",
"GDEX.BTM",
"RUDEX.GOLOS",
"RUDEX.GBG"
]},

};

export default config;
Loading