Skip to content

Commit

Permalink
Merge pull request #419 from Adamant-im/stage
Browse files Browse the repository at this point in the history
v2.15.0
  • Loading branch information
dev-adamant-im authored Oct 24, 2021
2 parents c3bcded + 85997fc commit 8077b5d
Show file tree
Hide file tree
Showing 21 changed files with 158 additions and 105 deletions.
72 changes: 36 additions & 36 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "adamant-im",
"version": "2.14.0",
"version": "2.15.0",
"author": "ADAMANT Foundation <[email protected]>",
"license": "GPLv3",
"description": "Decentralized Messenger",
Expand All @@ -18,32 +18,32 @@
"postinstall": "electron-builder install-app-deps"
},
"dependencies": {
"@liskhq/lisk-cryptography": "3.1.0",
"@liskhq/lisk-transactions": "5.1.1",
"@mdi/font": "^5.9.55",
"@liskhq/lisk-cryptography": "3.2.0",
"@liskhq/lisk-transactions": "5.2.0",
"@mdi/font": "^6.3.95",
"@stablelib/utf8": "^1.0.1",
"@zxing/library": "0.18.6",
"abi-decoder": "^2.4.0",
"axios": "^0.21.1",
"axios": "^0.23.0",
"b64-to-blob": "^1.2.19",
"bignumber.js": "^9.0.1",
"bip39": "^3.0.4",
"bitcoinjs-lib": "^5.2.0",
"bytebuffer": "^5.0.1",
"coininfo": "^5.1.0",
"core-js": "^3.16.2",
"dayjs": "^1.10.6",
"core-js": "^3.18.3",
"dayjs": "^1.10.7",
"deepmerge": "^4.2.2",
"detect-browser": "^5.2.0",
"dompurify": "^2.3.0",
"detect-browser": "^5.2.1",
"dompurify": "^2.3.3",
"ed2curve": "^0.3.0",
"file-saver": "^2.0.5",
"hdkey": "^2.0.1",
"idb": "^6.1.2",
"js-base64": "^3.6.1",
"idb": "^6.1.5",
"js-base64": "^3.7.2",
"js-md5": "^0.7.3",
"lodash": "^4.17.21",
"marked": "^3.0.0",
"marked": "^3.0.7",
"notifyjs": "^3.0.0",
"pbkdf2": "^3.1.2",
"promise-queue": "^2.2.5",
Expand All @@ -57,51 +57,51 @@
"throttle-promise": "^1.0.4",
"visibilityjs": "^2.0.2",
"vue": "^2.6.14",
"vue-i18n": "^8.24.5",
"vue-i18n": "^8.26.5",
"vue-router": "^3.5.2",
"vue-scrollto": "^2.20.0",
"vuetify": "^1.5.24",
"vuex": "^3.6.2",
"vuex-persist": "^2.3.0",
"web3-eth": "^1.4.0",
"web3-utils": "^1.4.0"
"vuex-persist": "^3.1.3",
"web3-eth": "^1.6.0",
"web3-utils": "^1.6.0"
},
"devDependencies": {
"@babel/core": "7.15.0",
"@babel/eslint-parser": "^7.14.7",
"@babel/core": "7.15.8",
"@babel/eslint-parser": "^7.15.8",
"@intlify/vue-i18n-loader": "^1.1.0",
"@vue/babel-preset-app": "^4.5.13",
"@vue/cli-plugin-babel": "^4.5.13",
"@vue/cli-plugin-e2e-cypress": "^4.5.13",
"@vue/cli-plugin-eslint": "^4.5.13",
"@vue/cli-plugin-pwa": "^4.5.13",
"@vue/cli-plugin-unit-jest": "^4.5.13",
"@vue/cli-service": "^4.5.13",
"@vue/eslint-config-standard": "^6.0.0",
"@vue/test-utils": "^1.2.1",
"@vue/babel-preset-app": "^4.5.14",
"@vue/cli-plugin-babel": "^4.5.14",
"@vue/cli-plugin-e2e-cypress": "^4.5.14",
"@vue/cli-plugin-eslint": "^4.5.14",
"@vue/cli-plugin-pwa": "^4.5.14",
"@vue/cli-plugin-unit-jest": "^4.5.14",
"@vue/cli-service": "^4.5.14",
"@vue/eslint-config-standard": "^6.1.0",
"@vue/test-utils": "^1.2.2",
"babel-core": "7.0.0-bridge.0",
"babel-jest": "^27.0.6",
"babel-jest": "^27.3.1",
"babel-plugin-rewire": "^1.2.0",
"cross-env": "^7.0.3",
"electron": "^3.0.0",
"eslint": "^7.31.0",
"eslint-config-standard": "^16.0.3",
"eslint-plugin-import": "^2.24.1",
"eslint-plugin-import": "^2.25.2",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^5.1.0",
"eslint-plugin-vue": "^7.14.0",
"lorem-ipsum": "^2.0.3",
"eslint-plugin-promise": "^5.1.1",
"eslint-plugin-vue": "^7.20.0",
"lorem-ipsum": "^2.0.4",
"sinon": "^11.1.2",
"stylus": "^0.54.8",
"stylus": "^0.55.0",
"stylus-loader": "^3.0.2",
"uuid": "^8.3.2",
"vue-cli-plugin-electron-builder": "^2.1.1",
"vue-cli-plugin-i18n": "^2.1.2",
"vue-cli-plugin-vuetify": "^2.4.1",
"vue-cli-plugin-i18n": "^2.3.1",
"vue-cli-plugin-vuetify": "^2.4.3",
"vue-cli-plugin-webpack-bundle-analyzer": "^4.0.0",
"vue-jest": "^3.0.7",
"vue-template-compiler": "^2.6.14",
"vuetify-loader": "^1.7.2"
"vuetify-loader": "^1.7.3"
},
"eslintConfig": {
"root": true,
Expand Down
10 changes: 0 additions & 10 deletions src/assets/icons/wallets/bnz-fill.svg

This file was deleted.

32 changes: 25 additions & 7 deletions src/components/BuyTokensDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,19 @@

<v-card-text class="pa-0">
<v-list>
<v-list-tile
avatar
@click="openLink('U5149447931090026688')"
>
<v-list-tile-avatar>
<icon><exchanger-icon /></icon>
</v-list-tile-avatar>

<v-list-tile-content>
<v-list-tile-title>{{ $t('home.buy_tokens_exchanger') }}</v-list-tile-title>
</v-list-tile-content>
</v-list-tile>

<v-list-tile
v-for="action in actions"
:key="action.title"
Expand Down Expand Up @@ -53,13 +66,15 @@ import validateAddress from '@/lib/validateAddress'
import Icon from '@/components/icons/BaseIcon'
import CryptoIcon from '@/components/icons/CryptoIcon'
import CdlIcon from '@/components/icons/common/Cdl'
import ExchangerIcon from '@/components/icons/common/Exchanger'
import { websiteUriToOnion } from '@/lib/uri'
export default {
components: {
Icon,
CryptoIcon,
CdlIcon
CdlIcon,
ExchangerIcon
},
props: {
value: {
Expand Down Expand Up @@ -95,18 +110,21 @@ export default {
icon: 'RES',
title: 'Resfinex',
link: 'https://trade.resfinex.com?ref=7ccb34d867&pair=ADM_USDT'
},
{
icon: 'BZ',
title: 'Bit-Z',
link: 'https://u.bit-z.com/register?invite_code=2423317'
}
]
}
},
methods: {
openLink (link) {
window.open(link, '_blank', 'resizable,scrollbars,status,noopener')
if (link.startsWith('U')) {
console.log('routing to ', link)
this.$router.push({
name: 'Chat',
params: { partnerId: link }
})
} else {
window.open(link, '_blank', 'resizable,scrollbars,status,noopener')
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/WalletCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
>
<v-list-tile-content>
<v-list-tile-title :class="`${className}__title`">
{{ cryptoName }} {{ $t('home.wallet') }}
{{ $t('home.wallet_crypto', { crypto: cryptoName }) }}
</v-list-tile-title>
<v-list-tile-sub-title :class="`${className}__subtitle`">
{{ address }}
Expand Down
2 changes: 2 additions & 0 deletions src/components/icons/BaseIcon.vue
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ export default {
.theme--light
.svg-icon
fill: rgba(0, 0, 0, 0.54)
stroke: rgba(0, 0, 0, 0.54)
.theme--dark
.svg-icon
fill: $shades.white
stroke: $shades.white
</style>
5 changes: 0 additions & 5 deletions src/components/icons/BnzFill.vue

This file was deleted.

12 changes: 4 additions & 8 deletions src/components/icons/CryptoIcon.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<template>
<icon
:width="sizePx"
:height="sizePx"
:color="fill"
<icon
:width="sizePx"
:height="sizePx"
:color="fill"
>
<component :is="componentName" />
</icon>
Expand All @@ -13,10 +13,8 @@ import Icon from './BaseIcon'
import AdmFillIcon from './AdmFill'
import BnbFillIcon from './BnbFill'
import EthFillIcon from './EthFill'
import BzFillIcon from './BnzFill'
import DogeFillIcon from './DogeFill'
import DashFillIcon from './DashFill'
import KcsFillIcon from './KcsFill'
import LskFillIcon from './LskFill'
import UsdsFillIcon from './UsdsFill'
import ResFillIcon from './ResFill'
Expand All @@ -38,10 +36,8 @@ export default {
AdmFillIcon,
BnbFillIcon,
EthFillIcon,
BzFillIcon,
DogeFillIcon,
DashFillIcon,
KcsFillIcon,
LskFillIcon,
UsdsFillIcon,
ResFillIcon,
Expand Down
2 changes: 1 addition & 1 deletion src/components/icons/EthFill.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<g>
<g stroke="none">
<g>
<polyline points="256,16.8 399.2,243 256,172.2 256,16.8" />
<path d="M399.9,243.6l-144.1-71.2V16l0.5,0.7L399.9,243.6z M256.2,172.1l142.3,70.3L256.2,17.7V172.1z" />
Expand Down
13 changes: 0 additions & 13 deletions src/components/icons/KcsFill.vue

This file was deleted.

31 changes: 31 additions & 0 deletions src/components/icons/common/Exchanger.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<template>
<g>
<g id="wallet_lines">
<path
stroke-width="30"
fill="none"
d="m45.70909,461.46757c-18.30091,0 -33.47727,-19.07502 -33.47727,-42.07727l0,-331.00786c0,-23.00224 15.17636,-42.07727 33.47727,-42.07727l419.58183,0c18.30091,0 33.47727,19.07502 33.47727,42.07727l0,331.00786c0,23.00224 -15.17636,42.07727 -33.47727,42.07727l-419.58183,0z"
/>
</g>
<g id="neck_lines">
<path
fill="none"
stroke-width="10"
d="m496.53638,213.61364l0,96.54547l-95.96818,0c-16.06909,0 -29.01364,-15.55455 -29.01364,-34.86364l0,-26.81818c0,-19.30909 12.94455,-34.86364 29.01364,-34.86364l95.96818,0m4.46364,-5.36364l-100.43182,0c-18.30091,0 -33.47727,18.23636 -33.47727,40.22727l0,26.81818c0,21.99091 15.17636,40.22727 33.47727,40.22727l100.43182,0l0,-107.27274l0,0l0,0.00001z"
/>
</g>
<g id="circle_lines">
<circle
stroke="none"
cx="411.72728"
cy="260.88637"
r="20.08636"
/>
</g>
<g id="btc_around">
<path
d="m192.45171,126.95922c-56.78735,0.42717 -108.30463,39.04611 -122.67245,96.70914c-17.04452,68.32942 24.54292,137.54389 92.85638,154.58039c68.34134,17.04052 137.55155,-24.54704 154.58804,-92.88041c17.03651,-68.33739 -24.5463,-137.55917 -92.88369,-154.59568c-10.67522,-2.66195 -21.37211,-3.89255 -31.88828,-3.81344zm-4.42517,38.07652l15.08773,3.7621l-6.06262,24.30837c4.05054,0.92448 8.12691,1.85663 12.09574,2.84561l6.02002,-24.14779l15.09647,3.7621l-6.18278,24.80212c19.06158,6.56598 33.0019,16.40843 30.26285,34.7175c-1.98228,13.40286 -9.4129,19.89158 -19.27694,22.16624c13.54478,7.05187 20.43792,17.86619 13.87192,36.61385c-8.14835,23.28411 -27.50689,25.24876 -53.25054,20.37696l-6.24723,25.03916l-15.09756,-3.7632l6.1664,-24.70271c-3.91293,-0.97177 -7.91198,-2.00399 -12.03129,-3.12197l-6.18715,24.8196l-15.08008,-3.7621l6.24723,-25.08613c-3.52594,-0.903 -7.10703,-1.86201 -10.76197,-2.77788l-19.64616,-4.89707l7.49471,-17.28229c0,0 11.12329,2.95894 10.97279,2.73965c4.27412,1.05778 6.17084,-1.72865 6.91903,-3.58623l9.87279,-39.58071c0.5547,0.13329 1.09176,0.27074 1.59485,0.39543c-0.60199,-0.2408 -1.14834,-0.39608 -1.56973,-0.50358l7.04356,-28.25399c0.18489,-3.20775 -0.92033,-7.25395 -7.03483,-8.78042c0.2365,-0.1591 -10.96515,-2.72654 -10.96515,-2.72654l4.01663,-16.12438l20.82045,5.19856l-0.01748,0.07756c3.13035,0.77828 6.35497,1.51737 9.64011,2.26556l6.18824,-24.79338zm4.95715,45.90222l-7.51546,30.14159c8.52246,2.12417 34.79399,10.78879 39.05091,-6.2647c4.43324,-17.78879 -23.013,-21.75272 -31.53545,-23.87688zm-11.30815,45.35494l-8.29104,33.23407c10.23383,2.54125 41.80044,12.67632 46.46588,-6.07136c4.8761,-19.55176 -27.94101,-24.60856 -38.17484,-27.16271z"
/>
</g>
</g>
</template>
3 changes: 1 addition & 2 deletions src/i18n/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,7 @@
"free_tokens_link": "https://adamant.im/de-free-adm-tokens/",
"send_btn": "Send funds",
"share_uri": "Share {crypto} address",
"show_qr_code": "Show QR code",
"wallet": "wallet"
"show_qr_code": "Show QR code"
},
"login": {
"brand_title": "ADAMANT",
Expand Down
4 changes: 3 additions & 1 deletion src/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
"home": {
"balance": "Balance",
"buy_tokens_anonymously": "Anonymously on website",
"buy_tokens_exchanger": "In-chat Exchanger",
"copied": "Copied",
"copy": "Copy",
"copy_address": "Copy address",
Expand All @@ -86,7 +87,8 @@
"send_crypto": "Send {crypto}",
"share_uri": "Share {crypto} address",
"show_qr_code": "Show QR code",
"wallet": "wallet"
"wallet": "wallet",
"wallet_crypto": "{crypto} wallet"
},
"warning_on_addresses": {
"warning": "Warning",
Expand Down
4 changes: 3 additions & 1 deletion src/i18n/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
"home": {
"balance": "Баланс",
"buy_tokens_anonymously": "Анонимно на сайте",
"buy_tokens_exchanger": "Обменник в чате",
"copied": "Скопировал",
"copy": "Копировать",
"copy_address": "Копировать адрес",
Expand All @@ -87,7 +88,8 @@
"send_crypto": "Отправить {crypto}",
"share_uri": "Поделиться ссылкой {crypto}",
"show_qr_code": "Показать QR-код",
"wallet": "кошелек"
"wallet": "кошелек",
"wallet_crypto": "Кошелек {crypto}"
},
"warning_on_addresses": {
"warning": "Внимание",
Expand Down
8 changes: 7 additions & 1 deletion src/lib/bitcoin/btc-base-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import axios from 'axios'
import networks from './networks'
import getEnpointUrl from '../getEndpointUrl'
import BigNumber from '../bignumber'
import { isPositiveNumber } from '@/lib/numericHelpers'

const getUnique = values => {
const map = values.reduce((m, v) => {
Expand Down Expand Up @@ -150,7 +151,12 @@ export default class BtcBaseApi {
})

txb.addOutput(bitcoin.address.toOutputScript(address, this._network), amount)
txb.addOutput(this._address, transferAmount - target)
// This is a necessary step
// If we'll not add a change to output, it will burn in hell
const change = transferAmount - target
if (isPositiveNumber(change)) {
txb.addOutput(this._address, change)
}

for (let i = 0; i < inputs; ++i) {
txb.sign(i, this._keyPair)
Expand Down
1 change: 0 additions & 1 deletion src/lib/bitcoin/doge-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ export default class DogeApi extends BtcBaseApi {
getUnspents () {
return this._get(`/addr/${this.address}/utxo?noCache=1`)
.then(unspents => {
unspents = unspents.filter(tx => tx.confirmations)
return unspents.map(tx => ({
...tx,
amount: new BigNumber(tx.amount).times(this.multiplier).toNumber()
Expand Down
Loading

0 comments on commit 8077b5d

Please sign in to comment.