Skip to content

Commit

Permalink
Merge pull request #188 from bitholla/testnet
Browse files Browse the repository at this point in the history
Testnet
  • Loading branch information
abeikverdi authored Jul 1, 2020
2 parents cf7999b + 6d572d8 commit f161f30
Show file tree
Hide file tree
Showing 23 changed files with 144 additions and 99 deletions.
2 changes: 1 addition & 1 deletion mail/templates/deposit.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const html = (email, data, language, domain) => {
${data.transaction_id ? '<br />' : ''}
${data.transaction_id ? DEPOSIT.BODY[4](data.transaction_id) : ''}
</p>
${data.transaction_id ? DEPOSIT.BODY[5] : ''}
${data.transaction_id && explorers.length > 0 ? DEPOSIT.BODY[5] : ''}
<ul>${data.transaction_id ? explorers : ''}</ul>
`;
} else {
Expand Down
8 changes: 1 addition & 7 deletions mail/templates/withdrawal.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,6 @@ const html = (email, data, language, domain) => {
data.transaction_id
}>${explorer.name}</a></li>`;
});
} else {
EXPLORERS['eth'].forEach((explorer) => {
explorers += `<li><a href=${explorer.baseUrl}${explorer.txPath}/${
data.transaction_id
}>${explorer.name}</a></li>`;
});
}
result += `
<p>
Expand All @@ -50,7 +44,7 @@ const html = (email, data, language, domain) => {
${data.transaction_id ? '<br />' : ''}
${data.transaction_id ? WITHDRAWAL.BODY[5](data.transaction_id) : ''}
</p>
${data.transaction_id && !data.transaction_id.includes('-') ? WITHDRAWAL.BODY[6] : ''}
${data.transaction_id && !data.transaction_id.includes('-') && explorers.length > 0 ? WITHDRAWAL.BODY[6] : ''}
<ul>${data.transaction_id && !data.transaction_id.includes('-') ? explorers : ''}</ul>
`;
} else {
Expand Down
2 changes: 1 addition & 1 deletion plugins/vault/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "vault",
"version": "0.1.0",
"dependencies": {
"multicoin-address-validator": "0.4.1",
"multicoin-address-validator": "0.4.4",
"node-cron": "2.0.3",
"mathjs": "3.20.2"
}
Expand Down
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.5.4
1.5.5
110 changes: 55 additions & 55 deletions web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,23 @@
"version": "1.5.4",
"private": true,
"dependencies": {
"@material/button": "^0.7.0",
"@material/button": "0.7.0",
"antd": "3.21.4",
"antd-mobile": "2.2.3",
"awesome-phonenumber": "^2.7.0",
"axios": "^0.18.0",
"babel-polyfill": "^6.26.0",
"bchaddrjs": "^0.3.2",
"bitcoin-address-validation": "^0.2.7",
"awesome-phonenumber": "2.7.0",
"axios": "0.18.0",
"babel-polyfill": "6.26.0",
"bchaddrjs": "0.3.2",
"bitcoin-address-validation": "0.2.7",
"bluebird": "3.5.5",
"classnames": "^2.2.6",
"classnames": "2.2.6",
"country-data": "0.0.31",
"d3-axis": "1.0.12",
"d3-scale": "2.2.2",
"d3-selection": "1.4.0",
"d3-time": "1.0.11",
"draft-js": "^0.11.5",
"draftjs-to-html": "^0.9.1",
"draft-js": "0.11.5",
"draftjs-to-html": "0.9.1",
"emoji-mart": "2.11.1",
"flag-icon-css": "3.3.0",
"husky": "1.3.1",
Expand All @@ -28,61 +28,61 @@
"lint-staged": "8.2.1",
"mathjs": "5.10.3",
"mobile-detect": "1.4.2",
"moment": "^2.24.0",
"moment": "2.24.0",
"moment-jalaali": "0.7.2",
"moment-timezone": "0.5.21",
"node-sass-chokidar": "^1.3.4",
"npm-run-all": "^4.1.5",
"numbro": "^1.11.1",
"prop-types": "^15.7.2",
"qrcode.react": "^0.9.3",
"query-string": "^5.1.1",
"rc-tooltip": "^3.7.3",
"react": "^16.8.6",
"react-addons-shallow-compare": "^15.6.2",
"react-copy-to-clipboard": "^5.0.1",
"react-csv": "^1.1.1",
"react-custom-scrollbars": "^4.2.1",
"react-dates": "^20.1.0",
"react-device-detect": "^1.6.2",
"react-dom": "^16.8.6",
"react-draft-wysiwyg": "^1.14.5",
"react-draggable": "^3.2.1",
"react-event-listener": "^0.6.6",
"react-expanding-textarea": "^0.2.0",
"react-ga": "^2.5.7",
"react-helmet": "^6.0.0",
"react-ionicons": "^2.1.6",
"react-localization": "^0.1.10",
"react-modal": "^3.8.1",
"node-sass-chokidar": "1.3.4",
"npm-run-all": "4.1.5",
"numbro": "1.11.1",
"prop-types": "15.7.2",
"qrcode.react": "0.9.3",
"query-string": "5.1.1",
"rc-tooltip": "3.7.3",
"react": "16.8.6",
"react-addons-shallow-compare": "15.6.2",
"react-copy-to-clipboard": "5.0.1",
"react-csv": "1.1.1",
"react-custom-scrollbars": "4.2.1",
"react-dates": "20.1.0",
"react-device-detect": "1.6.2",
"react-dom": "16.8.6",
"react-draft-wysiwyg": "1.14.5",
"react-draggable": "3.2.1",
"react-event-listener": "0.6.6",
"react-expanding-textarea": "0.2.0",
"react-ga": "2.5.7",
"react-helmet": "6.0.0",
"react-ionicons": "2.1.6",
"react-localization": "0.1.10",
"react-modal": "3.8.1",
"react-moment": "0.9.2",
"react-numeric-input": "^2.2.3",
"react-numeric-input": "2.2.3",
"react-recaptcha-v3": "1.1.0",
"react-rectangle": "^1.3.3",
"react-redux": "^6.0.1",
"react-router": "^3.2.1",
"react-router-redux": "^4.0.8",
"react-snapshot": "^1.3.0",
"react-sortable-hoc": "^1.10.1",
"react-rectangle": "1.3.3",
"react-redux": "6.0.1",
"react-router": "3.2.1",
"react-router-redux": "4.0.8",
"react-snapshot": "1.3.0",
"react-sortable-hoc": "1.10.1",
"react-sparklines": "1.7.0",
"react-stockcharts": "^0.7.8",
"react-svg": "^2.2.18",
"react-truncate-markup": "^3.0.1",
"redux": "^4.0.1",
"redux-form": "^8.1.0",
"redux-logger": "^3.0.6",
"redux-persist": "^4.10.2",
"redux-promise-middleware": "^6.1.0",
"redux-thunk": "^2.3.0",
"reselect": "^4.0.0",
"socket.io-client": "^2.2.0",
"react-stockcharts": "0.7.8",
"react-svg": "2.2.18",
"react-truncate-markup": "3.0.1",
"redux": "4.0.1",
"redux-form": "8.1.0",
"redux-logger": "3.0.6",
"redux-persist": "4.10.2",
"redux-promise-middleware": "6.1.0",
"redux-thunk": "2.3.0",
"reselect": "4.0.0",
"socket.io-client": "2.2.0",
"universal-cookie": "4.0.2",
"validator": "^10.11.0",
"wallet-address-validator": "^0.2.4"
"validator": "10.11.0",
"wallet-address-validator": "0.2.4"
},
"devDependencies": {
"prettier": "1.16.4",
"react-scripts": "^2.1.8"
"react-scripts": "2.1.8"
},
"scripts": {
"prettier-commit": "lint-staged",
Expand Down
9 changes: 9 additions & 0 deletions web/public/assets/images/tab-history.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion web/src/components/AppBar/AddTabList.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class AddTabList extends Component {
} else {
Object.keys(pairs).map(key => {
let temp = pairs[key];
if (temp && temp.pair_base === selectedTabMenu) {
if (temp && temp.pair_2 === selectedTabMenu) {
tabMenu[key] = temp;
}
return key;
Expand Down
14 changes: 14 additions & 0 deletions web/src/components/AppBar/MenuList.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,20 @@ class MenuList extends Component {
/>
{STRINGS.ACCOUNTS.TAB_WALLET}
</div>
<div
className={classnames('app-bar-account-menu-list d-flex', {
'menu-active':
selectedMenu === 'history'
})}
onClick={() => this.handleMenu('history')}
>
<div className="notification-content" />
<ReactSVG
path={ICONS.TAB_HISTORY}
wrapperClassName="app-bar-account-list-icon"
/>
{STRINGS.ACCOUNTS.TAB_HISTORY}
</div>
<div
className={classnames(
'app-bar-account-menu-list d-flex',
Expand Down
2 changes: 1 addition & 1 deletion web/src/components/AppBar/PairTabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ class PairTabs extends Component {
const { pairs, tickers, location, coins, tabCount } = this.props;
const obj = {};
Object.entries(pairs).forEach(([key, pair]) => {
obj[pair.pair_base] = '';
obj[pair.pair_2] = '';
});
const symbols = Object.keys(obj).map((key) => key);

Expand Down
5 changes: 5 additions & 0 deletions web/src/components/AppBar/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,8 @@ class AppBar extends Component {
this.props.router.push('/account');
} else if (menu === 'security') {
this.props.router.push('/security');
} else if (menu === 'history') {
this.props.router.push('/transactions');
} else if (menu === 'verification') {
this.props.router.push('/verification');
} else if (menu === 'wallet') {
Expand Down Expand Up @@ -336,6 +338,9 @@ class AppBar extends Component {
case '/wallet':
selectedMenu = 'wallet';
break;
case '/transactions':
selectedMenu = 'history';
break;
case '/security':
selectedMenu = 'security';
break;
Expand Down
4 changes: 2 additions & 2 deletions web/src/components/Notification/NewOrder.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const generateRows = ({ order, pairData }, coins) => {
label: STRINGS.SIZE,
value: STRINGS.formatString(
CURRENCY_PRICE_FORMAT,
formatToCurrency(size, baseFormat.min),
formatToCurrency(size, pairData.increment_size),
baseFormat.symbol.toUpperCase()
)
});
Expand All @@ -44,7 +44,7 @@ const generateRows = ({ order, pairData }, coins) => {
label: STRINGS.PRICE,
value: STRINGS.formatString(
CURRENCY_PRICE_FORMAT,
formatToCurrency(price, secondaryFormat.min),
formatToCurrency(price, pairData.increment_price),
secondaryFormat.symbol.toUpperCase()
)
});
Expand Down
1 change: 1 addition & 0 deletions web/src/config/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ export const ICONS = {
TAB_PLUS: '/assets/images/tab-plus.svg',
TAB_MINUS: '/assets/images/tab-minus.svg',
TAB_SUMMARY: '/assets/images/tab-summary.svg',
TAB_HISTORY: '/assets/images/tab-history.svg',
TAB_WALLET: '/assets/images/tab-wallet.svg',
TAB_SECURITY: '/assets/images/tab-security.svg',
TAB_VERIFY: '/assets/images/tab-verify.svg',
Expand Down
6 changes: 5 additions & 1 deletion web/src/config/lang/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ export default {
TAB_PROFILE: 'Profile',
TAB_WALLET: 'Wallet',
TAB_SUMMARY: 'Summary',
TAB_HISTORY: 'History',
TAB_API: 'API',
TAB_SIGNOUT: 'Signout'
},
Expand Down Expand Up @@ -174,6 +175,7 @@ export default {
CRYPTO_LABELS: {
ADDRESS: 'Your {0} receiving address', // new
DESTINATION_TAG: 'Your {0} destination tag', // new
MEMO: 'Your {0} memo', // new
BTC: 'Your Bitcoin receiving address',
ETH: 'Your Ethereum receiving address',
BCH: 'Your Bitcoin Cash receiving address'
Expand Down Expand Up @@ -815,7 +817,9 @@ export default {
WITHDRAWALS_FORM_ADDRESS_LABEL: 'Destination address',
WITHDRAWALS_FORM_ADDRESS_PLACEHOLDER: 'Type the address',
WITHDRAWALS_FORM_DESTINATION_TAG_LABEL: 'Destination tag (optional)', // new
WITHDRAWALS_FORM_DESTINATION_TAG_PLACEHOLDER: 'Type the destination address', // new
WITHDRAWALS_FORM_MEMO_LABEL: 'Memo (optional)', // new
WITHDRAWALS_FORM_DESTINATION_TAG_PLACEHOLDER: 'Type the destination tag', // new
WITHDRAWALS_FORM_MEMO_PLACEHOLDER: 'Type the transaction memo', // new
WITHDRAWALS_FORM_AMOUNT_LABEL: '{0} amount to withdraw',
WITHDRAWALS_FORM_AMOUNT_PLACEHOLDER:
'Type the amount of {0} you wish to withdraw',
Expand Down
6 changes: 4 additions & 2 deletions web/src/containers/Deposit/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,19 +79,21 @@ export const renderContent = (
const { fullname } = coins[symbol] || DEFAULT_COIN_DATA;
let address = crypto_wallet[symbol];
let destinationAddress = '';
if (symbol === 'xrp') {
if (symbol === 'xrp' || symbol === 'xlm') {
const temp = address.split(':');
address = temp[0] ? temp[0] : address;
destinationAddress = temp[1] ? temp[1] : '';
}
const additionalText = (symbol === 'xlm') ? STRINGS.DEPOSIT.CRYPTO_LABELS.MEMO : STRINGS.DEPOSIT.CRYPTO_LABELS.DESTINATION_TAG;

return renderBTCContent(
STRINGS.formatString(STRINGS.DEPOSIT.CRYPTO_LABELS.ADDRESS, fullname),
address,
onCopy,
true,
destinationAddress,
STRINGS.formatString(
STRINGS.DEPOSIT.CRYPTO_LABELS.DESTINATION_TAG,
additionalText,
fullname
)
);
Expand Down
10 changes: 6 additions & 4 deletions web/src/containers/Trade/components/OrderEntry.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ import Form, { FORM_NAME } from './OrderEntryForm';
import {
toFixed,
formatNumber,
formatBaseAmount,
// formatBaseAmount,
roundNumber,
calculateBalancePrice
calculateBalancePrice,
formatToCurrency
} from '../../../utils/currency';
import { getDecimals, playBackgroundAudioNotification } from '../../../utils/utils';
import {
Expand Down Expand Up @@ -371,7 +372,7 @@ class OrderEntry extends Component {
};

render() {
const { balance, type, side, pair_base, pair_2, price, coins, size } = this.props;
const { balance, type, side, pair_base, pair_2, price, coins, size, increment_price } = this.props;
const {
initialValues,
formValues,
Expand Down Expand Up @@ -414,7 +415,8 @@ class OrderEntry extends Component {
currency={buyingName}
orderPrice={orderPrice}
fees={orderFees}
formatToCurrency={formatBaseAmount}
increment_price={increment_price}
formatToCurrency={formatToCurrency}
onFeeStructureAndLimits={this.onFeeStructureAndLimits}
/>
</Form>
Expand Down
3 changes: 2 additions & 1 deletion web/src/containers/Trade/components/OrderEntryReview.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const Review = ({
size = 0,
currency,
price,
increment_price,
formatToCurrency,
type,
onFeeStructureAndLimits
Expand All @@ -32,7 +33,7 @@ const Review = ({
</div>
<div className="text-price">
{upToMarket
?price ? renderAmount(formatToCurrency(price * size), currency) :0
?price ? renderAmount(formatToCurrency(price * size, increment_price), currency) :0
: STRINGS.UP_TO_MARKET}
</div>
</div>
Expand Down
Loading

0 comments on commit f161f30

Please sign in to comment.